Skip to content

Commit 9fff5f0

Browse files
committed
Add help button and connect to user manual
1 parent 1b1be55 commit 9fff5f0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/gui/symbology/qgsrulebasedrendererwidget.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Ru
693693
QgsVScrollArea *scrollArea = new QgsVScrollArea( this );
694694
layout->addWidget( scrollArea );
695695

696-
buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
696+
buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok );
697697
mPropsWidget = new QgsRendererRulePropsWidget( rule, layer, style, this, context );
698698

699699
scrollArea->setWidget( mPropsWidget );
@@ -702,6 +702,7 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Ru
702702

703703
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsRendererRulePropsDialog::accept );
704704
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
705+
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsRendererRulePropsDialog::showHelp );
705706

706707
QgsSettings settings;
707708
restoreGeometry( settings.value( QStringLiteral( "Windows/QgsRendererRulePropsDialog/geometry" ) ).toByteArray() );
@@ -729,6 +730,11 @@ void QgsRendererRulePropsDialog::accept()
729730
QDialog::accept();
730731
}
731732

733+
void QgsRendererRulePropsDialog::showHelp()
734+
{
735+
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#rule-based-rendering" ) );
736+
}
737+
732738

733739
void QgsRendererRulePropsWidget::buildExpression()
734740
{

src/gui/symbology/qgsrulebasedrendererwidget.h

+3
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog
273273
void buildExpression();
274274
void accept() override;
275275

276+
private slots:
277+
void showHelp();
278+
276279
private:
277280
QgsRendererRulePropsWidget *mPropsWidget = nullptr;
278281
QDialogButtonBox *buttonBox = nullptr;

0 commit comments

Comments
 (0)