Skip to content
Permalink
Browse files

Add help button and connect to user manual

  • Loading branch information
DelazJ committed Jan 27, 2018
1 parent 1b1be55 commit 9fff5f0ca7b8c871fd80d9e8a554e7df4b1654df
@@ -693,7 +693,7 @@ QgsRendererRulePropsDialog::QgsRendererRulePropsDialog( QgsRuleBasedRenderer::Ru
QgsVScrollArea *scrollArea = new QgsVScrollArea( this );
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 );

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

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

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

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


void QgsRendererRulePropsWidget::buildExpression()
{
@@ -273,6 +273,9 @@ class GUI_EXPORT QgsRendererRulePropsDialog : public QDialog
void buildExpression();
void accept() override;

private slots:
void showHelp();

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

0 comments on commit 9fff5f0

Please sign in to comment.
You can’t perform that action at this time.