Skip to content

Commit

Permalink
Add a help button to the raster legend widget
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Sep 20, 2021
1 parent 641c05d commit 770281e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/qgscolorramplegendnodewidget.cpp
Expand Up @@ -142,9 +142,13 @@ QgsColorRampLegendNodeDialog::QgsColorRampLegendNodeDialog( const QgsColorRampLe
QVBoxLayout *vLayout = new QVBoxLayout();
mWidget = new QgsColorRampLegendNodeWidget( nullptr );
vLayout->addWidget( mWidget );
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok, Qt::Horizontal );
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
connect( mButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, [ = ]
{
QgsHelp::openHelp( QStringLiteral( "working_with_raster/raster_properties.html#raster-legend-settings" ) );
} );
connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );
vLayout->addWidget( mButtonBox );
setLayout( vLayout );
Expand Down

0 comments on commit 770281e

Please sign in to comment.