From 650f526975dd422fb7b4583e2f24905140349298 Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Mon, 26 Mar 2018 21:58:18 +0200 Subject: [PATCH 1/3] Enable Topology Checker help button refs #18550 --- src/plugins/topology/rulesDialog.cpp | 9 ++++++++- src/plugins/topology/rulesDialog.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/topology/rulesDialog.cpp b/src/plugins/topology/rulesDialog.cpp index 6705b3c91f6..721208d19c6 100644 --- a/src/plugins/topology/rulesDialog.cpp +++ b/src/plugins/topology/rulesDialog.cpp @@ -26,6 +26,7 @@ #include "qgisinterface.h" #include "qgsproject.h" #include "qgsapplication.h" +#include "qgshelp.h" #include "rulesDialog.h" #include "topolTest.h" @@ -52,7 +53,8 @@ rulesDialog::rulesDialog( const QMap &testMap, QgisInterf // attempt to add new test when OK clicked //connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addTest() ) ); connect( mDeleteTestButton, &QAbstractButton::clicked, this, &rulesDialog::deleteTest ); - + connect( buttonBox, &QDialogButtonBox::helpRequested, this, &rulesDialog::showHelp ); + connect( mLayer1Box, static_cast( &QComboBox::currentIndexChanged ), this, &rulesDialog::updateRuleItems ); connect( mRuleBox, static_cast( &QComboBox::currentIndexChanged ), this, &rulesDialog::showControls ); @@ -363,3 +365,8 @@ void rulesDialog::clearRules() mRulesTable->removeRow( 0 ); } } + +void rulesDialog::showHelp() +{ + QgsHelp::openHelp( QStringLiteral( "plugins/plugins_topology_checker.html" ) ); +} diff --git a/src/plugins/topology/rulesDialog.h b/src/plugins/topology/rulesDialog.h index f571c83624f..381034576b9 100644 --- a/src/plugins/topology/rulesDialog.h +++ b/src/plugins/topology/rulesDialog.h @@ -104,7 +104,8 @@ class rulesDialog : public QDialog, private Ui::rulesDialog * \param layerId layer ID */ void updateRuleItems( const QString &layerName ); - + //! Open the associated help + void showHelp(); From a0430ec63e3d9354a3aeef153b83044147cffc6b Mon Sep 17 00:00:00 2001 From: Salvatore Larosa Date: Mon, 26 Mar 2018 23:09:51 +0200 Subject: [PATCH 2/3] set correctly the delete button layout (#4) --- src/plugins/topology/rulesDialog.ui | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/topology/rulesDialog.ui b/src/plugins/topology/rulesDialog.ui index a7b33ed0226..fdf85685f0f 100644 --- a/src/plugins/topology/rulesDialog.ui +++ b/src/plugins/topology/rulesDialog.ui @@ -94,15 +94,15 @@ + + + + Delete Rule + + + - - - - Delete Rule - - - From 0c59bc540e8c13699d5a1b6748c3174ef570edd9 Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Mon, 26 Mar 2018 23:16:10 +0200 Subject: [PATCH 3/3] fix indentation --- src/plugins/topology/rulesDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/topology/rulesDialog.cpp b/src/plugins/topology/rulesDialog.cpp index 721208d19c6..43b77eabf34 100644 --- a/src/plugins/topology/rulesDialog.cpp +++ b/src/plugins/topology/rulesDialog.cpp @@ -54,7 +54,7 @@ rulesDialog::rulesDialog( const QMap &testMap, QgisInterf //connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addTest() ) ); connect( mDeleteTestButton, &QAbstractButton::clicked, this, &rulesDialog::deleteTest ); connect( buttonBox, &QDialogButtonBox::helpRequested, this, &rulesDialog::showHelp ); - + connect( mLayer1Box, static_cast( &QComboBox::currentIndexChanged ), this, &rulesDialog::updateRuleItems ); connect( mRuleBox, static_cast( &QComboBox::currentIndexChanged ), this, &rulesDialog::showControls );