Skip to content
Permalink
Browse files

Add help button to 'Add layers to Layout Legend' dialog

  • Loading branch information
DelazJ authored and nyalldawson committed Jun 14, 2020
1 parent 1c7b583 commit 39f30ba07e3bb23950e1009b088c7cfa982d5cb3
@@ -20,6 +20,7 @@
#include "qgsmaplayerproxymodel.h"
#include "qgssettings.h"
#include "qgsgui.h"
#include "qgshelp.h"

QgsLayoutLegendLayersDialog::QgsLayoutLegendLayersDialog( QWidget *parent )
: QDialog( parent )
@@ -39,6 +40,7 @@ QgsLayoutLegendLayersDialog::QgsLayoutLegendLayersDialog( QWidget *parent )

connect( mFilterLineEdit, &QLineEdit::textChanged, mModel, &QgsMapLayerProxyModel::setFilterString );
connect( mCheckBoxVisibleLayers, &QCheckBox::toggled, this, &QgsLayoutLegendLayersDialog::filterVisible );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsLayoutLegendLayersDialog::showHelp );

mFilterLineEdit->setFocus();
}
@@ -75,3 +77,8 @@ void QgsLayoutLegendLayersDialog::filterVisible( bool enabled )
else
mModel->setLayerAllowlist( QList< QgsMapLayer * >() );
}

void QgsLayoutLegendLayersDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "print_composer/composer_items/composer_legend.html#legend-items" ) );
}
@@ -50,6 +50,7 @@ class GUI_EXPORT QgsLayoutLegendLayersDialog: public QDialog, private Ui::QgsLay
private slots:

void filterVisible( bool enabled );
void showHelp();

private:

@@ -30,7 +30,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>

0 comments on commit 39f30ba

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