Skip to content

Commit f75c0a8

Browse files
authored
Merge pull request #6680 from DelazJ/topol
Enable Topology Checker help button
2 parents d24f8a3 + 0c59bc5 commit f75c0a8

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/plugins/topology/rulesDialog.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "qgisinterface.h"
2727
#include "qgsproject.h"
2828
#include "qgsapplication.h"
29+
#include "qgshelp.h"
2930
#include "rulesDialog.h"
3031
#include "topolTest.h"
3132

@@ -52,6 +53,7 @@ rulesDialog::rulesDialog( const QMap<QString, TopologyRule> &testMap, QgisInterf
5253
// attempt to add new test when OK clicked
5354
//connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addTest() ) );
5455
connect( mDeleteTestButton, &QAbstractButton::clicked, this, &rulesDialog::deleteTest );
56+
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &rulesDialog::showHelp );
5557

5658
connect( mLayer1Box, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &rulesDialog::updateRuleItems );
5759
connect( mRuleBox, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &rulesDialog::showControls );
@@ -363,3 +365,8 @@ void rulesDialog::clearRules()
363365
mRulesTable->removeRow( 0 );
364366
}
365367
}
368+
369+
void rulesDialog::showHelp()
370+
{
371+
QgsHelp::openHelp( QStringLiteral( "plugins/plugins_topology_checker.html" ) );
372+
}

src/plugins/topology/rulesDialog.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ class rulesDialog : public QDialog, private Ui::rulesDialog
104104
* \param layerId layer ID
105105
*/
106106
void updateRuleItems( const QString &layerName );
107-
107+
//! Open the associated help
108+
void showHelp();
108109

109110

110111

src/plugins/topology/rulesDialog.ui

+7-7
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@
9494
</property>
9595
</widget>
9696
</item>
97+
<item>
98+
<widget class="QPushButton" name="mDeleteTestButton">
99+
<property name="text">
100+
<string>Delete Rule</string>
101+
</property>
102+
</widget>
103+
</item>
97104
</layout>
98105
</item>
99-
<item>
100-
<widget class="QPushButton" name="mDeleteTestButton">
101-
<property name="text">
102-
<string>Delete Rule</string>
103-
</property>
104-
</widget>
105-
</item>
106106
</layout>
107107
</item>
108108
<item row="3" column="0" colspan="2">

0 commit comments

Comments
 (0)