Skip to content

Commit

Permalink
Merge pull request #6680 from DelazJ/topol
Browse files Browse the repository at this point in the history
Enable Topology Checker help button
  • Loading branch information
slarosa committed Mar 27, 2018
2 parents d24f8a3 + 0c59bc5 commit f75c0a8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/plugins/topology/rulesDialog.cpp
Expand Up @@ -26,6 +26,7 @@
#include "qgisinterface.h"
#include "qgsproject.h"
#include "qgsapplication.h"
#include "qgshelp.h"
#include "rulesDialog.h"
#include "topolTest.h"

Expand All @@ -52,6 +53,7 @@ rulesDialog::rulesDialog( const QMap<QString, TopologyRule> &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<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &rulesDialog::updateRuleItems );
connect( mRuleBox, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &rulesDialog::showControls );
Expand Down Expand Up @@ -363,3 +365,8 @@ void rulesDialog::clearRules()
mRulesTable->removeRow( 0 );
}
}

void rulesDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "plugins/plugins_topology_checker.html" ) );
}
3 changes: 2 additions & 1 deletion src/plugins/topology/rulesDialog.h
Expand Up @@ -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();



Expand Down
14 changes: 7 additions & 7 deletions src/plugins/topology/rulesDialog.ui
Expand Up @@ -94,15 +94,15 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mDeleteTestButton">
<property name="text">
<string>Delete Rule</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="mDeleteTestButton">
<property name="text">
<string>Delete Rule</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0" colspan="2">
Expand Down

0 comments on commit f75c0a8

Please sign in to comment.