mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-02 00:04:53 -04:00
Add Title and Help button to "Symbol levels" dialog
This commit is contained in:
parent
a4cf840d5c
commit
41ca084d55
@ -184,12 +184,14 @@ QgsSymbolLevelsDialog::QgsSymbolLevelsDialog( QgsFeatureRenderer *renderer, bool
|
||||
QVBoxLayout *vLayout = new QVBoxLayout();
|
||||
mWidget = new QgsSymbolLevelsWidget( renderer, usingSymbolLevels );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::Ok, Qt::Horizontal );
|
||||
connect( bbox, &QDialogButtonBox::accepted, mWidget, &QgsSymbolLevelsWidget::apply );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QgsSymbolLevelsDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QgsSymbolLevelsDialog::reject );
|
||||
connect( bbox, &QDialogButtonBox::helpRequested, this, &QgsSymbolLevelsDialog::showHelp );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
setWindowTitle( tr( "Symbol Levels" ) );
|
||||
}
|
||||
|
||||
void QgsSymbolLevelsDialog::setForceOrderingEnabled( bool enabled )
|
||||
@ -197,6 +199,11 @@ void QgsSymbolLevelsDialog::setForceOrderingEnabled( bool enabled )
|
||||
mWidget->setForceOrderingEnabled( enabled );
|
||||
}
|
||||
|
||||
void QgsSymbolLevelsDialog::showHelp()
|
||||
{
|
||||
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#symbols-levels" ) );
|
||||
}
|
||||
|
||||
/// @cond PRIVATE
|
||||
|
||||
QWidget *SpinBoxDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &, const QModelIndex & ) const
|
||||
|
@ -102,6 +102,9 @@ class GUI_EXPORT QgsSymbolLevelsDialog : public QDialog
|
||||
|
||||
QgsSymbolLevelsWidget *mWidget = nullptr;
|
||||
|
||||
private slots:
|
||||
|
||||
void showHelp();
|
||||
};
|
||||
|
||||
#ifndef SIP_RUN
|
||||
|
Loading…
x
Reference in New Issue
Block a user