mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Add help button to labeling rules dialogs
This commit is contained in:
parent
103990eabb
commit
a15b9a159b
@ -20,6 +20,7 @@
|
|||||||
#include "qgslabelingenginerule.h"
|
#include "qgslabelingenginerule.h"
|
||||||
#include "qgslabelingenginerulewidget.h"
|
#include "qgslabelingenginerulewidget.h"
|
||||||
#include "qgsgui.h"
|
#include "qgsgui.h"
|
||||||
|
#include "qgshelp.h"
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
@ -408,7 +409,7 @@ QgsLabelingEngineRulesDialog::QgsLabelingEngineRulesDialog( QWidget *parent, Qt:
|
|||||||
QVBoxLayout *layout = new QVBoxLayout( this );
|
QVBoxLayout *layout = new QVBoxLayout( this );
|
||||||
layout->addWidget( mWidget );
|
layout->addWidget( mWidget );
|
||||||
|
|
||||||
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
|
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, Qt::Horizontal, this );
|
||||||
layout->addWidget( mButtonBox );
|
layout->addWidget( mButtonBox );
|
||||||
|
|
||||||
setLayout( layout );
|
setLayout( layout );
|
||||||
@ -416,6 +417,9 @@ QgsLabelingEngineRulesDialog::QgsLabelingEngineRulesDialog( QWidget *parent, Qt:
|
|||||||
|
|
||||||
connect( mButtonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QDialog::accept );
|
connect( mButtonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QDialog::accept );
|
||||||
connect( mButtonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QDialog::reject );
|
connect( mButtonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QDialog::reject );
|
||||||
|
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, [=] {
|
||||||
|
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#labeling-rules" ) );
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLabelingEngineRulesDialog::setRules( const QList<QgsAbstractLabelingEngineRule *> &rules )
|
void QgsLabelingEngineRulesDialog::setRules( const QList<QgsAbstractLabelingEngineRule *> &rules )
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "moc_qgslabelingenginerulewidget.cpp"
|
#include "moc_qgslabelingenginerulewidget.cpp"
|
||||||
#include "qgslabelingenginerule_impl.h"
|
#include "qgslabelingenginerule_impl.h"
|
||||||
#include "qgsgui.h"
|
#include "qgsgui.h"
|
||||||
|
#include "qgshelp.h"
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
@ -36,7 +37,7 @@ QgsLabelingEngineRuleDialog::QgsLabelingEngineRuleDialog( QgsLabelingEngineRuleW
|
|||||||
QVBoxLayout *layout = new QVBoxLayout( this );
|
QVBoxLayout *layout = new QVBoxLayout( this );
|
||||||
layout->addWidget( mWidget );
|
layout->addWidget( mWidget );
|
||||||
|
|
||||||
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
|
mButtonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, Qt::Horizontal, this );
|
||||||
layout->addWidget( mButtonBox );
|
layout->addWidget( mButtonBox );
|
||||||
|
|
||||||
setLayout( layout );
|
setLayout( layout );
|
||||||
@ -44,6 +45,9 @@ QgsLabelingEngineRuleDialog::QgsLabelingEngineRuleDialog( QgsLabelingEngineRuleW
|
|||||||
|
|
||||||
connect( mButtonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QDialog::accept );
|
connect( mButtonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QDialog::accept );
|
||||||
connect( mButtonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QDialog::reject );
|
connect( mButtonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QDialog::reject );
|
||||||
|
connect( mButtonBox, &QDialogButtonBox::helpRequested, this, [=] {
|
||||||
|
QgsHelp::openHelp( QStringLiteral( "working_with_vector/vector_properties.html#labeling-rules" ) );
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsLabelingEngineRuleDialog::setRule( const QgsAbstractLabelingEngineRule *rule )
|
void QgsLabelingEngineRuleDialog::setRule( const QgsAbstractLabelingEngineRule *rule )
|
||||||
|
@ -105,7 +105,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../images/images.qrc"/>
|
<include location="../../../images/images.qrc"/>
|
||||||
<include location="../../../images/images.qrc"/>
|
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user