Merge pull request #6680 from DelazJ/topol

Enable Topology Checker help button
This commit is contained in:
Salvatore Larosa 2018-03-27 16:45:09 +02:00 committed by GitHub
commit f75c0a80e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View File

@ -26,6 +26,7 @@
#include "qgisinterface.h" #include "qgisinterface.h"
#include "qgsproject.h" #include "qgsproject.h"
#include "qgsapplication.h" #include "qgsapplication.h"
#include "qgshelp.h"
#include "rulesDialog.h" #include "rulesDialog.h"
#include "topolTest.h" #include "topolTest.h"
@ -52,6 +53,7 @@ rulesDialog::rulesDialog( const QMap<QString, TopologyRule> &testMap, QgisInterf
// attempt to add new test when OK clicked // attempt to add new test when OK clicked
//connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addTest() ) ); //connect( buttonBox, SIGNAL( accepted() ), this, SLOT( addTest() ) );
connect( mDeleteTestButton, &QAbstractButton::clicked, this, &rulesDialog::deleteTest ); 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( 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 ); connect( mRuleBox, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &rulesDialog::showControls );
@ -363,3 +365,8 @@ void rulesDialog::clearRules()
mRulesTable->removeRow( 0 ); mRulesTable->removeRow( 0 );
} }
} }
void rulesDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "plugins/plugins_topology_checker.html" ) );
}

View File

@ -104,7 +104,8 @@ class rulesDialog : public QDialog, private Ui::rulesDialog
* \param layerId layer ID * \param layerId layer ID
*/ */
void updateRuleItems( const QString &layerName ); void updateRuleItems( const QString &layerName );
//! Open the associated help
void showHelp();

View File

@ -94,15 +94,15 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QPushButton" name="mDeleteTestButton">
<property name="text">
<string>Delete Rule</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item>
<widget class="QPushButton" name="mDeleteTestButton">
<property name="text">
<string>Delete Rule</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">