Skip to content

Commit

Permalink
Add help button and connect to user manual
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Jan 27, 2018
1 parent 1b1be55 commit 9fff5f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/symbology/qgsrulebasedrendererwidget.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Ru
QgsVScrollArea *scrollArea = new QgsVScrollArea( this ); QgsVScrollArea *scrollArea = new QgsVScrollArea( this );
layout->addWidget( scrollArea ); layout->addWidget( scrollArea );


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


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


connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsRendererRulePropsDialog::accept ); connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsRendererRulePropsDialog::accept );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject ); connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsRendererRulePropsDialog::showHelp );


QgsSettings settings; QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/QgsRendererRulePropsDialog/geometry" ) ).toByteArray() ); restoreGeometry( settings.value( QStringLiteral( "Windows/QgsRendererRulePropsDialog/geometry" ) ).toByteArray() );
Expand Down Expand Up @@ -729,6 +730,11 @@ void QgsRendererRulePropsDialog::accept()
QDialog::accept(); QDialog::accept();
} }


void QgsRendererRulePropsDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#rule-based-rendering" ) );
}



void QgsRendererRulePropsWidget::buildExpression() void QgsRendererRulePropsWidget::buildExpression()
{ {
Expand Down
3 changes: 3 additions & 0 deletions src/gui/symbology/qgsrulebasedrendererwidget.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog
void buildExpression(); void buildExpression();
void accept() override; void accept() override;


private slots:
void showHelp();

private: private:
QgsRendererRulePropsWidget *mPropsWidget = nullptr; QgsRendererRulePropsWidget *mPropsWidget = nullptr;
QDialogButtonBox *buttonBox = nullptr; QDialogButtonBox *buttonBox = nullptr;
Expand Down

0 comments on commit 9fff5f0

Please sign in to comment.