Skip to content
Permalink
Browse files

Add Title and Help button to "Symbol levels" dialog

  • Loading branch information
DelazJ committed Nov 26, 2017
1 parent a4cf840 commit 41ca084d55ad57aa816a8b7240db5fc3a2d8da82
Showing with 11 additions and 1 deletion.
  1. +8 −1 src/gui/symbology/qgssymbollevelsdialog.cpp
  2. +3 −0 src/gui/symbology/qgssymbollevelsdialog.h
@@ -184,19 +184,26 @@ 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 )
{
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

0 comments on commit 41ca084

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