Skip to content
Permalink
Browse files
Qt5 style connects
  • Loading branch information
nyalldawson committed Mar 30, 2017
1 parent 5bfc0a1 commit 78685e1a492e3c954d82942f1cafa0bb204fae79
Showing with 244 additions and 236 deletions.
  1. +13 −13 src/app/qgsoptions.cpp
  2. +2 −2 src/app/qgsprojectlayergroupdialog.cpp
  3. +13 −13 src/app/qgsprojectproperties.cpp
  4. +22 −22 src/app/qgsrasterlayerproperties.cpp
  5. +19 −19 src/app/qgsrulebasedlabelingwidget.cpp
  6. +1 −1 src/app/qgsselectbyformdialog.cpp
  7. +5 −5 src/app/qgssettingstree.cpp
  8. +7 −7 src/app/qgssnappingwidget.cpp
  9. +7 −7 src/app/qgsstatisticalsummarydockwidget.cpp
  10. +7 −7 src/app/qgsstatusbarcoordinateswidget.cpp
  11. +1 −1 src/app/qgsstatusbarmagnifierwidget.cpp
  12. +2 −2 src/app/qgstipgui.cpp
  13. +5 −5 src/app/qgsundowidget.cpp
  14. +17 −16 src/app/qgsvectorlayerproperties.cpp
  15. +1 −1 src/app/qgsversioninfo.cpp
  16. +2 −2 src/app/qgswelcomepage.cpp
  17. +2 −2 src/gui/editorwidgets/qgscheckboxconfigdlg.cpp
  18. +1 −1 src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.cpp
  19. +2 −2 src/gui/editorwidgets/qgscheckboxwidgetwrapper.cpp
  20. +2 −1 src/gui/editorwidgets/qgsclassificationwidgetwrapper.cpp
  21. +1 −1 src/gui/editorwidgets/qgscolorwidgetwrapper.cpp
  22. +2 −2 src/gui/editorwidgets/qgsdatetimeedit.cpp
  23. +11 −11 src/gui/editorwidgets/qgsdatetimeeditconfig.cpp
  24. +2 −2 src/gui/editorwidgets/qgsdatetimeeditwrapper.cpp
  25. +1 −1 src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.cpp
  26. +4 −4 src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.cpp
  27. +2 −2 src/gui/editorwidgets/qgsdoublespinbox.cpp
  28. +2 −1 src/gui/editorwidgets/qgsenumerationwidgetwrapper.cpp
  29. +2 −2 src/gui/editorwidgets/qgsexternalresourceconfigdlg.cpp
  30. +1 −1 src/gui/editorwidgets/qgsexternalresourcewidgetwrapper.cpp
  31. +1 −1 src/gui/editorwidgets/qgskeyvaluewidgetwrapper.cpp
  32. +1 −1 src/gui/editorwidgets/qgslistwidgetwrapper.cpp
  33. +3 −3 src/gui/editorwidgets/qgsmultiedittoolbutton.cpp
  34. +11 −11 src/gui/editorwidgets/qgsrangeconfigdlg.cpp
  35. +2 −1 src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
  36. +12 −12 src/gui/editorwidgets/qgsrelationreferenceconfigdlg.cpp
  37. +1 −1 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.cpp
  38. +13 −13 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
  39. +1 −1 src/gui/editorwidgets/qgsrelationreferencewidgetwrapper.cpp
  40. +4 −4 src/gui/editorwidgets/qgssearchwidgettoolbutton.cpp
  41. +2 −2 src/gui/editorwidgets/qgsspinbox.cpp
  42. +2 −2 src/gui/editorwidgets/qgstexteditconfigdlg.cpp
  43. +4 −4 src/gui/editorwidgets/qgstexteditwrapper.cpp
  44. +1 −1 src/gui/editorwidgets/qgsuniquevaluesconfigdlg.cpp
  45. +4 −2 src/gui/editorwidgets/qgsuniquevaluewidgetwrapper.cpp
  46. +5 −5 src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
  47. +1 −1 src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp
  48. +2 −1 src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp
  49. +9 −9 src/gui/editorwidgets/qgsvaluerelationconfigdlg.cpp
  50. +3 −3 src/gui/editorwidgets/qgsvaluerelationsearchwidgetwrapper.cpp
  51. +3 −2 src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
@@ -91,22 +91,22 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
mStyleSheetNewOpts = mStyleSheetBuilder->defaultOptions();
mStyleSheetOldOpts = QMap<QString, QVariant>( mStyleSheetNewOpts );

connect( mFontFamilyRadioCustom, SIGNAL( toggled( bool ) ), mFontFamilyComboBox, SLOT( setEnabled( bool ) ) );
connect( mFontFamilyRadioCustom, &QAbstractButton::toggled, mFontFamilyComboBox, &QWidget::setEnabled );

connect( cmbIconSize, SIGNAL( activated( const QString & ) ), this, SLOT( iconSizeChanged( const QString & ) ) );
connect( cmbIconSize, SIGNAL( highlighted( const QString & ) ), this, SLOT( iconSizeChanged( const QString & ) ) );
connect( cmbIconSize, SIGNAL( editTextChanged( const QString & ) ), this, SLOT( iconSizeChanged( const QString & ) ) );
connect( cmbIconSize, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::activated ), this, &QgsOptions::iconSizeChanged );
connect( cmbIconSize, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::highlighted ), this, &QgsOptions::iconSizeChanged );
connect( cmbIconSize, &QComboBox::editTextChanged, this, &QgsOptions::iconSizeChanged );

connect( this, SIGNAL( accepted() ), this, SLOT( saveOptions() ) );
connect( this, SIGNAL( rejected() ), this, SLOT( rejectOptions() ) );
connect( this, &QDialog::accepted, this, &QgsOptions::saveOptions );
connect( this, &QDialog::rejected, this, &QgsOptions::rejectOptions );

QStringList styles = QStyleFactory::keys();
cmbStyle->addItems( styles );

QStringList themes = QgsApplication::uiThemes().keys();
cmbUITheme->addItems( themes );

connect( cmbUITheme, SIGNAL( currentIndexChanged( const QString & ) ), this, SLOT( uiThemeChanged( const QString & ) ) );
connect( cmbUITheme, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &QgsOptions::uiThemeChanged );

mIdentifyHighlightColorButton->setColorDialogTitle( tr( "Identify highlight color" ) );
mIdentifyHighlightColorButton->setAllowAlpha( true );
@@ -726,16 +726,16 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
addScaleToScaleList( scale );
}
}
connect( mListGlobalScales, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( scaleItemChanged( QListWidgetItem * ) ) );
connect( mListGlobalScales, &QListWidget::itemChanged, this, &QgsOptions::scaleItemChanged );

//
// Color palette
//
connect( mButtonCopyColors, SIGNAL( clicked() ), mTreeCustomColors, SLOT( copyColors() ) );
connect( mButtonRemoveColor, SIGNAL( clicked() ), mTreeCustomColors, SLOT( removeSelection() ) );
connect( mButtonPasteColors, SIGNAL( clicked() ), mTreeCustomColors, SLOT( pasteColors() ) );
connect( mButtonImportColors, SIGNAL( clicked( bool ) ), mTreeCustomColors, SLOT( showImportColorsDialog() ) );
connect( mButtonExportColors, SIGNAL( clicked( bool ) ), mTreeCustomColors, SLOT( showExportColorsDialog() ) );
connect( mButtonCopyColors, &QAbstractButton::clicked, mTreeCustomColors, &QgsColorSchemeList::copyColors );
connect( mButtonRemoveColor, &QAbstractButton::clicked, mTreeCustomColors, &QgsColorSchemeList::removeSelection );
connect( mButtonPasteColors, &QAbstractButton::clicked, mTreeCustomColors, &QgsColorSchemeList::pasteColors );
connect( mButtonImportColors, &QAbstractButton::clicked, mTreeCustomColors, &QgsColorSchemeList::showImportColorsDialog );
connect( mButtonExportColors, &QAbstractButton::clicked, mTreeCustomColors, &QgsColorSchemeList::showExportColorsDialog );

//find custom color scheme from registry
QList<QgsCustomColorScheme *> customSchemes;
@@ -46,7 +46,7 @@ QgsProjectLayerGroupDialog::QgsProjectLayerGroupDialog( QWidget *parent, const Q
changeProjectFile();
}

QObject::connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
connect( mButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
}

QgsProjectLayerGroupDialog::~QgsProjectLayerGroupDialog()
@@ -180,7 +180,7 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
QgsLayerTreeModel *model = new QgsLayerTreeModel( mRootGroup, this );
mTreeView->setModel( model );

QObject::connect( mTreeView->selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ), this, SLOT( onTreeViewSelectionChanged() ) );
connect( mTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsProjectLayerGroupDialog::onTreeViewSelectionChanged );

mProjectPath = mProjectFileLineEdit->text();
}
@@ -108,17 +108,17 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa

projectionSelector->setShowNoProjection( true );

connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );
connect( this, SIGNAL( accepted() ), this, SLOT( apply() ) );
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsProjectProperties::apply );
connect( this, &QDialog::accepted, this, &QgsProjectProperties::apply );
connect( projectionSelector, &QgsProjectionSelectionTreeWidget::crsSelected, this, &QgsProjectProperties::srIdUpdated );
connect( projectionSelector, &QgsProjectionSelectionTreeWidget::initialized, this, &QgsProjectProperties::projectionSelectorInitialized );

connect( cmbEllipsoid, SIGNAL( currentIndexChanged( int ) ), this, SLOT( updateEllipsoidUI( int ) ) );
connect( cmbEllipsoid, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsProjectProperties::updateEllipsoidUI );

connect( radAutomatic, SIGNAL( toggled( bool ) ), spinBoxDP, SLOT( setDisabled( bool ) ) );
connect( radAutomatic, SIGNAL( toggled( bool ) ), labelDP, SLOT( setDisabled( bool ) ) );
connect( radManual, SIGNAL( toggled( bool ) ), spinBoxDP, SLOT( setEnabled( bool ) ) );
connect( radManual, SIGNAL( toggled( bool ) ), labelDP, SLOT( setEnabled( bool ) ) );
connect( radAutomatic, &QAbstractButton::toggled, spinBoxDP, &QWidget::setDisabled );
connect( radAutomatic, &QAbstractButton::toggled, labelDP, &QWidget::setDisabled );
connect( radManual, &QAbstractButton::toggled, spinBoxDP, &QWidget::setEnabled );
connect( radManual, &QAbstractButton::toggled, labelDP, &QWidget::setEnabled );

QgsSettings settings;

@@ -233,7 +233,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
addScaleToScaleList( scale );
}
}
connect( lstScales, SIGNAL( itemChanged( QListWidgetItem * ) ), this, SLOT( scaleItemChanged( QListWidgetItem * ) ) );
connect( lstScales, &QListWidget::itemChanged, this, &QgsProjectProperties::scaleItemChanged );

grpProjectScales->setChecked( QgsProject::instance()->readBoolEntry( QStringLiteral( "Scales" ), QStringLiteral( "/useProjectScales" ) ) );

@@ -657,11 +657,11 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
populateStyles();

// Color palette
connect( mButtonCopyColors, SIGNAL( clicked() ), mTreeProjectColors, SLOT( copyColors() ) );
connect( mButtonRemoveColor, SIGNAL( clicked() ), mTreeProjectColors, SLOT( removeSelection() ) );
connect( mButtonPasteColors, SIGNAL( clicked() ), mTreeProjectColors, SLOT( pasteColors() ) );
connect( mButtonImportColors, SIGNAL( clicked( bool ) ), mTreeProjectColors, SLOT( showImportColorsDialog() ) );
connect( mButtonExportColors, SIGNAL( clicked( bool ) ), mTreeProjectColors, SLOT( showExportColorsDialog() ) );
connect( mButtonCopyColors, &QAbstractButton::clicked, mTreeProjectColors, &QgsColorSchemeList::copyColors );
connect( mButtonRemoveColor, &QAbstractButton::clicked, mTreeProjectColors, &QgsColorSchemeList::removeSelection );
connect( mButtonPasteColors, &QAbstractButton::clicked, mTreeProjectColors, &QgsColorSchemeList::pasteColors );
connect( mButtonImportColors, &QAbstractButton::clicked, mTreeProjectColors, &QgsColorSchemeList::showImportColorsDialog );
connect( mButtonExportColors, &QAbstractButton::clicked, mTreeProjectColors, &QgsColorSchemeList::showExportColorsDialog );

QList<QgsProjectColorScheme *> projectSchemes;
QgsApplication::colorSchemeRegistry()->schemes( projectSchemes );
@@ -100,43 +100,43 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanv
m->addAction( tr( "Save as Default" ), this, SLOT( saveDefaultStyle_clicked() ) );
m->addAction( tr( "Restore Default" ), this, SLOT( loadDefaultStyle_clicked() ) );
b->setMenu( m );
connect( m, SIGNAL( aboutToShow() ), this, SLOT( aboutToShowStyleMenu() ) );
connect( m, &QMenu::aboutToShow, this, &QgsRasterLayerProperties::aboutToShowStyleMenu );
buttonBox->addButton( b, QDialogButtonBox::ResetRole );

connect( lyr->styleManager(), SIGNAL( currentStyleChanged( QString ) ), this, SLOT( syncToLayer() ) );
connect( lyr->styleManager(), &QgsMapLayerStyleManager::currentStyleChanged, this, &QgsRasterLayerProperties::syncToLayer );

connect( this, SIGNAL( accepted() ), this, SLOT( apply() ) );
connect( this, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
connect( this, &QDialog::accepted, this, &QgsRasterLayerProperties::apply );
connect( this, &QDialog::rejected, this, &QgsRasterLayerProperties::onCancel );

connect( buttonBox->button( QDialogButtonBox::Apply ), SIGNAL( clicked() ), this, SLOT( apply() ) );
connect( buttonBox->button( QDialogButtonBox::Apply ), &QAbstractButton::clicked, this, &QgsRasterLayerProperties::apply );

connect( mOptionsStackedWidget, SIGNAL( currentChanged( int ) ), this, SLOT( mOptionsStackedWidget_CurrentChanged( int ) ) );
connect( mOptionsStackedWidget, &QStackedWidget::currentChanged, this, &QgsRasterLayerProperties::mOptionsStackedWidget_CurrentChanged );

connect( sliderTransparency, SIGNAL( valueChanged( int ) ), this, SLOT( sliderTransparency_valueChanged( int ) ) );
connect( sliderTransparency, &QAbstractSlider::valueChanged, this, &QgsRasterLayerProperties::sliderTransparency_valueChanged );

// brightness/contrast controls
connect( mSliderBrightness, SIGNAL( valueChanged( int ) ), mBrightnessSpinBox, SLOT( setValue( int ) ) );
connect( mBrightnessSpinBox, SIGNAL( valueChanged( int ) ), mSliderBrightness, SLOT( setValue( int ) ) );
connect( mSliderBrightness, &QAbstractSlider::valueChanged, mBrightnessSpinBox, &QSpinBox::setValue );
connect( mBrightnessSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mSliderBrightness, &QAbstractSlider::setValue );

connect( mSliderContrast, SIGNAL( valueChanged( int ) ), mContrastSpinBox, SLOT( setValue( int ) ) );
connect( mContrastSpinBox, SIGNAL( valueChanged( int ) ), mSliderContrast, SLOT( setValue( int ) ) );
connect( mSliderContrast, &QAbstractSlider::valueChanged, mContrastSpinBox, &QSpinBox::setValue );
connect( mContrastSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mSliderContrast, &QAbstractSlider::setValue );

// Connect saturation slider and spin box
connect( sliderSaturation, SIGNAL( valueChanged( int ) ), spinBoxSaturation, SLOT( setValue( int ) ) );
connect( spinBoxSaturation, SIGNAL( valueChanged( int ) ), sliderSaturation, SLOT( setValue( int ) ) );
connect( sliderSaturation, &QAbstractSlider::valueChanged, spinBoxSaturation, &QSpinBox::setValue );
connect( spinBoxSaturation, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), sliderSaturation, &QAbstractSlider::setValue );

// Connect colorize strength slider and spin box
connect( sliderColorizeStrength, SIGNAL( valueChanged( int ) ), spinColorizeStrength, SLOT( setValue( int ) ) );
connect( spinColorizeStrength, SIGNAL( valueChanged( int ) ), sliderColorizeStrength, SLOT( setValue( int ) ) );
connect( sliderColorizeStrength, &QAbstractSlider::valueChanged, spinColorizeStrength, &QSpinBox::setValue );
connect( spinColorizeStrength, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), sliderColorizeStrength, &QAbstractSlider::setValue );

// enable or disable saturation slider and spin box depending on grayscale combo choice
connect( comboGrayscale, SIGNAL( currentIndexChanged( int ) ), this, SLOT( toggleSaturationControls( int ) ) );
connect( comboGrayscale, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRasterLayerProperties::toggleSaturationControls );

// enable or disable colorize colorbutton with colorize checkbox
connect( mColorizeCheck, SIGNAL( toggled( bool ) ), this, SLOT( toggleColorizeControls( bool ) ) );
connect( mColorizeCheck, &QAbstractButton::toggled, this, &QgsRasterLayerProperties::toggleColorizeControls );

// enable or disable Build Pyramids button depending on selection in pyramid list
connect( lbxPyramidResolutions, SIGNAL( itemSelectionChanged() ), this, SLOT( toggleBuildPyramidsButton() ) );
connect( lbxPyramidResolutions, &QListWidget::itemSelectionChanged, this, &QgsRasterLayerProperties::toggleBuildPyramidsButton );

connect( mRefreshLayerCheckBox, &QCheckBox::toggled, mRefreshLayerIntervalSpinBox, &QDoubleSpinBox::setEnabled );

@@ -162,7 +162,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanv
if ( mMapCanvas )
{
mPixelSelectorTool = new QgsMapToolEmitPoint( canvas );
connect( mPixelSelectorTool, SIGNAL( canvasClicked( const QgsPoint &, Qt::MouseButton ) ), this, SLOT( pixelSelected( const QgsPoint & ) ) );
connect( mPixelSelectorTool, &QgsMapToolEmitPoint::canvasClicked, this, &QgsRasterLayerProperties::pixelSelected );
}
else
{
@@ -1028,7 +1028,7 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
{
QgsRasterDataProvider *provider = mRasterLayer->dataProvider();

connect( provider, SIGNAL( progressUpdate( int ) ), mPyramidProgress, SLOT( setValue( int ) ) );
connect( provider, &QgsRasterDataProvider::progressUpdate, mPyramidProgress, &QProgressBar::setValue );
//
// Go through the list marking any files that are selected in the listview
// as true so that we can generate pyramids for them.
@@ -1060,7 +1060,7 @@ void QgsRasterLayerProperties::on_buttonBuildPyramids_clicked()
QApplication::restoreOverrideCursor();
mPyramidProgress->setValue( 0 );
buttonBuildPyramids->setEnabled( false );
disconnect( provider, SIGNAL( progressUpdate( int ) ), mPyramidProgress, SLOT( setValue( int ) ) );
disconnect( provider, &QgsRasterDataProvider::progressUpdate, mPyramidProgress, &QProgressBar::setValue );
if ( !res.isNull() )
{
if ( res == QLatin1String( "ERROR_WRITE_ACCESS" ) )
@@ -1260,7 +1260,7 @@ void QgsRasterLayerProperties::setTransparencyCell( int row, int column, double

if ( nBands == 1 && ( column == 0 || column == 1 ) )
{
connect( lineEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( transparencyCellTextEdited( const QString & ) ) );
connect( lineEdit, &QLineEdit::textEdited, this, &QgsRasterLayerProperties::transparencyCellTextEdited );
}
tableTransparency->resizeColumnsToContents();
}
@@ -73,14 +73,14 @@ QgsRuleBasedLabelingWidget::QgsRuleBasedLabelingWidget( QgsVectorLayer *layer, Q
viewRules->addAction( mCopyAction );
viewRules->addAction( mPasteAction );

connect( viewRules, SIGNAL( doubleClicked( const QModelIndex & ) ), this, SLOT( editRule( const QModelIndex & ) ) );
connect( viewRules, &QAbstractItemView::doubleClicked, this, static_cast<void ( QgsRuleBasedLabelingWidget::* )( const QModelIndex & )>( &QgsRuleBasedLabelingWidget::editRule ) );

connect( btnAddRule, SIGNAL( clicked() ), this, SLOT( addRule() ) );
connect( btnEditRule, SIGNAL( clicked() ), this, SLOT( editRule() ) );
connect( btnRemoveRule, SIGNAL( clicked() ), this, SLOT( removeRule() ) );
connect( mCopyAction, SIGNAL( triggered( bool ) ), this, SLOT( copy() ) );
connect( mPasteAction, SIGNAL( triggered( bool ) ), this, SLOT( paste() ) );
connect( mDeleteAction, SIGNAL( triggered( bool ) ), this, SLOT( removeRule() ) );
connect( btnAddRule, &QAbstractButton::clicked, this, &QgsRuleBasedLabelingWidget::addRule );
connect( btnEditRule, &QAbstractButton::clicked, this, static_cast<void ( QgsRuleBasedLabelingWidget::* )()>( &QgsRuleBasedLabelingWidget::editRule ) );
connect( btnRemoveRule, &QAbstractButton::clicked, this, &QgsRuleBasedLabelingWidget::removeRule );
connect( mCopyAction, &QAction::triggered, this, &QgsRuleBasedLabelingWidget::copy );
connect( mPasteAction, &QAction::triggered, this, &QgsRuleBasedLabelingWidget::paste );
connect( mDeleteAction, &QAction::triggered, this, &QgsRuleBasedLabelingWidget::removeRule );

if ( mLayer->labeling() && mLayer->labeling()->type() == QLatin1String( "rule-based" ) )
{
@@ -95,9 +95,9 @@ QgsRuleBasedLabelingWidget::QgsRuleBasedLabelingWidget( QgsVectorLayer *layer, Q
mModel = new QgsRuleBasedLabelingModel( mRootRule );
viewRules->setModel( mModel );

connect( mModel, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), this, SIGNAL( widgetChanged() ) );
connect( mModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SIGNAL( widgetChanged() ) );
connect( mModel, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SIGNAL( widgetChanged() ) );
connect( mModel, &QAbstractItemModel::dataChanged, this, &QgsRuleBasedLabelingWidget::widgetChanged );
connect( mModel, &QAbstractItemModel::rowsInserted, this, &QgsRuleBasedLabelingWidget::widgetChanged );
connect( mModel, &QAbstractItemModel::rowsRemoved, this, &QgsRuleBasedLabelingWidget::widgetChanged );
}

QgsRuleBasedLabelingWidget::~QgsRuleBasedLabelingWidget()
@@ -168,7 +168,7 @@ void QgsRuleBasedLabelingWidget::editRule( const QModelIndex &index )
QgsLabelingRulePropsWidget *widget = new QgsLabelingRulePropsWidget( rule, mLayer, this, mCanvas );
widget->setPanelTitle( tr( "Edit rule" ) );
connect( widget, &QgsPanelWidget::panelAccepted, this, &QgsRuleBasedLabelingWidget::ruleWidgetPanelAccepted );
connect( widget, SIGNAL( widgetChanged() ), this, SLOT( liveUpdateRuleFromPanel() ) );
connect( widget, &QgsLabelingRulePropsWidget::widgetChanged, this, &QgsRuleBasedLabelingWidget::liveUpdateRuleFromPanel );
openPanel( widget );
}

@@ -635,14 +635,14 @@ QgsLabelingRulePropsWidget::QgsLabelingRulePropsWidget( QgsRuleBasedLabeling::Ru
mLabelingGui->setLabelMode( QgsLabelingGui::Labels );
mLabelingGui->setLayer( mLayer );

connect( btnExpressionBuilder, SIGNAL( clicked() ), this, SLOT( buildExpression() ) );
connect( btnTestFilter, SIGNAL( clicked() ), this, SLOT( testFilter() ) );
connect( editFilter, SIGNAL( textEdited( QString ) ), this, SIGNAL( widgetChanged() ) );
connect( editDescription, SIGNAL( textChanged( QString ) ), this, SIGNAL( widgetChanged() ) );
connect( groupScale, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
connect( mScaleRangeWidget, SIGNAL( rangeChanged( double, double ) ), this, SIGNAL( widgetChanged() ) );
connect( groupSettings, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
connect( mLabelingGui, SIGNAL( widgetChanged() ), this, SIGNAL( widgetChanged() ) );
connect( btnExpressionBuilder, &QAbstractButton::clicked, this, &QgsLabelingRulePropsWidget::buildExpression );
connect( btnTestFilter, &QAbstractButton::clicked, this, &QgsLabelingRulePropsWidget::testFilter );
connect( editFilter, &QLineEdit::textEdited, this, &QgsLabelingRulePropsWidget::widgetChanged );
connect( editDescription, &QLineEdit::textChanged, this, &QgsLabelingRulePropsWidget::widgetChanged );
connect( groupScale, &QGroupBox::toggled, this, &QgsLabelingRulePropsWidget::widgetChanged );
connect( mScaleRangeWidget, &QgsScaleRangeWidget::rangeChanged, this, &QgsLabelingRulePropsWidget::widgetChanged );
connect( groupSettings, &QGroupBox::toggled, this, &QgsLabelingRulePropsWidget::widgetChanged );
connect( mLabelingGui, &QgsTextFormatWidget::widgetChanged, this, &QgsLabelingRulePropsWidget::widgetChanged );
}

QgsLabelingRulePropsWidget::~QgsLabelingRulePropsWidget()

0 comments on commit 78685e1

Please sign in to comment.