26 #include <QDialogButtonBox>
27 #include <QPushButton>
28 #include <QMessageBox>
39 mMessageBar->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed );
40 verticalLayout->insertWidget( 0, mMessageBar );
51 mPlacementVersionComboBox->setCurrentIndex( mPlacementVersionComboBox->findData( mPreviousEngineVersion ) );
52 connect( mPlacementVersionComboBox, &QComboBox::currentTextChanged,
this, [ = ]()
56 mMessageBar->pushMessage( QString(), tr(
"Version changes will alter label placement in the project." ), Qgis::Warning, 0 );
60 spinCandLine->setClearValue( 5 );
61 spinCandPolygon->setClearValue( 2.5 );
73 mUnplacedColorButton->setAllowOpacity(
false );
74 mUnplacedColorButton->setDefaultColor( QColor( 255, 0, 0 ) );
75 mUnplacedColorButton->setWindowTitle( tr(
"Unplaced Label Color" ) );
77 mTextRenderFormatComboBox->setCurrentIndex( mTextRenderFormatComboBox->findData( engineSettings.
defaultTextRenderFormat() ) );
89 mWidgetMenu =
new QMenu(
this );
90 QAction *resetAction =
new QAction( tr(
"Restore Defaults" ),
this );
91 mWidgetMenu->addAction( resetAction );
93 QAction *helpAction =
new QAction(
QgsApplication::getThemeIcon( QStringLiteral(
"/mActionHelpContents.svg" ) ), tr(
"Help…" ),
this );
94 mWidgetMenu->addAction( helpAction );
105 return tr(
"Additional Options" );
134 spinCandLine->setValue( 5 );
135 spinCandPolygon->setValue( 10 );
136 chkShowCandidates->setChecked(
false );
137 chkShowAllLabels->setChecked(
false );
145 QgsHelp::openHelp( QStringLiteral(
"working_with_vector/vector_properties.html#setting-the-automated-placement-engine" ) );
156 setWindowTitle( mWidget->windowTitle() );
157 QVBoxLayout *vLayout =
new QVBoxLayout();
158 vLayout->addWidget( mWidget );
159 QDialogButtonBox *bbox =
new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults, Qt::Horizontal );
160 connect( bbox, &QDialogButtonBox::accepted,
this, &QDialog::accept );
161 connect( bbox, &QDialogButtonBox::rejected,
this, &QDialog::reject );
163 connect( bbox->button( QDialogButtonBox::RestoreDefaults ), &QAbstractButton::clicked,
165 vLayout->addWidget( bbox );
166 setLayout( vLayout );
168 setObjectName( QStringLiteral(
"QgsLabelSettingsWidgetDialog" ) );