mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Complete daily allocation of Qt5 connect transitions
This commit is contained in:
parent
86563c8024
commit
ae59e35dac
@ -940,6 +940,11 @@ QgsDiagramSettings {#qgis_api_break_3_0_QgsDiagramSettings}
|
||||
|
||||
- The SizeType enum was removed. Use QgsUnitTypes.RenderUnit instead.
|
||||
|
||||
QgsDial {#qgis_api_break_3_0_QgsDial}
|
||||
-------
|
||||
|
||||
- The protected valueChanged slot was removed.
|
||||
|
||||
|
||||
QgsDistanceArea {#qgis_api_break_3_0_QgsDistanceArea}
|
||||
---------------
|
||||
@ -1819,6 +1824,11 @@ QgsSingleSymbolRendererWidget {#qgis_api_break_3_0_QgsSingleSymbolRendere
|
||||
- sizeScaleFieldChanged() and scaleMethodChanged() were removed. These settings are no longer exposed in the widget's GUI.
|
||||
- The Mode enum was removed.
|
||||
|
||||
QgsSlider {#qgis_api_break_3_0_QgsSlider}
|
||||
---------
|
||||
|
||||
- The protected valueChanged slot was removed.
|
||||
|
||||
|
||||
QgsSnapper {#qgis_api_break_3_0_QgsSnapper}
|
||||
----------
|
||||
|
@ -15,8 +15,6 @@ class QgsDial: QDial
|
||||
signals:
|
||||
void valueChanged( const QVariant& );
|
||||
|
||||
protected slots:
|
||||
void valueChanged( int );
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * event );
|
||||
|
@ -16,8 +16,6 @@ class QgsSlider : QSlider
|
||||
signals:
|
||||
void valueChanged( const QVariant& );
|
||||
|
||||
protected slots:
|
||||
void valueChanged( int );
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * event );
|
||||
|
@ -63,7 +63,7 @@ QgsColorButton::QgsColorButton( QWidget *parent, const QString &cdt, QgsColorSch
|
||||
|
||||
//setup dropdown menu
|
||||
mMenu = new QMenu( this );
|
||||
connect( mMenu, SIGNAL( aboutToShow() ), this, SLOT( prepareMenu() ) );
|
||||
connect( mMenu, &QMenu::aboutToShow, this, &QgsColorButton::prepareMenu );
|
||||
setMenu( mMenu );
|
||||
setPopupMode( QToolButton::MenuButtonPopup );
|
||||
}
|
||||
@ -103,7 +103,7 @@ void QgsColorButton::showColorDialog()
|
||||
colorWidget->setPreviousColor( currentColor );
|
||||
}
|
||||
|
||||
connect( colorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SLOT( setValidTemporaryColor( QColor ) ) );
|
||||
connect( colorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsColorButton::setValidTemporaryColor );
|
||||
panel->openPanel( colorWidget );
|
||||
return;
|
||||
}
|
||||
@ -433,7 +433,7 @@ void QgsColorButton::prepareMenu()
|
||||
QAction *nullAction = new QAction( tr( "Clear color" ), this );
|
||||
nullAction->setIcon( createMenuIcon( Qt::transparent, false ) );
|
||||
mMenu->addAction( nullAction );
|
||||
connect( nullAction, SIGNAL( triggered() ), this, SLOT( setToNull() ) );
|
||||
connect( nullAction, &QAction::triggered, this, &QgsColorButton::setToNull );
|
||||
}
|
||||
|
||||
//show default color option if set
|
||||
@ -442,7 +442,7 @@ void QgsColorButton::prepareMenu()
|
||||
QAction *defaultColorAction = new QAction( tr( "Default color" ), this );
|
||||
defaultColorAction->setIcon( createMenuIcon( mDefaultColor ) );
|
||||
mMenu->addAction( defaultColorAction );
|
||||
connect( defaultColorAction, SIGNAL( triggered() ), this, SLOT( setToDefaultColor() ) );
|
||||
connect( defaultColorAction, &QAction::triggered, this, &QgsColorButton::setToDefaultColor );
|
||||
}
|
||||
|
||||
if ( mShowNoColorOption && mAllowAlpha )
|
||||
@ -450,7 +450,7 @@ void QgsColorButton::prepareMenu()
|
||||
QAction *noColorAction = new QAction( mNoColorString, this );
|
||||
noColorAction->setIcon( createMenuIcon( Qt::transparent, false ) );
|
||||
mMenu->addAction( noColorAction );
|
||||
connect( noColorAction, SIGNAL( triggered() ), this, SLOT( setToNoColor() ) );
|
||||
connect( noColorAction, &QAction::triggered, this, &QgsColorButton::setToNoColor );
|
||||
}
|
||||
|
||||
mMenu->addSeparator();
|
||||
@ -484,8 +484,8 @@ void QgsColorButton::prepareMenu()
|
||||
QgsColorSwatchGridAction *colorAction = new QgsColorSwatchGridAction( *it, mMenu, mContext, this );
|
||||
colorAction->setBaseColor( mColor );
|
||||
mMenu->addAction( colorAction );
|
||||
connect( colorAction, SIGNAL( colorChanged( const QColor & ) ), this, SLOT( setValidColor( const QColor & ) ) );
|
||||
connect( colorAction, SIGNAL( colorChanged( const QColor & ) ), this, SLOT( addRecentColor( const QColor & ) ) );
|
||||
connect( colorAction, &QgsColorSwatchGridAction::colorChanged, this, &QgsColorButton::setValidColor );
|
||||
connect( colorAction, &QgsColorSwatchGridAction::colorChanged, this, &QgsColorButton::addRecentColor );
|
||||
}
|
||||
}
|
||||
|
||||
@ -493,7 +493,7 @@ void QgsColorButton::prepareMenu()
|
||||
|
||||
QAction *copyColorAction = new QAction( tr( "Copy color" ), this );
|
||||
mMenu->addAction( copyColorAction );
|
||||
connect( copyColorAction, SIGNAL( triggered() ), this, SLOT( copyColor() ) );
|
||||
connect( copyColorAction, &QAction::triggered, this, &QgsColorButton::copyColor );
|
||||
|
||||
QAction *pasteColorAction = new QAction( tr( "Paste color" ), this );
|
||||
//enable or disable paste action based on current clipboard contents. We always show the paste
|
||||
@ -508,7 +508,7 @@ void QgsColorButton::prepareMenu()
|
||||
pasteColorAction->setEnabled( false );
|
||||
}
|
||||
mMenu->addAction( pasteColorAction );
|
||||
connect( pasteColorAction, SIGNAL( triggered() ), this, SLOT( pasteColor() ) );
|
||||
connect( pasteColorAction, &QAction::triggered, this, &QgsColorButton::pasteColor );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
//disabled for OSX, as it is impossible to grab the mouse under OSX
|
||||
@ -516,11 +516,11 @@ void QgsColorButton::prepareMenu()
|
||||
//http://qt-project.org/doc/qt-4.8/qwidget.html#grabMouse
|
||||
QAction *pickColorAction = new QAction( tr( "Pick color" ), this );
|
||||
mMenu->addAction( pickColorAction );
|
||||
connect( pickColorAction, SIGNAL( triggered() ), this, SLOT( activatePicker() ) );
|
||||
connect( pickColorAction, &QAction::triggered, this, &QgsColorButton::activatePicker );
|
||||
#endif
|
||||
QAction *chooseColorAction = new QAction( tr( "Choose color..." ), this );
|
||||
mMenu->addAction( chooseColorAction );
|
||||
connect( chooseColorAction, SIGNAL( triggered() ), this, SLOT( showColorDialog() ) );
|
||||
connect( chooseColorAction, &QAction::triggered, this, &QgsColorButton::showColorDialog );
|
||||
}
|
||||
|
||||
void QgsColorButton::changeEvent( QEvent *e )
|
||||
|
@ -55,8 +55,8 @@ QgsColorDialog::QgsColorDialog( QWidget *parent, Qt::WindowFlags fl, const QColo
|
||||
|
||||
mColorWidget->setAllowAlpha( true );
|
||||
|
||||
connect( mColorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SIGNAL( currentColorChanged( QColor ) ) );
|
||||
connect( this, SIGNAL( rejected() ), this, SLOT( discardColor() ) );
|
||||
connect( mColorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsColorDialog::currentColorChanged );
|
||||
connect( this, &QDialog::rejected, this, &QgsColorDialog::discardColor );
|
||||
}
|
||||
|
||||
QColor QgsColorDialog::color() const
|
||||
|
@ -763,7 +763,7 @@ bool QgsColorSwatchDelegate::editorEvent( QEvent *event, QAbstractItemModel *mod
|
||||
colorWidget->setPanelTitle( tr( "Select color" ) );
|
||||
colorWidget->setAllowAlpha( true );
|
||||
colorWidget->setProperty( "index", index );
|
||||
connect( colorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SLOT( colorChanged() ) );
|
||||
connect( colorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsColorSwatchDelegate::colorChanged );
|
||||
panel->openPanel( colorWidget );
|
||||
return true;
|
||||
}
|
||||
|
@ -362,10 +362,10 @@ QgsColorSwatchGridAction::QgsColorSwatchGridAction( QgsColorScheme *scheme, QMen
|
||||
mColorSwatchGrid = new QgsColorSwatchGrid( scheme, context, parent );
|
||||
|
||||
setDefaultWidget( mColorSwatchGrid );
|
||||
connect( mColorSwatchGrid, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorSwatchGrid, &QgsColorSwatchGrid::colorChanged, this, &QgsColorSwatchGridAction::setColor );
|
||||
|
||||
connect( this, SIGNAL( hovered() ), this, SLOT( onHover() ) );
|
||||
connect( mColorSwatchGrid, SIGNAL( hovered() ), this, SLOT( onHover() ) );
|
||||
connect( this, &QAction::hovered, this, &QgsColorSwatchGridAction::onHover );
|
||||
connect( mColorSwatchGrid, &QgsColorSwatchGrid::hovered, this, &QgsColorSwatchGridAction::onHover );
|
||||
|
||||
//hide the action if no colors to be shown
|
||||
setVisible( !mColorSwatchGrid->colors()->isEmpty() );
|
||||
|
@ -1297,9 +1297,9 @@ QgsColorSliderWidget::QgsColorSliderWidget( QWidget *parent, const ColorComponen
|
||||
hLayout->addWidget( mSpinBox );
|
||||
setLayout( hLayout );
|
||||
|
||||
connect( mRampWidget, SIGNAL( valueChanged( int ) ), this, SLOT( rampChanged( int ) ) );
|
||||
connect( mRampWidget, SIGNAL( colorChanged( const QColor ) ), this, SLOT( rampColorChanged( const QColor ) ) );
|
||||
connect( mSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( spinChanged( int ) ) );
|
||||
connect( mRampWidget, &QgsColorRampWidget::valueChanged, this, &QgsColorSliderWidget::rampChanged );
|
||||
connect( mRampWidget, &QgsColorWidget::colorChanged, this, &QgsColorSliderWidget::rampColorChanged );
|
||||
connect( mSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsColorSliderWidget::spinChanged );
|
||||
}
|
||||
|
||||
void QgsColorSliderWidget::setComponent( const QgsColorWidget::ColorComponent component )
|
||||
@ -1419,8 +1419,8 @@ QgsColorTextWidget::QgsColorTextWidget( QWidget *parent )
|
||||
mLineEdit->setStyleSheet( QStringLiteral( "QLineEdit { padding-right: %1px; } " )
|
||||
.arg( mMenuButton->sizeHint().width() + frameWidth + 1 ) );
|
||||
|
||||
connect( mLineEdit, SIGNAL( editingFinished() ), this, SLOT( textChanged() ) );
|
||||
connect( mMenuButton, SIGNAL( clicked() ), this, SLOT( showMenu() ) );
|
||||
connect( mLineEdit, &QLineEdit::editingFinished, this, &QgsColorTextWidget::textChanged );
|
||||
connect( mMenuButton, &QAbstractButton::clicked, this, &QgsColorTextWidget::showMenu );
|
||||
|
||||
//restore format setting
|
||||
QgsSettings settings;
|
||||
@ -1691,10 +1691,10 @@ QgsColorWidgetAction::QgsColorWidgetAction( QgsColorWidget *colorWidget, QMenu *
|
||||
, mDismissOnColorSelection( true )
|
||||
{
|
||||
setDefaultWidget( mColorWidget );
|
||||
connect( mColorWidget, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorWidget, &QgsColorWidget::colorChanged, this, &QgsColorWidgetAction::setColor );
|
||||
|
||||
connect( this, SIGNAL( hovered() ), this, SLOT( onHover() ) );
|
||||
connect( mColorWidget, SIGNAL( hovered() ), this, SLOT( onHover() ) );
|
||||
connect( this, &QAction::hovered, this, &QgsColorWidgetAction::onHover );
|
||||
connect( mColorWidget, &QgsColorWidget::hovered, this, &QgsColorWidgetAction::onHover );
|
||||
}
|
||||
|
||||
void QgsColorWidgetAction::onHover()
|
||||
|
@ -23,17 +23,17 @@ QgsComposerItemComboBox::QgsComposerItemComboBox( QWidget *parent, QgsCompositio
|
||||
setComposition( composition );
|
||||
|
||||
setModelColumn( QgsComposerModel::ItemId );
|
||||
connect( this, SIGNAL( currentIndexChanged( int ) ), this, SLOT( indexChanged( int ) ) );
|
||||
connect( mProxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( mProxyModel, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( this, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsComposerItemComboBox::indexChanged );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsInserted, this, &QgsComposerItemComboBox::rowsChanged );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsRemoved, this, &QgsComposerItemComboBox::rowsChanged );
|
||||
}
|
||||
|
||||
void QgsComposerItemComboBox::setComposition( QgsComposition *composition )
|
||||
{
|
||||
delete mProxyModel;
|
||||
mProxyModel = new QgsComposerProxyModel( composition, this );
|
||||
connect( mProxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( mProxyModel, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsInserted, this, &QgsComposerItemComboBox::rowsChanged );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsRemoved, this, &QgsComposerItemComboBox::rowsChanged );
|
||||
setModel( mProxyModel );
|
||||
setModelColumn( QgsComposerModel::ItemId );
|
||||
mProxyModel->sort( 0, Qt::AscendingOrder );
|
||||
|
@ -73,18 +73,18 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor &c
|
||||
updateActionsForCurrentScheme();
|
||||
|
||||
//listen out for selection changes in list, so we can enable/disable the copy colors option
|
||||
connect( mSchemeList->selectionModel(), SIGNAL( selectionChanged( QItemSelection, QItemSelection ) ), this, SLOT( listSelectionChanged( QItemSelection, QItemSelection ) ) );
|
||||
connect( mSchemeList->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsCompoundColorWidget::listSelectionChanged );
|
||||
//copy action defaults to disabled
|
||||
mActionCopyColors->setEnabled( false );
|
||||
|
||||
connect( mActionCopyColors, SIGNAL( triggered() ), mSchemeList, SLOT( copyColors() ) );
|
||||
connect( mActionPasteColors, SIGNAL( triggered() ), mSchemeList, SLOT( pasteColors() ) );
|
||||
connect( mActionExportColors, SIGNAL( triggered() ), mSchemeList, SLOT( showExportColorsDialog() ) );
|
||||
connect( mActionImportColors, SIGNAL( triggered() ), mSchemeList, SLOT( showImportColorsDialog() ) );
|
||||
connect( mActionImportPalette, SIGNAL( triggered() ), this, SLOT( importPalette() ) );
|
||||
connect( mActionRemovePalette, SIGNAL( triggered() ), this, SLOT( removePalette() ) );
|
||||
connect( mActionNewPalette, SIGNAL( triggered() ), this, SLOT( newPalette() ) );
|
||||
connect( mRemoveColorsFromSchemeButton, SIGNAL( clicked() ), mSchemeList, SLOT( removeSelection() ) );
|
||||
connect( mActionCopyColors, &QAction::triggered, mSchemeList, &QgsColorSchemeList::copyColors );
|
||||
connect( mActionPasteColors, &QAction::triggered, mSchemeList, &QgsColorSchemeList::pasteColors );
|
||||
connect( mActionExportColors, &QAction::triggered, mSchemeList, &QgsColorSchemeList::showExportColorsDialog );
|
||||
connect( mActionImportColors, &QAction::triggered, mSchemeList, &QgsColorSchemeList::showImportColorsDialog );
|
||||
connect( mActionImportPalette, &QAction::triggered, this, &QgsCompoundColorWidget::importPalette );
|
||||
connect( mActionRemovePalette, &QAction::triggered, this, &QgsCompoundColorWidget::removePalette );
|
||||
connect( mActionNewPalette, &QAction::triggered, this, &QgsCompoundColorWidget::newPalette );
|
||||
connect( mRemoveColorsFromSchemeButton, &QAbstractButton::clicked, mSchemeList, &QgsColorSchemeList::removeSelection );
|
||||
|
||||
QMenu *schemeMenu = new QMenu( mSchemeToolButton );
|
||||
schemeMenu->addAction( mActionCopyColors );
|
||||
@ -99,8 +99,8 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor &c
|
||||
schemeMenu->addAction( mActionShowInButtons );
|
||||
mSchemeToolButton->setMenu( schemeMenu );
|
||||
|
||||
connect( mSchemeComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( schemeIndexChanged( int ) ) );
|
||||
connect( mSchemeList, SIGNAL( colorSelected( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSchemeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsCompoundColorWidget::schemeIndexChanged );
|
||||
connect( mSchemeList, &QgsColorSchemeList::colorSelected, this, &QgsCompoundColorWidget::setColor );
|
||||
|
||||
mOldColorLabel->hide();
|
||||
|
||||
@ -209,34 +209,34 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor &c
|
||||
#endif
|
||||
|
||||
//setup connections
|
||||
connect( mColorBox, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorWheel, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorText, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mVerticalRamp, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mRedSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mGreenSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mBlueSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mHueSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mValueSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSaturationSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mAlphaSlider, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorPreview, SIGNAL( colorChanged( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton1, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton2, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton3, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton4, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton5, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton6, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton7, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton8, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton9, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton10, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton11, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton12, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton13, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton14, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton15, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mSwatchButton16, SIGNAL( colorClicked( QColor ) ), this, SLOT( setColor( QColor ) ) );
|
||||
connect( mColorBox, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mColorWheel, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mColorText, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mVerticalRamp, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mRedSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mGreenSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mBlueSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mHueSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mValueSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSaturationSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mAlphaSlider, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mColorPreview, &QgsColorWidget::colorChanged, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton1, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton2, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton3, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton4, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton5, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton6, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton7, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton8, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton9, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton10, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton11, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton12, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton13, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton14, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton15, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
connect( mSwatchButton16, &QgsColorButton::colorClicked, this, &QgsCompoundColorWidget::setColor );
|
||||
}
|
||||
|
||||
QgsCompoundColorWidget::~QgsCompoundColorWidget()
|
||||
|
@ -40,14 +40,14 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget *parent, QgsSh
|
||||
if ( !mManager )
|
||||
mManager = QgsShortcutsManager::instance();
|
||||
|
||||
connect( btnChangeShortcut, SIGNAL( clicked() ), this, SLOT( changeShortcut() ) );
|
||||
connect( btnResetShortcut, SIGNAL( clicked() ), this, SLOT( resetShortcut() ) );
|
||||
connect( btnSetNoShortcut, SIGNAL( clicked() ), this, SLOT( setNoShortcut() ) );
|
||||
connect( btnSaveShortcuts, SIGNAL( clicked() ), this, SLOT( saveShortcuts() ) );
|
||||
connect( btnLoadShortcuts, SIGNAL( clicked() ), this, SLOT( loadShortcuts() ) );
|
||||
connect( btnChangeShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::changeShortcut );
|
||||
connect( btnResetShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::resetShortcut );
|
||||
connect( btnSetNoShortcut, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::setNoShortcut );
|
||||
connect( btnSaveShortcuts, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::saveShortcuts );
|
||||
connect( btnLoadShortcuts, &QAbstractButton::clicked, this, &QgsConfigureShortcutsDialog::loadShortcuts );
|
||||
|
||||
connect( treeActions, SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ),
|
||||
this, SLOT( actionChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
|
||||
connect( treeActions, &QTreeWidget::currentItemChanged,
|
||||
this, &QgsConfigureShortcutsDialog::actionChanged );
|
||||
|
||||
populateActions();
|
||||
|
||||
|
@ -35,11 +35,11 @@ QgsCredentialDialog::QgsCredentialDialog( QWidget *parent, Qt::WindowFlags fl )
|
||||
{
|
||||
setupUi( this );
|
||||
setInstance( this );
|
||||
connect( this, SIGNAL( credentialsRequested( QString, QString *, QString *, QString, bool * ) ),
|
||||
this, SLOT( requestCredentials( QString, QString *, QString *, QString, bool * ) ),
|
||||
connect( this, &QgsCredentialDialog::credentialsRequested,
|
||||
this, &QgsCredentialDialog::requestCredentials,
|
||||
Qt::BlockingQueuedConnection );
|
||||
connect( this, SIGNAL( credentialsRequestedMasterPassword( QString *, bool, bool * ) ),
|
||||
this, SLOT( requestCredentialsMasterPassword( QString *, bool, bool * ) ),
|
||||
connect( this, &QgsCredentialDialog::credentialsRequestedMasterPassword,
|
||||
this, &QgsCredentialDialog::requestCredentialsMasterPassword,
|
||||
Qt::BlockingQueuedConnection );
|
||||
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
|
||||
leMasterPass->setPlaceholderText( tr( "Required" ) );
|
||||
|
@ -100,7 +100,7 @@ void QgsDial::update()
|
||||
QDial::setValue( qCeil( ( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
|
||||
}
|
||||
|
||||
connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
|
||||
connect( this, static_cast < void ( QDial::* )( int ) > ( &QDial::valueChanged ), this, &QgsDial::onValueChanged );
|
||||
}
|
||||
|
||||
QVariant QgsDial::variantValue() const
|
||||
@ -108,7 +108,7 @@ QVariant QgsDial::variantValue() const
|
||||
return mValue;
|
||||
}
|
||||
|
||||
void QgsDial::valueChanged( int value )
|
||||
void QgsDial::onValueChanged( int value )
|
||||
{
|
||||
if ( mMin.isNull() || mMax.isNull() || mStep.isNull() )
|
||||
{
|
||||
|
@ -39,8 +39,8 @@ class GUI_EXPORT QgsDial : public QDial
|
||||
signals:
|
||||
void valueChanged( const QVariant & );
|
||||
|
||||
protected slots:
|
||||
void valueChanged( int );
|
||||
private slots:
|
||||
void onValueChanged( int );
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent *event ) override;
|
||||
|
@ -24,8 +24,8 @@ QgsDialog::QgsDialog( QWidget *parent, Qt::WindowFlags fl,
|
||||
{
|
||||
// create buttonbox
|
||||
mButtonBox = new QDialogButtonBox( buttons, orientation, this );
|
||||
connect( mButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( mButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( mButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
|
||||
// layout
|
||||
QLayout *layout = nullptr;
|
||||
|
@ -23,14 +23,14 @@ QgsDockWidget::QgsDockWidget( QWidget *parent, Qt::WindowFlags flags )
|
||||
: QDockWidget( parent, flags )
|
||||
, mVisibleAndActive( false )
|
||||
{
|
||||
connect( this, SIGNAL( visibilityChanged( bool ) ), this, SLOT( handleVisibilityChanged( bool ) ) );
|
||||
connect( this, &QDockWidget::visibilityChanged, this, &QgsDockWidget::handleVisibilityChanged );
|
||||
}
|
||||
|
||||
QgsDockWidget::QgsDockWidget( const QString &title, QWidget *parent, Qt::WindowFlags flags )
|
||||
: QDockWidget( title, parent, flags )
|
||||
, mVisibleAndActive( false )
|
||||
{
|
||||
connect( this, SIGNAL( visibilityChanged( bool ) ), this, SLOT( handleVisibilityChanged( bool ) ) );
|
||||
connect( this, &QDockWidget::visibilityChanged, this, &QgsDockWidget::handleVisibilityChanged );
|
||||
}
|
||||
|
||||
void QgsDockWidget::setUserVisible( bool visible )
|
||||
|
@ -66,7 +66,7 @@ QgsEncodingFileDialog::QgsEncodingFileDialog( QWidget *parent,
|
||||
selectNameFilter( nameFilters().at( 0 ) );
|
||||
|
||||
// Connect our slot to get a signal when the user is done with the file dialog
|
||||
connect( this, SIGNAL( accepted() ), this, SLOT( saveUsedEncoding() ) );
|
||||
connect( this, &QDialog::accepted, this, &QgsEncodingFileDialog::saveUsedEncoding );
|
||||
}
|
||||
|
||||
QString QgsEncodingFileDialog::encoding() const
|
||||
@ -87,7 +87,7 @@ void QgsEncodingFileDialog::addCancelAll()
|
||||
{
|
||||
mCancelAllButton = new QPushButton( tr( "Cancel &All" ), nullptr );
|
||||
layout()->addWidget( mCancelAllButton ); // Ownership transferred, no need to delete later on
|
||||
connect( mCancelAllButton, SIGNAL( clicked() ), this, SLOT( pbnCancelAll_clicked() ) );
|
||||
connect( mCancelAllButton, &QAbstractButton::clicked, this, &QgsEncodingFileDialog::pbnCancelAll_clicked );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ QgsExpressionLineEdit::QgsExpressionLineEdit( QWidget *parent )
|
||||
mButton = new QToolButton();
|
||||
mButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
|
||||
mButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconExpression.svg" ) ) );
|
||||
connect( mButton, SIGNAL( clicked() ), this, SLOT( editExpression() ) );
|
||||
connect( mButton, &QAbstractButton::clicked, this, &QgsExpressionLineEdit::editExpression );
|
||||
|
||||
//sets up layout
|
||||
setMultiLine( false );
|
||||
@ -80,7 +80,7 @@ void QgsExpressionLineEdit::setMultiLine( bool multiLine )
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
|
||||
setFocusProxy( mCodeEditor );
|
||||
connect( mCodeEditor, SIGNAL( textChanged() ), this, SLOT( expressionEdited() ) );
|
||||
connect( mCodeEditor, &QsciScintilla::textChanged, this, static_cast < void ( QgsExpressionLineEdit::* )() > ( &QgsExpressionLineEdit::expressionEdited ) );
|
||||
|
||||
setExpression( exp );
|
||||
}
|
||||
@ -102,7 +102,7 @@ void QgsExpressionLineEdit::setMultiLine( bool multiLine )
|
||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||||
|
||||
setFocusProxy( mLineEdit );
|
||||
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( expressionEdited( QString ) ) );
|
||||
connect( mLineEdit, &QLineEdit::textChanged, this, static_cast < void ( QgsExpressionLineEdit::* )( const QString & ) > ( &QgsExpressionLineEdit::expressionEdited ) );
|
||||
|
||||
setExpression( exp );
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ QgsExtentGroupBox::QgsExtentGroupBox( QWidget *parent )
|
||||
mYMinLineEdit->setValidator( new QDoubleValidator( this ) );
|
||||
mYMaxLineEdit->setValidator( new QDoubleValidator( this ) );
|
||||
|
||||
connect( mCurrentExtentButton, SIGNAL( clicked() ), this, SLOT( setOutputExtentFromCurrent() ) );
|
||||
connect( mOriginalExtentButton, SIGNAL( clicked() ), this, SLOT( setOutputExtentFromOriginal() ) );
|
||||
connect( this, SIGNAL( clicked( bool ) ), this, SLOT( groupBoxClicked() ) );
|
||||
connect( mCurrentExtentButton, &QAbstractButton::clicked, this, &QgsExtentGroupBox::setOutputExtentFromCurrent );
|
||||
connect( mOriginalExtentButton, &QAbstractButton::clicked, this, &QgsExtentGroupBox::setOutputExtentFromOriginal );
|
||||
connect( this, &QGroupBox::clicked, this, &QgsExtentGroupBox::groupBoxClicked );
|
||||
}
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ QgsExternalResourceWidget::QgsExternalResourceWidget( QWidget *parent )
|
||||
|
||||
setLayout( layout );
|
||||
|
||||
connect( mFileWidget, SIGNAL( fileChanged( QString ) ), this, SLOT( loadDocument( QString ) ) );
|
||||
connect( mFileWidget, &QgsFileWidget::fileChanged, this, &QgsExternalResourceWidget::loadDocument );
|
||||
}
|
||||
|
||||
QVariant QgsExternalResourceWidget::documentPath( QVariant::Type type ) const
|
||||
|
@ -25,7 +25,7 @@ QgsFieldComboBox::QgsFieldComboBox( QWidget *parent )
|
||||
mFieldProxyModel = new QgsFieldProxyModel( this );
|
||||
setModel( mFieldProxyModel );
|
||||
|
||||
connect( this, SIGNAL( activated( int ) ), this, SLOT( indexChanged( int ) ) );
|
||||
connect( this, static_cast < void ( QComboBox::* )( int ) > ( &QComboBox::activated ), this, &QgsFieldComboBox::indexChanged );
|
||||
}
|
||||
|
||||
void QgsFieldComboBox::setFilters( QgsFieldProxyModel::Filters filters )
|
||||
|
@ -56,12 +56,12 @@ QgsFieldExpressionWidget::QgsFieldExpressionWidget( QWidget *parent )
|
||||
// it will allow pressing on the expression dialog button
|
||||
setFocusProxy( mCombo );
|
||||
|
||||
connect( mCombo->lineEdit(), SIGNAL( textEdited( QString ) ), this, SLOT( expressionEdited( QString ) ) );
|
||||
connect( mCombo->lineEdit(), SIGNAL( editingFinished() ), this, SLOT( expressionEditingFinished() ) );
|
||||
connect( mCombo, SIGNAL( activated( int ) ), this, SLOT( currentFieldChanged() ) );
|
||||
connect( mButton, SIGNAL( clicked() ), this, SLOT( editExpression() ) );
|
||||
connect( mFieldProxyModel, SIGNAL( modelAboutToBeReset() ), this, SLOT( beforeResetModel() ) );
|
||||
connect( mFieldProxyModel, SIGNAL( modelReset() ), this, SLOT( afterResetModel() ) );
|
||||
connect( mCombo->lineEdit(), &QLineEdit::textEdited, this, &QgsFieldExpressionWidget::expressionEdited );
|
||||
connect( mCombo->lineEdit(), &QLineEdit::editingFinished, this, &QgsFieldExpressionWidget::expressionEditingFinished );
|
||||
connect( mCombo, static_cast < void ( QComboBox::* )( int ) > ( &QComboBox::activated ), this, &QgsFieldExpressionWidget::currentFieldChanged );
|
||||
connect( mButton, &QAbstractButton::clicked, this, &QgsFieldExpressionWidget::editExpression );
|
||||
connect( mFieldProxyModel, &QAbstractItemModel::modelAboutToBeReset, this, &QgsFieldExpressionWidget::beforeResetModel );
|
||||
connect( mFieldProxyModel, &QAbstractItemModel::modelReset, this, &QgsFieldExpressionWidget::afterResetModel );
|
||||
// NW TODO - Fix in 2.6
|
||||
// connect( mCombo->lineEdit(), SIGNAL( returnPressed() ), this, SIGNAL( returnPressed() ) );
|
||||
|
||||
@ -157,7 +157,7 @@ void QgsFieldExpressionWidget::setLayer( QgsMapLayer *layer )
|
||||
QgsVectorLayer *vl = qobject_cast< QgsVectorLayer * >( layer );
|
||||
|
||||
if ( mFieldProxyModel->sourceFieldModel()->layer() )
|
||||
disconnect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), this, SLOT( reloadLayer() ) );
|
||||
disconnect( mFieldProxyModel->sourceFieldModel()->layer(), &QgsVectorLayer::updatedFields, this, &QgsFieldExpressionWidget::reloadLayer );
|
||||
|
||||
if ( vl )
|
||||
mExpressionContext = vl->createExpressionContext();
|
||||
@ -167,7 +167,7 @@ void QgsFieldExpressionWidget::setLayer( QgsMapLayer *layer )
|
||||
mFieldProxyModel->sourceFieldModel()->setLayer( vl );
|
||||
|
||||
if ( mFieldProxyModel->sourceFieldModel()->layer() )
|
||||
connect( mFieldProxyModel->sourceFieldModel()->layer(), SIGNAL( updatedFields() ), SLOT( reloadLayer() ), Qt::UniqueConnection );
|
||||
connect( mFieldProxyModel->sourceFieldModel()->layer(), &QgsVectorLayer::updatedFields, this, &QgsFieldExpressionWidget::reloadLayer, Qt::UniqueConnection );
|
||||
}
|
||||
|
||||
void QgsFieldExpressionWidget::setField( const QString &fieldName )
|
||||
|
@ -83,16 +83,16 @@ void QgsFieldModel::setLayer( QgsVectorLayer *layer )
|
||||
{
|
||||
if ( mLayer )
|
||||
{
|
||||
disconnect( mLayer, SIGNAL( updatedFields() ), this, SLOT( updateModel() ) );
|
||||
disconnect( mLayer, SIGNAL( destroyed() ), this, SLOT( layerDeleted() ) );
|
||||
disconnect( mLayer, &QgsVectorLayer::updatedFields, this, &QgsFieldModel::updateModel );
|
||||
disconnect( mLayer, &QObject::destroyed, this, &QgsFieldModel::layerDeleted );
|
||||
}
|
||||
|
||||
mLayer = layer;
|
||||
|
||||
if ( mLayer )
|
||||
{
|
||||
connect( mLayer, SIGNAL( updatedFields() ), this, SLOT( updateModel() ) );
|
||||
connect( mLayer, SIGNAL( destroyed() ), this, SLOT( layerDeleted() ) );
|
||||
connect( mLayer, &QgsVectorLayer::updatedFields, this, &QgsFieldModel::updateModel );
|
||||
connect( mLayer, &QObject::destroyed, this, &QgsFieldModel::layerDeleted );
|
||||
}
|
||||
|
||||
updateModel();
|
||||
|
@ -61,12 +61,12 @@ QgsFileWidget::QgsFileWidget( QWidget *parent )
|
||||
|
||||
// otherwise, use the traditional QLineEdit
|
||||
mLineEdit = new QgsFilterLineEdit( this );
|
||||
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( textEdited( QString ) ) );
|
||||
connect( mLineEdit, &QLineEdit::textChanged, this, &QgsFileWidget::textEdited );
|
||||
layout->addWidget( mLineEdit, 1, 0 );
|
||||
|
||||
mFileWidgetButton = new QToolButton( this );
|
||||
mFileWidgetButton->setText( QStringLiteral( "..." ) );
|
||||
connect( mFileWidgetButton, SIGNAL( clicked() ), this, SLOT( openFileDialog() ) );
|
||||
connect( mFileWidgetButton, &QAbstractButton::clicked, this, &QgsFileWidget::openFileDialog );
|
||||
layout->addWidget( mFileWidgetButton, 0, 1, 2, 1 );
|
||||
|
||||
setLayout( layout );
|
||||
|
@ -45,8 +45,8 @@ QgsFilterLineEdit::QgsFilterLineEdit( QWidget *parent, const QString &nullValue
|
||||
mSearchIconSize = QSize( 16, 16 );
|
||||
mSearchIconPixmap = searchIcon.pixmap( mSearchIconSize );
|
||||
|
||||
connect( this, SIGNAL( textChanged( const QString & ) ), this,
|
||||
SLOT( onTextChanged( const QString & ) ) );
|
||||
connect( this, &QLineEdit::textChanged, this,
|
||||
&QgsFilterLineEdit::onTextChanged );
|
||||
}
|
||||
|
||||
void QgsFilterLineEdit::setShowClearButton( bool visible )
|
||||
|
@ -64,8 +64,8 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
|
||||
btnColor2->setShowNoColor( true );
|
||||
btnColor2->setNoColorString( tr( "Transparent" ) );
|
||||
updateColorButtons();
|
||||
connect( btnColor1, SIGNAL( colorChanged( const QColor & ) ), this, SLOT( setColor1( const QColor & ) ) );
|
||||
connect( btnColor2, SIGNAL( colorChanged( const QColor & ) ), this, SLOT( setColor2( const QColor & ) ) );
|
||||
connect( btnColor1, &QgsColorButton::colorChanged, this, &QgsGradientColorRampDialog::setColor1 );
|
||||
connect( btnColor2, &QgsColorButton::colorChanged, this, &QgsGradientColorRampDialog::setColor2 );
|
||||
|
||||
// fill type combobox
|
||||
cboType->blockSignals( true );
|
||||
@ -81,10 +81,10 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
|
||||
btnInformation->setEnabled( false );
|
||||
|
||||
mStopEditor->setGradientRamp( mRamp );
|
||||
connect( mStopEditor, SIGNAL( changed() ), this, SLOT( updateRampFromStopEditor() ) );
|
||||
connect( mStopEditor, &QgsGradientStopEditor::changed, this, &QgsGradientColorRampDialog::updateRampFromStopEditor );
|
||||
|
||||
connect( mColorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SLOT( colorWidgetChanged( QColor ) ) );
|
||||
connect( mDeleteStopButton, SIGNAL( clicked() ), mStopEditor, SLOT( deleteSelectedStop() ) );
|
||||
connect( mColorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsGradientColorRampDialog::colorWidgetChanged );
|
||||
connect( mDeleteStopButton, &QAbstractButton::clicked, mStopEditor, &QgsGradientStopEditor::deleteSelectedStop );
|
||||
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/GradientEditor/geometry" ) ).toByteArray() );
|
||||
@ -135,9 +135,9 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
|
||||
mAlphaCurve->attach( mPlot );
|
||||
|
||||
mPlotFilter = new QgsGradientPlotEventFilter( mPlot );
|
||||
connect( mPlotFilter, SIGNAL( mousePress( QPointF ) ), this, SLOT( plotMousePress( QPointF ) ) );
|
||||
connect( mPlotFilter, SIGNAL( mouseRelease( QPointF ) ), this, SLOT( plotMouseRelease( QPointF ) ) );
|
||||
connect( mPlotFilter, SIGNAL( mouseMove( QPointF ) ), this, SLOT( plotMouseMove( QPointF ) ) );
|
||||
connect( mPlotFilter, &QgsGradientPlotEventFilter::mousePress, this, &QgsGradientColorRampDialog::plotMousePress );
|
||||
connect( mPlotFilter, &QgsGradientPlotEventFilter::mouseRelease, this, &QgsGradientColorRampDialog::plotMouseRelease );
|
||||
connect( mPlotFilter, &QgsGradientPlotEventFilter::mouseMove, this, &QgsGradientColorRampDialog::plotMouseMove );
|
||||
|
||||
mPlotHueCheckbox->setChecked( settings.value( QStringLiteral( "GradientEditor/plotHue" ), false ).toBool() );
|
||||
mPlotLightnessCheckbox->setChecked( settings.value( QStringLiteral( "GradientEditor/plotLightness" ), true ).toBool() );
|
||||
@ -149,7 +149,7 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
|
||||
mSaturationCurve->setVisible( mPlotSaturationCheckbox->isChecked() );
|
||||
mAlphaCurve->setVisible( mPlotAlphaCheckbox->isChecked() );
|
||||
|
||||
connect( mStopEditor, SIGNAL( selectedStopChanged( QgsGradientStop ) ), this, SLOT( selectedStopChanged( QgsGradientStop ) ) );
|
||||
connect( mStopEditor, &QgsGradientStopEditor::selectedStopChanged, this, &QgsGradientColorRampDialog::selectedStopChanged );
|
||||
mStopEditor->selectStop( 0 );
|
||||
}
|
||||
|
||||
|
@ -66,10 +66,10 @@ QgsHistogramWidget::QgsHistogramWidget( QWidget *parent, QgsVectorLayer *layer,
|
||||
mMeanCheckBox->setChecked( settings.value( QStringLiteral( "HistogramWidget/showMean" ), false ).toBool() );
|
||||
mStdevCheckBox->setChecked( settings.value( QStringLiteral( "HistogramWidget/showStdev" ), false ).toBool() );
|
||||
|
||||
connect( mBinsSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( refresh() ) );
|
||||
connect( mMeanCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( refresh() ) );
|
||||
connect( mStdevCheckBox, SIGNAL( toggled( bool ) ), this, SLOT( refresh() ) );
|
||||
connect( mLoadValuesButton, SIGNAL( clicked() ), this, SLOT( refreshValues() ) );
|
||||
connect( mBinsSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsHistogramWidget::refresh );
|
||||
connect( mMeanCheckBox, &QAbstractButton::toggled, this, &QgsHistogramWidget::refresh );
|
||||
connect( mStdevCheckBox, &QAbstractButton::toggled, this, &QgsHistogramWidget::refresh );
|
||||
connect( mLoadValuesButton, &QAbstractButton::clicked, this, &QgsHistogramWidget::refreshValues );
|
||||
|
||||
mGridPen = QPen( QColor( 0, 0, 0, 40 ) );
|
||||
mMeanPen = QPen( QColor( 10, 10, 10, 220 ) );
|
||||
|
@ -134,7 +134,7 @@ QList<QgsMapToolIdentify::IdentifyResult> QgsIdentifyMenu::exec( const QList<Qgs
|
||||
addSeparator();
|
||||
QAction *allAction = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionIdentify.svg" ) ), tr( "%1 all (%2)" ).arg( mDefaultActionName ).arg( idResults.count() ), this );
|
||||
allAction->setData( QVariant::fromValue<ActionData>( ActionData( nullptr ) ) );
|
||||
connect( allAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( allAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
addAction( allAction );
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ void QgsIdentifyMenu::addRasterLayer( QgsMapLayer *layer )
|
||||
// add layer action to the top menu
|
||||
layerAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconRasterLayer.svg" ) ) );
|
||||
layerAction->setData( QVariant::fromValue<ActionData>( ActionData( layer ) ) );
|
||||
connect( layerAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( layerAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
addAction( layerAction );
|
||||
|
||||
// no need to go further if there is no menu
|
||||
@ -208,7 +208,7 @@ void QgsIdentifyMenu::addRasterLayer( QgsMapLayer *layer )
|
||||
|
||||
// add default identify action
|
||||
QAction *identifyFeatureAction = new QAction( mDefaultActionName, layerMenu );
|
||||
connect( identifyFeatureAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( identifyFeatureAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
identifyFeatureAction->setData( QVariant::fromValue<ActionData>( ActionData( layer ) ) );
|
||||
layerMenu->addAction( identifyFeatureAction );
|
||||
|
||||
@ -217,8 +217,8 @@ void QgsIdentifyMenu::addRasterLayer( QgsMapLayer *layer )
|
||||
{
|
||||
QAction *action = new QAction( mapLayerAction->icon(), mapLayerAction->text(), layerMenu );
|
||||
action->setData( QVariant::fromValue<ActionData>( ActionData( layer, true ) ) );
|
||||
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( action, SIGNAL( triggered() ), this, SLOT( triggerMapLayerAction() ) );
|
||||
connect( action, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
connect( action, &QAction::triggered, this, &QgsIdentifyMenu::triggerMapLayerAction );
|
||||
layerMenu->addAction( action );
|
||||
if ( separators.contains( mapLayerAction ) )
|
||||
{
|
||||
@ -329,7 +329,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
|
||||
// add layer action to the top menu
|
||||
layerAction->setData( QVariant::fromValue<ActionData>( ActionData( layer ) ) );
|
||||
connect( layerAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( layerAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
addAction( layerAction );
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
featureAction = new QAction( featureTitle, layerMenu );
|
||||
// add the feature action (or menu) to the layer menu
|
||||
featureAction->setData( QVariant::fromValue<ActionData>( ActionData( layer, result.mFeature.id() ) ) );
|
||||
connect( featureAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( featureAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
layerMenu->addAction( featureAction );
|
||||
}
|
||||
else if ( results.count() == 1 )
|
||||
@ -383,7 +383,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
featureAction = featureMenu->menuAction();
|
||||
// add the feature action (or menu) to the layer menu
|
||||
featureAction->setData( QVariant::fromValue<ActionData>( ActionData( layer, result.mFeature.id() ) ) );
|
||||
connect( featureAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( featureAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
layerMenu->addAction( featureAction );
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
|
||||
// add default identify action
|
||||
QAction *identifyFeatureAction = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionIdentify.svg" ) ), mDefaultActionName, featureMenu );
|
||||
connect( identifyFeatureAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( identifyFeatureAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
identifyFeatureAction->setData( QVariant::fromValue<ActionData>( ActionData( layer, result.mFeature.id() ) ) );
|
||||
featureMenu->addAction( identifyFeatureAction );
|
||||
featureMenu->addSeparator();
|
||||
@ -403,8 +403,8 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
{
|
||||
QAction *action = new QAction( mapLayerAction->icon(), mapLayerAction->text(), featureMenu );
|
||||
action->setData( QVariant::fromValue<ActionData>( ActionData( layer, result.mFeature.id(), mapLayerAction ) ) );
|
||||
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( action, SIGNAL( triggered() ), this, SLOT( triggerMapLayerAction() ) );
|
||||
connect( action, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
connect( action, &QAction::triggered, this, &QgsIdentifyMenu::triggerMapLayerAction );
|
||||
featureMenu->addAction( action );
|
||||
}
|
||||
// use QgsActionMenu for feature actions
|
||||
@ -412,7 +412,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
{
|
||||
Q_FOREACH ( QAction *action, featureActionMenu->actions() )
|
||||
{
|
||||
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( action, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
featureMenu->addAction( action );
|
||||
}
|
||||
}
|
||||
@ -426,7 +426,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
layerMenu->addSeparator();
|
||||
QAction *allAction = new QAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionIdentify.svg" ) ), tr( "%1 all (%2)" ).arg( mDefaultActionName ).arg( results.count() ), layerMenu );
|
||||
allAction->setData( QVariant::fromValue<ActionData>( ActionData( layer ) ) );
|
||||
connect( allAction, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( allAction, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
layerMenu->addAction( allAction );
|
||||
}
|
||||
|
||||
@ -438,8 +438,8 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
title.append( QStringLiteral( " (%1)" ).arg( results.count() ) );
|
||||
QAction *action = new QAction( mapLayerAction->icon(), title, layerMenu );
|
||||
action->setData( QVariant::fromValue<ActionData>( ActionData( layer, mapLayerAction ) ) );
|
||||
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
|
||||
connect( action, SIGNAL( triggered() ), this, SLOT( triggerMapLayerAction() ) );
|
||||
connect( action, &QAction::hovered, this, &QgsIdentifyMenu::handleMenuHover );
|
||||
connect( action, &QAction::triggered, this, &QgsIdentifyMenu::triggerMapLayerAction );
|
||||
layerMenu->addAction( action );
|
||||
if ( separators.contains( mapLayerAction ) )
|
||||
{
|
||||
@ -613,7 +613,7 @@ void QgsIdentifyMenu::handleMenuHover()
|
||||
hl->setBuffer( buffer );
|
||||
hl->setMinWidth( minWidth );
|
||||
mRubberBands.append( hl );
|
||||
connect( vl, SIGNAL( destroyed() ), this, SLOT( layerDestroyed() ) );
|
||||
connect( vl, &QObject::destroyed, this, &QgsIdentifyMenu::layerDestroyed );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,10 @@ QgsLegendFilterButton::QgsLegendFilterButton( QWidget *parent )
|
||||
{
|
||||
mMenu = new QMenu( this );
|
||||
mSetExpressionAction = new QAction( tr( "Edit filter expression" ), mMenu );
|
||||
connect( mSetExpressionAction, SIGNAL( triggered( bool ) ), this, SLOT( onSetLegendFilterExpression() ) );
|
||||
connect( mSetExpressionAction, &QAction::triggered, this, &QgsLegendFilterButton::onSetLegendFilterExpression );
|
||||
|
||||
mClearExpressionAction = new QAction( tr( "Clear filter expression" ), mMenu );
|
||||
connect( mClearExpressionAction, SIGNAL( triggered( bool ) ), this, SLOT( onClearFilterExpression() ) );
|
||||
connect( mClearExpressionAction, &QAction::triggered, this, &QgsLegendFilterButton::onClearFilterExpression );
|
||||
mClearExpressionAction->setEnabled( false );
|
||||
|
||||
mMenu->addAction( mSetExpressionAction );
|
||||
@ -43,7 +43,7 @@ QgsLegendFilterButton::QgsLegendFilterButton( QWidget *parent )
|
||||
|
||||
setMenu( mMenu );
|
||||
|
||||
connect( this, SIGNAL( toggled( bool ) ), this, SLOT( onToggle( bool ) ) );
|
||||
connect( this, &QAbstractButton::toggled, this, &QgsLegendFilterButton::onToggle );
|
||||
}
|
||||
|
||||
void QgsLegendFilterButton::onToggle( bool checked )
|
||||
|
@ -30,13 +30,13 @@ QgsLimitedRandomColorRampWidget::QgsLimitedRandomColorRampWidget( const QgsLimit
|
||||
|
||||
updateUi();
|
||||
|
||||
connect( spinCount, SIGNAL( valueChanged( int ) ), this, SLOT( setCount( int ) ) );
|
||||
connect( spinHue1, SIGNAL( valueChanged( int ) ), this, SLOT( setHue1( int ) ) );
|
||||
connect( spinHue2, SIGNAL( valueChanged( int ) ), this, SLOT( setHue2( int ) ) );
|
||||
connect( spinSat1, SIGNAL( valueChanged( int ) ), this, SLOT( setSat1( int ) ) );
|
||||
connect( spinSat2, SIGNAL( valueChanged( int ) ), this, SLOT( setSat2( int ) ) );
|
||||
connect( spinVal1, SIGNAL( valueChanged( int ) ), this, SLOT( setVal1( int ) ) );
|
||||
connect( spinVal2, SIGNAL( valueChanged( int ) ), this, SLOT( setVal2( int ) ) );
|
||||
connect( spinCount, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setCount );
|
||||
connect( spinHue1, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setHue1 );
|
||||
connect( spinHue2, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setHue2 );
|
||||
connect( spinSat1, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setSat1 );
|
||||
connect( spinSat2, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setSat2 );
|
||||
connect( spinVal1, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setVal1 );
|
||||
connect( spinVal2, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsLimitedRandomColorRampWidget::setVal2 );
|
||||
}
|
||||
|
||||
void QgsLimitedRandomColorRampWidget::setRamp( const QgsLimitedRandomColorRamp &ramp )
|
||||
@ -122,9 +122,9 @@ QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog( const QgsLimit
|
||||
mWidget = new QgsLimitedRandomColorRampWidget( ramp );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
connect( bbox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( bbox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
connect( mWidget, SIGNAL( changed() ), this, SIGNAL( changed() ) );
|
||||
connect( mWidget, &QgsLimitedRandomColorRampWidget::changed, this, &QgsLimitedRandomColorRampDialog::changed );
|
||||
}
|
||||
|
@ -36,11 +36,11 @@ QgsManageConnectionsDialog::QgsManageConnectionsDialog( QWidget *parent, Mode mo
|
||||
QPushButton *pb = nullptr;
|
||||
pb = new QPushButton( tr( "Select all" ) );
|
||||
buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
|
||||
connect( pb, SIGNAL( clicked() ), this, SLOT( selectAll() ) );
|
||||
connect( pb, &QAbstractButton::clicked, this, &QgsManageConnectionsDialog::selectAll );
|
||||
|
||||
pb = new QPushButton( tr( "Clear selection" ) );
|
||||
buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
|
||||
connect( pb, SIGNAL( clicked() ), this, SLOT( clearSelection() ) );
|
||||
connect( pb, &QAbstractButton::clicked, this, &QgsManageConnectionsDialog::clearSelection );
|
||||
|
||||
if ( mDialogMode == Import )
|
||||
{
|
||||
@ -61,10 +61,10 @@ QgsManageConnectionsDialog::QgsManageConnectionsDialog( QWidget *parent, Mode mo
|
||||
}
|
||||
|
||||
// use Ok button for starting import and export operations
|
||||
disconnect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( doExportImport() ) );
|
||||
disconnect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsManageConnectionsDialog::doExportImport );
|
||||
|
||||
connect( listConnections, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
|
||||
connect( listConnections, &QListWidget::itemSelectionChanged, this, &QgsManageConnectionsDialog::selectionChanged );
|
||||
}
|
||||
|
||||
void QgsManageConnectionsDialog::selectionChanged()
|
||||
|
@ -164,7 +164,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget *parent )
|
||||
|
||||
moveCanvasContents( true );
|
||||
|
||||
connect( &mMapUpdateTimer, SIGNAL( timeout() ), SLOT( mapUpdateTimeout() ) );
|
||||
connect( &mMapUpdateTimer, &QTimer::timeout, this, &QgsMapCanvas::mapUpdateTimeout );
|
||||
mMapUpdateTimer.setInterval( 250 );
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -25,10 +25,10 @@ QgsMapCanvasSnappingUtils::QgsMapCanvasSnappingUtils( QgsMapCanvas *canvas, QObj
|
||||
, mCanvas( canvas )
|
||||
, mProgress( nullptr )
|
||||
{
|
||||
connect( canvas, SIGNAL( extentsChanged() ), this, SLOT( canvasMapSettingsChanged() ) );
|
||||
connect( canvas, SIGNAL( destinationCrsChanged() ), this, SLOT( canvasMapSettingsChanged() ) );
|
||||
connect( canvas, SIGNAL( layersChanged() ), this, SLOT( canvasMapSettingsChanged() ) );
|
||||
connect( canvas, SIGNAL( currentLayerChanged( QgsMapLayer * ) ), this, SLOT( canvasCurrentLayerChanged() ) );
|
||||
connect( canvas, &QgsMapCanvas::extentsChanged, this, &QgsMapCanvasSnappingUtils::canvasMapSettingsChanged );
|
||||
connect( canvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMapCanvasSnappingUtils::canvasMapSettingsChanged );
|
||||
connect( canvas, &QgsMapCanvas::layersChanged, this, &QgsMapCanvasSnappingUtils::canvasMapSettingsChanged );
|
||||
connect( canvas, &QgsMapCanvas::currentLayerChanged, this, &QgsMapCanvasSnappingUtils::canvasCurrentLayerChanged );
|
||||
canvasMapSettingsChanged();
|
||||
canvasCurrentLayerChanged();
|
||||
}
|
||||
|
@ -39,11 +39,11 @@ QgsMapCanvasTracer::QgsMapCanvasTracer( QgsMapCanvas *canvas, QgsMessageBar *mes
|
||||
sTracers.insert( canvas, this );
|
||||
|
||||
// when things change we just invalidate the graph - and set up new parameters again only when necessary
|
||||
connect( canvas, SIGNAL( destinationCrsChanged() ), this, SLOT( invalidateGraph() ) );
|
||||
connect( canvas, SIGNAL( layersChanged() ), this, SLOT( invalidateGraph() ) );
|
||||
connect( canvas, SIGNAL( extentsChanged() ), this, SLOT( invalidateGraph() ) );
|
||||
connect( canvas, SIGNAL( currentLayerChanged( QgsMapLayer * ) ), this, SLOT( onCurrentLayerChanged() ) );
|
||||
connect( canvas->snappingUtils(), SIGNAL( configChanged() ), this, SLOT( invalidateGraph() ) );
|
||||
connect( canvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsMapCanvasTracer::invalidateGraph );
|
||||
connect( canvas, &QgsMapCanvas::layersChanged, this, &QgsMapCanvasTracer::invalidateGraph );
|
||||
connect( canvas, &QgsMapCanvas::extentsChanged, this, &QgsMapCanvasTracer::invalidateGraph );
|
||||
connect( canvas, &QgsMapCanvas::currentLayerChanged, this, &QgsMapCanvasTracer::onCurrentLayerChanged );
|
||||
connect( canvas->snappingUtils(), &QgsSnappingUtils::configChanged, this, &QgsMapCanvasTracer::invalidateGraph );
|
||||
|
||||
// arbitrarily chosen limit that should allow for fairly fast initialization
|
||||
// of the underlying graph structure
|
||||
|
@ -23,9 +23,9 @@ QgsMapLayerComboBox::QgsMapLayerComboBox( QWidget *parent )
|
||||
mProxyModel = new QgsMapLayerProxyModel( this );
|
||||
setModel( mProxyModel );
|
||||
|
||||
connect( this, SIGNAL( activated( int ) ), this, SLOT( indexChanged( int ) ) );
|
||||
connect( mProxyModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( mProxyModel, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( rowsChanged() ) );
|
||||
connect( this, static_cast < void ( QComboBox::* )( int ) > ( &QComboBox::activated ), this, &QgsMapLayerComboBox::indexChanged );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsInserted, this, &QgsMapLayerComboBox::rowsChanged );
|
||||
connect( mProxyModel, &QAbstractItemModel::rowsRemoved, this, &QgsMapLayerComboBox::rowsChanged );
|
||||
}
|
||||
|
||||
void QgsMapLayerComboBox::setExcludedProviders( const QStringList &providers )
|
||||
|
@ -44,36 +44,37 @@ QgsMapLayerStyleManagerWidget::QgsMapLayerStyleManagerWidget( QgsMapLayer *layer
|
||||
QToolBar *toolbar = new QToolBar( this );
|
||||
QAction *addAction = toolbar->addAction( tr( "Add" ) );
|
||||
addAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "symbologyAdd.svg" ) ) );
|
||||
connect( addAction, SIGNAL( triggered() ), this, SLOT( addStyle() ) );
|
||||
connect( addAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::addStyle );
|
||||
QAction *removeAction = toolbar->addAction( tr( "Remove Current" ) );
|
||||
removeAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "symbologyRemove.svg" ) ) );
|
||||
connect( removeAction, SIGNAL( triggered() ), this, SLOT( removeStyle() ) );
|
||||
connect( removeAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::removeStyle );
|
||||
QAction *loadFromFileAction = toolbar->addAction( tr( "Load Style" ) );
|
||||
loadFromFileAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileOpen.svg" ) ) );
|
||||
connect( loadFromFileAction, SIGNAL( triggered() ), this, SLOT( loadStyle() ) );
|
||||
connect( loadFromFileAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::loadStyle );
|
||||
QAction *saveAsDefaultAction = toolbar->addAction( tr( "Save as default" ) );
|
||||
connect( saveAsDefaultAction, SIGNAL( triggered() ), this, SLOT( saveAsDefault() ) );
|
||||
connect( saveAsDefaultAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::saveAsDefault );
|
||||
QAction *loadDefaultAction = toolbar->addAction( tr( "Restore default" ) );
|
||||
connect( loadDefaultAction, SIGNAL( triggered() ), this, SLOT( loadDefault() ) );
|
||||
connect( loadDefaultAction, &QAction::triggered, this, &QgsMapLayerStyleManagerWidget::loadDefault );
|
||||
|
||||
|
||||
// Save style doesn't work correctly yet so just disable for now.
|
||||
// QAction* saveToFileAction = toolbar->addAction( tr( "Save Style" ) );
|
||||
// connect( saveToFileAction, SIGNAL( triggered() ), this, SLOT( saveStyle() ) );
|
||||
|
||||
connect( canvas, SIGNAL( mapCanvasRefreshed() ), this, SLOT( updateCurrent() ) );
|
||||
//broken connect - not sure what the purpose of this was?
|
||||
// connect( canvas, &QgsMapCanvas::mapCanvasRefreshed, this, SLOT( updateCurrent() ) );
|
||||
|
||||
connect( mStyleList, SIGNAL( clicked( QModelIndex ) ), this, SLOT( styleClicked( QModelIndex ) ) );
|
||||
connect( mStyleList, &QAbstractItemView::clicked, this, &QgsMapLayerStyleManagerWidget::styleClicked );
|
||||
|
||||
setLayout( new QVBoxLayout() );
|
||||
layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||
layout()->addWidget( toolbar );
|
||||
layout()->addWidget( mStyleList );
|
||||
|
||||
connect( mLayer->styleManager(), SIGNAL( currentStyleChanged( QString ) ), this, SLOT( currentStyleChanged( QString ) ) );
|
||||
connect( mLayer->styleManager(), SIGNAL( styleAdded( QString ) ), this, SLOT( styleAdded( QString ) ) );
|
||||
connect( mLayer->styleManager(), SIGNAL( styleremoved( QString ) ), this, SLOT( styleRemoved( QString ) ) );
|
||||
connect( mLayer->styleManager(), SIGNAL( styleRenamed( QString, QString ) ), this, SLOT( styleRenamed( QString, QString ) ) );
|
||||
connect( mLayer->styleManager(), &QgsMapLayerStyleManager::currentStyleChanged, this, &QgsMapLayerStyleManagerWidget::currentStyleChanged );
|
||||
connect( mLayer->styleManager(), &QgsMapLayerStyleManager::styleAdded, this, &QgsMapLayerStyleManagerWidget::styleAdded );
|
||||
connect( mLayer->styleManager(), &QgsMapLayerStyleManager::styleRemoved, this, &QgsMapLayerStyleManagerWidget::styleRemoved );
|
||||
connect( mLayer->styleManager(), &QgsMapLayerStyleManager::styleRenamed, this, &QgsMapLayerStyleManagerWidget::styleRenamed );
|
||||
|
||||
mModel->clear();
|
||||
|
||||
|
@ -182,7 +182,7 @@ void QgsMapOverviewCanvas::refresh()
|
||||
|
||||
// TODO: setup overview mode
|
||||
mJob = new QgsMapRendererSequentialJob( mSettings );
|
||||
connect( mJob, SIGNAL( finished() ), this, SLOT( mapRenderingFinished() ) );
|
||||
connect( mJob, &QgsMapRendererJob::finished, this, &QgsMapOverviewCanvas::mapRenderingFinished );
|
||||
mJob->start();
|
||||
|
||||
setBackgroundColor( mMapCanvas->mapSettings().backgroundColor() );
|
||||
|
@ -110,10 +110,10 @@ void QgsMapTool::deactivate()
|
||||
void QgsMapTool::setAction( QAction *action )
|
||||
{
|
||||
if ( mAction )
|
||||
disconnect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
|
||||
disconnect( mAction, &QObject::destroyed, this, &QgsMapTool::actionDestroyed );
|
||||
mAction = action;
|
||||
if ( mAction )
|
||||
connect( mAction, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
|
||||
connect( mAction, &QObject::destroyed, this, &QgsMapTool::actionDestroyed );
|
||||
}
|
||||
|
||||
void QgsMapTool::actionDestroyed()
|
||||
|
@ -69,14 +69,14 @@ void QgsMapToolAdvancedDigitizing::canvasMoveEvent( QgsMapMouseEvent *e )
|
||||
void QgsMapToolAdvancedDigitizing::activate()
|
||||
{
|
||||
QgsMapToolEdit::activate();
|
||||
connect( mCadDockWidget, SIGNAL( pointChanged( QgsPoint ) ), this, SLOT( cadPointChanged( QgsPoint ) ) );
|
||||
connect( mCadDockWidget, &QgsAdvancedDigitizingDockWidget::pointChanged, this, &QgsMapToolAdvancedDigitizing::cadPointChanged );
|
||||
mCadDockWidget->enable();
|
||||
}
|
||||
|
||||
void QgsMapToolAdvancedDigitizing::deactivate()
|
||||
{
|
||||
QgsMapToolEdit::deactivate();
|
||||
disconnect( mCadDockWidget, SIGNAL( pointChanged( QgsPoint ) ), this, SLOT( cadPointChanged( QgsPoint ) ) );
|
||||
disconnect( mCadDockWidget, &QgsAdvancedDigitizingDockWidget::pointChanged, this, &QgsMapToolAdvancedDigitizing::cadPointChanged );
|
||||
mCadDockWidget->disable();
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ QgsMapToolCapture::QgsMapToolCapture( QgsMapCanvas *canvas, QgsAdvancedDigitizin
|
||||
QPixmap mySelectQPixmap = QPixmap( ( const char ** ) capture_point_cursor );
|
||||
setCursor( QCursor( mySelectQPixmap, 8, 8 ) );
|
||||
|
||||
connect( canvas, SIGNAL( currentLayerChanged( QgsMapLayer * ) ),
|
||||
this, SLOT( currentLayerChanged( QgsMapLayer * ) ) );
|
||||
connect( canvas, &QgsMapCanvas::currentLayerChanged,
|
||||
this, &QgsMapToolCapture::currentLayerChanged );
|
||||
}
|
||||
|
||||
QgsMapToolCapture::~QgsMapToolCapture()
|
||||
@ -664,8 +664,8 @@ void QgsMapToolCapture::validateGeometry()
|
||||
return;
|
||||
|
||||
mValidator = new QgsGeometryValidator( g.get() );
|
||||
connect( mValidator, SIGNAL( errorFound( QgsGeometry::Error ) ), this, SLOT( addError( QgsGeometry::Error ) ) );
|
||||
connect( mValidator, SIGNAL( finished() ), this, SLOT( validationFinished() ) );
|
||||
connect( mValidator, &QgsGeometryValidator::errorFound, this, &QgsMapToolCapture::addError );
|
||||
connect( mValidator, &QThread::finished, this, &QgsMapToolCapture::validationFinished );
|
||||
mValidator->start();
|
||||
messageEmitted( tr( "Validation started" ) );
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ QgsMessageBar::QgsMessageBar( QWidget *parent )
|
||||
mCloseMenu->setObjectName( QStringLiteral( "mCloseMenu" ) );
|
||||
mActionCloseAll = new QAction( tr( "Close all" ), this );
|
||||
mCloseMenu->addAction( mActionCloseAll );
|
||||
connect( mActionCloseAll, SIGNAL( triggered() ), this, SLOT( clearWidgets() ) );
|
||||
connect( mActionCloseAll, &QAction::triggered, this, &QgsMessageBar::clearWidgets );
|
||||
|
||||
mCloseBtn = new QToolButton( this );
|
||||
mCloseMenu->setObjectName( QStringLiteral( "mCloseMenu" ) );
|
||||
@ -85,15 +85,15 @@ QgsMessageBar::QgsMessageBar( QWidget *parent )
|
||||
mCloseBtn->setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum );
|
||||
mCloseBtn->setMenu( mCloseMenu );
|
||||
mCloseBtn->setPopupMode( QToolButton::MenuButtonPopup );
|
||||
connect( mCloseBtn, SIGNAL( clicked() ), this, SLOT( popWidget() ) );
|
||||
connect( mCloseBtn, &QAbstractButton::clicked, this, static_cast < bool ( QgsMessageBar::* )( ) > ( &QgsMessageBar::popWidget ) );
|
||||
mLayout->addWidget( mCloseBtn, 0, 3, 1, 1 );
|
||||
|
||||
mCountdownTimer = new QTimer( this );
|
||||
mCountdownTimer->setInterval( 1000 );
|
||||
connect( mCountdownTimer, SIGNAL( timeout() ), this, SLOT( updateCountdown() ) );
|
||||
connect( mCountdownTimer, &QTimer::timeout, this, &QgsMessageBar::updateCountdown );
|
||||
|
||||
connect( this, SIGNAL( widgetAdded( QgsMessageBarItem * ) ), this, SLOT( updateItemCount() ) );
|
||||
connect( this, SIGNAL( widgetRemoved( QgsMessageBarItem * ) ), this, SLOT( updateItemCount() ) );
|
||||
connect( this, &QgsMessageBar::widgetAdded, this, &QgsMessageBar::updateItemCount );
|
||||
connect( this, &QgsMessageBar::widgetRemoved, this, &QgsMessageBar::updateItemCount );
|
||||
|
||||
// start hidden
|
||||
setVisible( false );
|
||||
@ -130,7 +130,7 @@ void QgsMessageBar::popItem( QgsMessageBarItem *item )
|
||||
QWidget *widget = mCurrentItem;
|
||||
mLayout->removeWidget( widget );
|
||||
mCurrentItem->hide();
|
||||
disconnect( mCurrentItem, SIGNAL( styleChanged( QString ) ), this, SLOT( setStyleSheet( QString ) ) );
|
||||
disconnect( mCurrentItem, &QgsMessageBarItem::styleChanged, this, &QWidget::setStyleSheet );
|
||||
delete mCurrentItem;
|
||||
mCurrentItem = nullptr;
|
||||
}
|
||||
@ -228,7 +228,7 @@ void QgsMessageBar::showItem( QgsMessageBarItem *item )
|
||||
Q_ASSERT( item );
|
||||
|
||||
if ( mCurrentItem )
|
||||
disconnect( mCurrentItem, SIGNAL( styleChanged( QString ) ), this, SLOT( setStyleSheet( QString ) ) );
|
||||
disconnect( mCurrentItem, &QgsMessageBarItem::styleChanged, this, &QWidget::setStyleSheet );
|
||||
|
||||
if ( item == mCurrentItem )
|
||||
return;
|
||||
@ -255,7 +255,7 @@ void QgsMessageBar::showItem( QgsMessageBarItem *item )
|
||||
mCountdownTimer->start();
|
||||
}
|
||||
|
||||
connect( mCurrentItem, SIGNAL( styleChanged( QString ) ), this, SLOT( setStyleSheet( QString ) ) );
|
||||
connect( mCurrentItem, &QgsMessageBarItem::styleChanged, this, &QWidget::setStyleSheet );
|
||||
setStyleSheet( item->getStyleSheet() );
|
||||
show();
|
||||
|
||||
|
@ -36,10 +36,10 @@ QgsMessageLogViewer::QgsMessageLogViewer( QStatusBar *statusBar, QWidget *parent
|
||||
Q_UNUSED( statusBar )
|
||||
setupUi( this );
|
||||
|
||||
connect( QgsApplication::messageLog(), SIGNAL( messageReceived( QString, QString, QgsMessageLog::MessageLevel ) ),
|
||||
this, SLOT( logMessage( QString, QString, QgsMessageLog::MessageLevel ) ) );
|
||||
connect( QgsApplication::messageLog(), static_cast<void ( QgsMessageLog::* )( const QString &, const QString &, QgsMessageLog::MessageLevel )>( &QgsMessageLog::messageReceived ),
|
||||
this, static_cast<void ( QgsMessageLogViewer::* )( QString, QString, QgsMessageLog::MessageLevel )>( &QgsMessageLogViewer::logMessage ) );
|
||||
|
||||
connect( tabWidget, SIGNAL( tabCloseRequested( int ) ), this, SLOT( closeTab( int ) ) );
|
||||
connect( tabWidget, &QTabWidget::tabCloseRequested, this, &QgsMessageLogViewer::closeTab );
|
||||
}
|
||||
|
||||
void QgsMessageLogViewer::closeEvent( QCloseEvent *e )
|
||||
|
@ -86,10 +86,10 @@ QgsNewGeoPackageLayerDialog::QgsNewGeoPackageLayerDialog( QWidget *parent, Qt::W
|
||||
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
|
||||
mOkButton->setEnabled( false );
|
||||
|
||||
connect( mFieldNameEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( fieldNameChanged( QString ) ) );
|
||||
connect( mAttributeView, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
|
||||
connect( mTableNameEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( checkOk() ) );
|
||||
connect( mDatabaseEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( checkOk() ) );
|
||||
connect( mFieldNameEdit, &QLineEdit::textChanged, this, &QgsNewGeoPackageLayerDialog::fieldNameChanged );
|
||||
connect( mAttributeView, &QTreeWidget::itemSelectionChanged, this, &QgsNewGeoPackageLayerDialog::selectionChanged );
|
||||
connect( mTableNameEdit, &QLineEdit::textChanged, this, &QgsNewGeoPackageLayerDialog::checkOk );
|
||||
connect( mDatabaseEdit, &QLineEdit::textChanged, this, &QgsNewGeoPackageLayerDialog::checkOk );
|
||||
|
||||
mAddAttributeButton->setEnabled( false );
|
||||
mRemoveAttributeButton->setEnabled( false );
|
||||
|
@ -60,7 +60,7 @@ QgsNewNameDialog::QgsNewNameDialog( const QString &source, const QString &initia
|
||||
mLineEdit->setValidator( validator );
|
||||
}
|
||||
mLineEdit->setMinimumWidth( mLineEdit->fontMetrics().width( QStringLiteral( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ) ) );
|
||||
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( nameChanged() ) );
|
||||
connect( mLineEdit, &QLineEdit::textChanged, this, &QgsNewNameDialog::nameChanged );
|
||||
layout()->addWidget( mLineEdit );
|
||||
|
||||
mNamesLabel = new QLabel( QStringLiteral( " " ), this );
|
||||
|
@ -84,8 +84,8 @@ QgsNewVectorLayerDialog::QgsNewVectorLayerDialog( QWidget *parent, Qt::WindowFla
|
||||
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
|
||||
|
||||
mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << QStringLiteral( "id" ) << QStringLiteral( "Integer" ) << QStringLiteral( "10" ) << QLatin1String( "" ) ) );
|
||||
connect( mNameEdit, SIGNAL( textChanged( QString ) ), this, SLOT( nameChanged( QString ) ) );
|
||||
connect( mAttributeView, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
|
||||
connect( mNameEdit, &QLineEdit::textChanged, this, &QgsNewVectorLayerDialog::nameChanged );
|
||||
connect( mAttributeView, &QTreeWidget::itemSelectionChanged, this, &QgsNewVectorLayerDialog::selectionChanged );
|
||||
|
||||
mAddAttributeButton->setEnabled( false );
|
||||
mRemoveAttributeButton->setEnabled( false );
|
||||
|
@ -134,14 +134,14 @@ void QgsOptionsDialogBase::initOptionsBase( bool restoreUi, const QString &title
|
||||
if ( mOptButtonBox )
|
||||
{
|
||||
// enforce only one connection per signal, in case added in Qt Designer
|
||||
disconnect( mOptButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( mOptButtonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
disconnect( mOptButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( mOptButtonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
disconnect( mOptButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( mOptButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
disconnect( mOptButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( mOptButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
}
|
||||
connect( mOptSplitter, SIGNAL( splitterMoved( int, int ) ), this, SLOT( updateOptionsListVerticalTabs() ) );
|
||||
connect( mOptStackedWidget, SIGNAL( currentChanged( int ) ), this, SLOT( optionsStackedWidget_CurrentChanged( int ) ) );
|
||||
connect( mOptStackedWidget, SIGNAL( widgetRemoved( int ) ), this, SLOT( optionsStackedWidget_WidgetRemoved( int ) ) );
|
||||
connect( mOptSplitter, &QSplitter::splitterMoved, this, &QgsOptionsDialogBase::updateOptionsListVerticalTabs );
|
||||
connect( mOptStackedWidget, &QStackedWidget::currentChanged, this, &QgsOptionsDialogBase::optionsStackedWidget_CurrentChanged );
|
||||
connect( mOptStackedWidget, &QStackedWidget::widgetRemoved, this, &QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved );
|
||||
|
||||
if ( mSearchLineEdit )
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ void QgsOrderByDialog::setRow( int row, const QgsFeatureRequest::OrderByClause &
|
||||
QgsFieldExpressionWidget *fieldExpression = new QgsFieldExpressionWidget();
|
||||
fieldExpression->setLayer( mLayer );
|
||||
fieldExpression->setField( orderByClause.expression().expression() );
|
||||
connect( fieldExpression, SIGNAL( fieldChanged( QString ) ), this, SLOT( onExpressionChanged( QString ) ) );
|
||||
connect( fieldExpression, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) >( &QgsFieldExpressionWidget::fieldChanged ), this, &QgsOrderByDialog::onExpressionChanged );
|
||||
|
||||
QComboBox *ascComboBox = new QComboBox();
|
||||
ascComboBox->addItem( tr( "Ascending" ) );
|
||||
|
@ -91,7 +91,7 @@ QgsOWSSourceSelect::QgsOWSSourceSelect( const QString &service, QWidget *parent,
|
||||
|
||||
if ( !mManagerMode )
|
||||
{
|
||||
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addClicked() ) );
|
||||
connect( mAddButton, &QAbstractButton::clicked, this, &QgsOWSSourceSelect::addClicked );
|
||||
//set the current project CRS if available
|
||||
QgsCoordinateReferenceSystem currentRefSys = QgsProject::instance()->crs();
|
||||
//convert CRS id to epsg
|
||||
@ -658,7 +658,7 @@ void QgsOWSSourceSelect::on_mSearchButton_clicked()
|
||||
QgsDebugMsg( url.toString() );
|
||||
|
||||
QNetworkReply *r = QgsNetworkAccessManager::instance()->get( QNetworkRequest( url ) );
|
||||
connect( r, SIGNAL( finished() ), SLOT( searchFinished() ) );
|
||||
connect( r, &QNetworkReply::finished, this, &QgsOWSSourceSelect::searchFinished );
|
||||
}
|
||||
|
||||
void QgsOWSSourceSelect::searchFinished()
|
||||
|
@ -87,7 +87,7 @@ void QgsPanelWidget::openPanel( QgsPanelWidget *panel )
|
||||
dlg->setLayout( new QVBoxLayout() );
|
||||
dlg->layout()->addWidget( panel );
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok );
|
||||
connect( buttonBox, SIGNAL( accepted() ), dlg, SLOT( accept() ) );
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, dlg, &QDialog::accept );
|
||||
dlg->layout()->addWidget( buttonBox );
|
||||
dlg->exec();
|
||||
settings.setValue( key, dlg->saveGeometry() );
|
||||
|
@ -29,14 +29,14 @@ QgsPresetColorRampWidget::QgsPresetColorRampWidget( const QgsPresetSchemeColorRa
|
||||
setupUi( this );
|
||||
mTreeColors->setScheme( &mRamp );
|
||||
|
||||
connect( mButtonCopyColors, SIGNAL( clicked() ), mTreeColors, SLOT( copyColors() ) );
|
||||
connect( mButtonRemoveColor, SIGNAL( clicked() ), mTreeColors, SLOT( removeSelection() ) );
|
||||
connect( mButtonPasteColors, SIGNAL( clicked() ), mTreeColors, SLOT( pasteColors() ) );
|
||||
connect( mButtonImportColors, SIGNAL( clicked( bool ) ), mTreeColors, SLOT( showImportColorsDialog() ) );
|
||||
connect( mButtonExportColors, SIGNAL( clicked( bool ) ), mTreeColors, SLOT( showExportColorsDialog() ) );
|
||||
connect( mButtonCopyColors, &QAbstractButton::clicked, mTreeColors, &QgsColorSchemeList::copyColors );
|
||||
connect( mButtonRemoveColor, &QAbstractButton::clicked, mTreeColors, &QgsColorSchemeList::removeSelection );
|
||||
connect( mButtonPasteColors, &QAbstractButton::clicked, mTreeColors, &QgsColorSchemeList::pasteColors );
|
||||
connect( mButtonImportColors, &QAbstractButton::clicked, mTreeColors, &QgsColorSchemeList::showImportColorsDialog );
|
||||
connect( mButtonExportColors, &QAbstractButton::clicked, mTreeColors, &QgsColorSchemeList::showExportColorsDialog );
|
||||
|
||||
connect( mTreeColors->model(), SIGNAL( dataChanged( QModelIndex, QModelIndex, QVector<int> ) ), this, SLOT( schemeChanged() ) );
|
||||
connect( mTreeColors->model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( schemeChanged() ) );
|
||||
connect( mTreeColors->model(), &QAbstractItemModel::dataChanged, this, &QgsPresetColorRampWidget::schemeChanged );
|
||||
connect( mTreeColors->model(), &QAbstractItemModel::rowsRemoved, this, &QgsPresetColorRampWidget::schemeChanged );
|
||||
|
||||
updatePreview();
|
||||
}
|
||||
@ -75,7 +75,7 @@ void QgsPresetColorRampWidget::on_mButtonAddColor_clicked()
|
||||
QgsCompoundColorWidget *colorWidget = new QgsCompoundColorWidget( this, QgsRecentColorScheme::lastUsedColor(), QgsCompoundColorWidget::LayoutVertical );
|
||||
colorWidget->setPanelTitle( tr( "Select Color" ) );
|
||||
colorWidget->setAllowAlpha( true );
|
||||
connect( colorWidget, SIGNAL( currentColorChanged( QColor ) ), this, SLOT( newColorChanged( QColor ) ) );
|
||||
connect( colorWidget, &QgsCompoundColorWidget::currentColorChanged, this, &QgsPresetColorRampWidget::newColorChanged );
|
||||
openPanel( colorWidget );
|
||||
}
|
||||
else
|
||||
@ -112,9 +112,9 @@ QgsPresetColorRampDialog::QgsPresetColorRampDialog( const QgsPresetSchemeColorRa
|
||||
mWidget = new QgsPresetColorRampWidget( ramp );
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
connect( bbox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( bbox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
connect( mWidget, SIGNAL( changed() ), this, SIGNAL( changed() ) );
|
||||
connect( mWidget, &QgsPresetColorRampWidget::changed, this, &QgsPresetColorRampDialog::changed );
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ QgsProjectionSelectionWidget::QgsProjectionSelectionWidget( QWidget *parent )
|
||||
setFocusProxy( mButton );
|
||||
|
||||
connect( mButton, &QToolButton::clicked, this, &QgsProjectionSelectionWidget::selectCrs );
|
||||
connect( mCrsComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( comboIndexChanged( int ) ) );
|
||||
connect( mCrsComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsProjectionSelectionWidget::comboIndexChanged );
|
||||
}
|
||||
|
||||
QgsCoordinateReferenceSystem QgsProjectionSelectionWidget::crs() const
|
||||
|
@ -562,7 +562,7 @@ void QgsPropertyOverrideButton::showAssistant()
|
||||
dlg->setLayout( new QVBoxLayout() );
|
||||
dlg->layout()->addWidget( widget );
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok );
|
||||
connect( buttonBox, SIGNAL( accepted() ), dlg, SLOT( accept() ) );
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, dlg, &QDialog::accept );
|
||||
dlg->layout()->addWidget( buttonBox );
|
||||
dlg->exec();
|
||||
settings.setValue( key, dlg->saveGeometry() );
|
||||
|
@ -38,11 +38,11 @@ QgsQueryBuilder::QgsQueryBuilder( QgsVectorLayer *layer,
|
||||
|
||||
QPushButton *pbn = new QPushButton( tr( "&Test" ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( test() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsQueryBuilder::test );
|
||||
|
||||
pbn = new QPushButton( tr( "&Clear" ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( clear() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsQueryBuilder::clear );
|
||||
|
||||
setupGuiViews();
|
||||
|
||||
|
@ -88,11 +88,11 @@ QgsRasterFormatSaveOptionsWidget::QgsRasterFormatSaveOptionsWidget( QWidget *par
|
||||
<< PYRAMID_JPEG_YCBCR_COMPRESSION );
|
||||
}
|
||||
|
||||
connect( mProfileComboBox, SIGNAL( currentIndexChanged( const QString & ) ),
|
||||
this, SLOT( updateOptions() ) );
|
||||
connect( mOptionsTable, SIGNAL( cellChanged( int, int ) ), this, SLOT( optionsTableChanged() ) );
|
||||
connect( mOptionsHelpButton, SIGNAL( clicked() ), this, SLOT( helpOptions() ) );
|
||||
connect( mOptionsValidateButton, SIGNAL( clicked() ), this, SLOT( validateOptions() ) );
|
||||
connect( mProfileComboBox, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsRasterFormatSaveOptionsWidget::updateOptions );
|
||||
connect( mOptionsTable, &QTableWidget::cellChanged, this, &QgsRasterFormatSaveOptionsWidget::optionsTableChanged );
|
||||
connect( mOptionsHelpButton, &QAbstractButton::clicked, this, &QgsRasterFormatSaveOptionsWidget::helpOptions );
|
||||
connect( mOptionsValidateButton, &QAbstractButton::clicked, this, [ = ] { validateOptions(); } );
|
||||
|
||||
// create eventFilter to map right click to swapOptionsUI()
|
||||
// mOptionsLabel->installEventFilter( this );
|
||||
@ -614,7 +614,7 @@ bool QgsRasterFormatSaveOptionsWidget::eventFilter( QObject *obj, QEvent *event
|
||||
menu = new QMenu( this );
|
||||
QAction *action = new QAction( text, menu );
|
||||
menu->addAction( action );
|
||||
connect( action, SIGNAL( triggered() ), this, SLOT( swapOptionsUI() ) );
|
||||
connect( action, &QAction::triggered, this, &QgsRasterFormatSaveOptionsWidget::swapOptionsUI );
|
||||
menu->exec( mouseEvent->globalPos() );
|
||||
delete menu;
|
||||
return true;
|
||||
|
@ -107,8 +107,8 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
|
||||
mPyramidsUseExistingCheckBox->setVisible( false );
|
||||
|
||||
populatePyramidsLevels();
|
||||
connect( mPyramidsOptionsWidget, SIGNAL( overviewListChanged() ),
|
||||
this, SLOT( populatePyramidsLevels() ) );
|
||||
connect( mPyramidsOptionsWidget, &QgsRasterPyramidsOptionsWidget::overviewListChanged,
|
||||
this, &QgsRasterLayerSaveAsDialog::populatePyramidsLevels );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -128,8 +128,8 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
|
||||
//default to layer CRS - see http://hub.qgis.org/issues/14209 for discussion
|
||||
mCrsSelector->setCrs( mLayerCrs );
|
||||
|
||||
connect( mCrsSelector, SIGNAL( crsChanged( QgsCoordinateReferenceSystem ) ),
|
||||
this, SLOT( crsChanged() ) );
|
||||
connect( mCrsSelector, &QgsProjectionSelectionWidget::crsChanged,
|
||||
this, &QgsRasterLayerSaveAsDialog::crsChanged );
|
||||
|
||||
QPushButton *okButton = mButtonBox->button( QDialogButtonBox::Ok );
|
||||
if ( okButton )
|
||||
@ -141,7 +141,7 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
|
||||
mExtentGroupBox->setOriginalExtent( mDataProvider->extent(), mLayerCrs );
|
||||
mExtentGroupBox->setCurrentExtent( mCurrentExtent, mCurrentCrs );
|
||||
mExtentGroupBox->setOutputExtentFromOriginal();
|
||||
connect( mExtentGroupBox, SIGNAL( extentChanged( QgsRectangle ) ), this, SLOT( extentChanged() ) );
|
||||
connect( mExtentGroupBox, &QgsExtentGroupBox::extentChanged, this, &QgsRasterLayerSaveAsDialog::extentChanged );
|
||||
|
||||
recalcResolutionSize();
|
||||
}
|
||||
@ -562,7 +562,7 @@ void QgsRasterLayerSaveAsDialog::addNoDataRow( double min, double max )
|
||||
|
||||
adjustNoDataCellWidth( mNoDataTableWidget->rowCount() - 1, i );
|
||||
|
||||
connect( lineEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( noDataCellTextEdited( const QString & ) ) );
|
||||
connect( lineEdit, &QLineEdit::textEdited, this, &QgsRasterLayerSaveAsDialog::noDataCellTextEdited );
|
||||
}
|
||||
mNoDataTableWidget->resizeColumnsToContents();
|
||||
mNoDataTableWidget->resizeRowsToContents();
|
||||
|
@ -70,8 +70,8 @@ void QgsRasterPyramidsOptionsWidget::updateUi()
|
||||
// validate string, only space-separated positive integers are allowed
|
||||
lePyramidsLevels->setEnabled( cbxPyramidsLevelsCustom->isChecked() );
|
||||
lePyramidsLevels->setValidator( new QRegExpValidator( QRegExp( "(\\d*)(\\s\\d*)*" ), lePyramidsLevels ) );
|
||||
connect( lePyramidsLevels, SIGNAL( textEdited( const QString & ) ),
|
||||
this, SLOT( setOverviewList() ) );
|
||||
connect( lePyramidsLevels, &QLineEdit::textEdited,
|
||||
this, &QgsRasterPyramidsOptionsWidget::setOverviewList );
|
||||
|
||||
// overview list
|
||||
if ( mOverviewCheckBoxes.isEmpty() )
|
||||
@ -82,8 +82,8 @@ void QgsRasterPyramidsOptionsWidget::updateUi()
|
||||
Q_FOREACH ( int i, overviewList )
|
||||
{
|
||||
mOverviewCheckBoxes[ i ] = new QCheckBox( QString::number( i ), this );
|
||||
connect( mOverviewCheckBoxes[ i ], SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( setOverviewList() ) );
|
||||
connect( mOverviewCheckBoxes[ i ], &QCheckBox::toggled,
|
||||
this, &QgsRasterPyramidsOptionsWidget::setOverviewList );
|
||||
layoutPyramidsLevels->addWidget( mOverviewCheckBoxes[ i ] );
|
||||
}
|
||||
}
|
||||
@ -102,12 +102,12 @@ void QgsRasterPyramidsOptionsWidget::updateUi()
|
||||
|
||||
mSaveOptionsWidget->updateProfiles();
|
||||
|
||||
connect( cbxPyramidsFormat, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SIGNAL( someValueChanged() ) );
|
||||
connect( cboResamplingMethod, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SIGNAL( someValueChanged() ) );
|
||||
connect( mSaveOptionsWidget, SIGNAL( optionsChanged() ),
|
||||
this, SIGNAL( someValueChanged() ) );
|
||||
connect( cbxPyramidsFormat, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsRasterPyramidsOptionsWidget::someValueChanged );
|
||||
connect( cboResamplingMethod, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsRasterPyramidsOptionsWidget::someValueChanged );
|
||||
connect( mSaveOptionsWidget, &QgsRasterFormatSaveOptionsWidget::optionsChanged,
|
||||
this, &QgsRasterPyramidsOptionsWidget::someValueChanged );
|
||||
}
|
||||
|
||||
QString QgsRasterPyramidsOptionsWidget::resamplingMethod() const
|
||||
|
@ -126,15 +126,16 @@ QgsRelationEditorWidget::QgsRelationEditorWidget( QWidget *parent )
|
||||
|
||||
mRelationLayout->addWidget( mDualView );
|
||||
|
||||
connect( this, SIGNAL( collapsedStateChanged( bool ) ), this, SLOT( onCollapsedStateChanged( bool ) ) );
|
||||
connect( mViewModeButtonGroup, SIGNAL( buttonClicked( int ) ), this, SLOT( setViewMode( int ) ) );
|
||||
connect( mToggleEditingButton, SIGNAL( clicked( bool ) ), this, SLOT( toggleEditing( bool ) ) );
|
||||
connect( mSaveEditsButton, SIGNAL( clicked() ), this, SLOT( saveEdits() ) );
|
||||
connect( mAddFeatureButton, SIGNAL( clicked() ), this, SLOT( addFeature() ) );
|
||||
connect( mDeleteFeatureButton, SIGNAL( clicked() ), this, SLOT( deleteFeature() ) );
|
||||
connect( mLinkFeatureButton, SIGNAL( clicked() ), this, SLOT( linkFeature() ) );
|
||||
connect( mUnlinkFeatureButton, SIGNAL( clicked() ), this, SLOT( unlinkFeature() ) );
|
||||
connect( mFeatureSelectionMgr, SIGNAL( selectionChanged( QgsFeatureIds, QgsFeatureIds, bool ) ), this, SLOT( updateButtons() ) );
|
||||
connect( this, &QgsCollapsibleGroupBoxBasic::collapsedStateChanged, this, &QgsRelationEditorWidget::onCollapsedStateChanged );
|
||||
connect( mViewModeButtonGroup, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ),
|
||||
this, static_cast<void ( QgsRelationEditorWidget::* )( int )>( &QgsRelationEditorWidget::setViewMode ) );
|
||||
connect( mToggleEditingButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::toggleEditing );
|
||||
connect( mSaveEditsButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::saveEdits );
|
||||
connect( mAddFeatureButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::addFeature );
|
||||
connect( mDeleteFeatureButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::deleteFeature );
|
||||
connect( mLinkFeatureButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::linkFeature );
|
||||
connect( mUnlinkFeatureButton, &QAbstractButton::clicked, this, &QgsRelationEditorWidget::unlinkFeature );
|
||||
connect( mFeatureSelectionMgr, &QgsIFeatureSelectionManager::selectionChanged, this, &QgsRelationEditorWidget::updateButtons );
|
||||
|
||||
// Set initial state for add/remove etc. buttons
|
||||
updateButtons();
|
||||
@ -144,15 +145,15 @@ void QgsRelationEditorWidget::setRelationFeature( const QgsRelation &relation, c
|
||||
{
|
||||
if ( mRelation.isValid() )
|
||||
{
|
||||
disconnect( mRelation.referencingLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mRelation.referencingLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mRelation.referencingLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
disconnect( mRelation.referencingLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
}
|
||||
|
||||
mRelation = relation;
|
||||
mFeature = feature;
|
||||
|
||||
connect( mRelation.referencingLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
connect( mRelation.referencingLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
connect( mRelation.referencingLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
connect( mRelation.referencingLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
|
||||
if ( mShowLabel )
|
||||
setTitle( relation.name() );
|
||||
@ -188,14 +189,14 @@ void QgsRelationEditorWidget::setRelations( const QgsRelation &relation, const Q
|
||||
{
|
||||
if ( mRelation.isValid() )
|
||||
{
|
||||
disconnect( mRelation.referencingLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mRelation.referencingLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mRelation.referencingLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
disconnect( mRelation.referencingLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
}
|
||||
|
||||
if ( mNmRelation.isValid() )
|
||||
{
|
||||
disconnect( mNmRelation.referencedLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mNmRelation.referencedLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
disconnect( mNmRelation.referencedLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
disconnect( mNmRelation.referencedLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
}
|
||||
|
||||
mRelation = relation;
|
||||
@ -215,13 +216,13 @@ void QgsRelationEditorWidget::setRelations( const QgsRelation &relation, const Q
|
||||
}
|
||||
}
|
||||
|
||||
connect( mRelation.referencingLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
connect( mRelation.referencingLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
connect( mRelation.referencingLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
connect( mRelation.referencingLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
|
||||
if ( mNmRelation.isValid() )
|
||||
{
|
||||
connect( mNmRelation.referencingLayer(), SIGNAL( editingStarted() ), this, SLOT( updateButtons() ) );
|
||||
connect( mNmRelation.referencingLayer(), SIGNAL( editingStopped() ), this, SLOT( updateButtons() ) );
|
||||
connect( mNmRelation.referencingLayer(), &QgsVectorLayer::editingStarted, this, &QgsRelationEditorWidget::updateButtons );
|
||||
connect( mNmRelation.referencingLayer(), &QgsVectorLayer::editingStopped, this, &QgsRelationEditorWidget::updateButtons );
|
||||
}
|
||||
|
||||
setTitle( relation.name() );
|
||||
|
@ -34,8 +34,8 @@ QgsScaleComboBox::QgsScaleComboBox( QWidget *parent )
|
||||
setEditable( true );
|
||||
setInsertPolicy( QComboBox::NoInsert );
|
||||
setCompleter( nullptr );
|
||||
connect( this, SIGNAL( activated( const QString & ) ), this, SLOT( fixupScale() ) );
|
||||
connect( lineEdit(), SIGNAL( editingFinished() ), this, SLOT( fixupScale() ) );
|
||||
connect( this, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::activated ), this, &QgsScaleComboBox::fixupScale );
|
||||
connect( lineEdit(), &QLineEdit::editingFinished, this, &QgsScaleComboBox::fixupScale );
|
||||
fixupScale();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent )
|
||||
|
||||
mMinimumScaleWidget = new QgsScaleWidget( this );
|
||||
mMaximumScaleWidget = new QgsScaleWidget( this );
|
||||
connect( mMinimumScaleWidget, SIGNAL( scaleChanged( double ) ), mMaximumScaleWidget, SLOT( setMinScale( double ) ) );
|
||||
connect( mMinimumScaleWidget, &QgsScaleWidget::scaleChanged, mMaximumScaleWidget, &QgsScaleWidget::setMinScale );
|
||||
mMinimumScaleWidget->setShowCurrentScaleButton( true );
|
||||
mMaximumScaleWidget->setShowCurrentScaleButton( true );
|
||||
reloadProjectScales();
|
||||
@ -63,8 +63,8 @@ QgsScaleRangeWidget::QgsScaleRangeWidget( QWidget *parent )
|
||||
mLayout->setColumnStretch( 2, 0 );
|
||||
mLayout->setColumnStretch( 3, 3 );
|
||||
|
||||
connect( mMinimumScaleWidget, SIGNAL( scaleChanged( double ) ), this, SLOT( emitRangeChanged() ) );
|
||||
connect( mMaximumScaleWidget, SIGNAL( scaleChanged( double ) ), this, SLOT( emitRangeChanged() ) );
|
||||
connect( mMinimumScaleWidget, &QgsScaleWidget::scaleChanged, this, &QgsScaleRangeWidget::emitRangeChanged );
|
||||
connect( mMaximumScaleWidget, &QgsScaleWidget::scaleChanged, this, &QgsScaleRangeWidget::emitRangeChanged );
|
||||
}
|
||||
|
||||
void QgsScaleRangeWidget::reloadProjectScales()
|
||||
|
@ -47,8 +47,8 @@ QgsScaleVisibilityDialog::QgsScaleVisibilityDialog( QWidget *parent, const QStri
|
||||
gbLayout->addWidget( mScaleWidget, 0, 0 );
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok, Qt::Horizontal, this );
|
||||
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
|
||||
dlgLayout->addWidget( mGroupBox, 0, 0 );
|
||||
dlgLayout->addWidget( buttonBox, 1, 0 );
|
||||
|
@ -37,8 +37,8 @@ QgsScaleWidget::QgsScaleWidget( QWidget *parent )
|
||||
layout->addWidget( mCurrentScaleButton );
|
||||
mCurrentScaleButton->hide();
|
||||
|
||||
connect( mScaleComboBox, SIGNAL( scaleChanged( double ) ), this, SIGNAL( scaleChanged( double ) ) );
|
||||
connect( mCurrentScaleButton, SIGNAL( clicked() ), this, SLOT( setScaleFromCanvas() ) );
|
||||
connect( mScaleComboBox, &QgsScaleComboBox::scaleChanged, this, &QgsScaleWidget::scaleChanged );
|
||||
connect( mCurrentScaleButton, &QAbstractButton::clicked, this, &QgsScaleWidget::setScaleFromCanvas );
|
||||
}
|
||||
|
||||
void QgsScaleWidget::setShowCurrentScaleButton( bool showCurrentScaleButton )
|
||||
|
@ -44,21 +44,21 @@ QgsSearchQueryBuilder::QgsSearchQueryBuilder( QgsVectorLayer *layer,
|
||||
|
||||
QPushButton *pbn = new QPushButton( tr( "&Test" ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnTest_clicked() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsSearchQueryBuilder::on_btnTest_clicked );
|
||||
|
||||
pbn = new QPushButton( tr( "&Clear" ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( on_btnClear_clicked() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsSearchQueryBuilder::on_btnClear_clicked );
|
||||
|
||||
pbn = new QPushButton( tr( "&Save..." ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
pbn->setToolTip( tr( "Save query to an xml file" ) );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( saveQuery() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsSearchQueryBuilder::saveQuery );
|
||||
|
||||
pbn = new QPushButton( tr( "&Load..." ) );
|
||||
buttonBox->addButton( pbn, QDialogButtonBox::ActionRole );
|
||||
pbn->setToolTip( tr( "Load query from xml file" ) );
|
||||
connect( pbn, SIGNAL( clicked() ), this, SLOT( loadQuery() ) );
|
||||
connect( pbn, &QAbstractButton::clicked, this, &QgsSearchQueryBuilder::loadQuery );
|
||||
|
||||
if ( layer )
|
||||
lblDataUri->setText( layer->name() );
|
||||
|
@ -94,7 +94,7 @@ bool QgsShortcutsManager::registerAction( QAction *action, const QString &defaul
|
||||
#endif
|
||||
|
||||
mActions.insert( action, defaultSequence );
|
||||
connect( action, SIGNAL( destroyed() ), this, SLOT( actionDestroyed() ) );
|
||||
connect( action, &QObject::destroyed, this, &QgsShortcutsManager::actionDestroyed );
|
||||
|
||||
QString actionText = action->text();
|
||||
actionText.remove( '&' ); // remove the accelerator
|
||||
@ -119,7 +119,7 @@ bool QgsShortcutsManager::registerShortcut( QShortcut *shortcut, const QString &
|
||||
#endif
|
||||
|
||||
mShortcuts.insert( shortcut, defaultSequence );
|
||||
connect( shortcut, SIGNAL( destroyed() ), this, SLOT( shortcutDestroyed() ) );
|
||||
connect( shortcut, &QObject::destroyed, this, &QgsShortcutsManager::shortcutDestroyed );
|
||||
|
||||
QString shortcutName = shortcut->objectName();
|
||||
|
||||
|
@ -105,7 +105,7 @@ void QgsSlider::update()
|
||||
QSlider::setValue( qCeil( ( mValue.toDouble() - mMin.toDouble() ) / mStep.toDouble() ) );
|
||||
}
|
||||
|
||||
connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
|
||||
connect( this, &QSlider::valueChanged, this, &QgsSlider::onValueChanged );
|
||||
}
|
||||
|
||||
QVariant QgsSlider::variantValue() const
|
||||
@ -113,7 +113,7 @@ QVariant QgsSlider::variantValue() const
|
||||
return mValue;
|
||||
}
|
||||
|
||||
void QgsSlider::valueChanged( int value )
|
||||
void QgsSlider::onValueChanged( int value )
|
||||
{
|
||||
if ( mMin.isNull() || mMax.isNull() || mStep.isNull() )
|
||||
{
|
||||
|
@ -40,8 +40,8 @@ class GUI_EXPORT QgsSlider : public QSlider
|
||||
signals:
|
||||
void valueChanged( const QVariant & );
|
||||
|
||||
protected slots:
|
||||
void valueChanged( int );
|
||||
private slots:
|
||||
void onValueChanged( int );
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent *event ) override;
|
||||
|
@ -57,22 +57,22 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
|
||||
|
||||
mAddButton = buttonBox->addButton( tr( "&Add" ), QDialogButtonBox::ActionRole );
|
||||
mAddButton->setEnabled( false );
|
||||
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addButtonClicked() ) );
|
||||
connect( mAddButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addButtonClicked );
|
||||
|
||||
if ( mServiceType == FeatureService )
|
||||
{
|
||||
mBuildQueryButton = buttonBox->addButton( tr( "&Build query" ), QDialogButtonBox::ActionRole );
|
||||
mBuildQueryButton->setDisabled( true );
|
||||
connect( mBuildQueryButton, SIGNAL( clicked() ), this, SLOT( buildQueryButtonClicked() ) );
|
||||
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::buildQueryButtonClicked );
|
||||
}
|
||||
|
||||
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( btnNew, SIGNAL( clicked() ), this, SLOT( addEntryToServerList() ) );
|
||||
connect( btnEdit, SIGNAL( clicked() ), this, SLOT( modifyEntryOfServerList() ) );
|
||||
connect( btnDelete, SIGNAL( clicked() ), this, SLOT( deleteEntryOfServerList() ) );
|
||||
connect( btnConnect, SIGNAL( clicked() ), this, SLOT( connectToServer() ) );
|
||||
connect( btnChangeSpatialRefSys, SIGNAL( clicked() ), this, SLOT( changeCrs() ) );
|
||||
connect( lineFilter, SIGNAL( textChanged( QString ) ), this, SLOT( filterChanged( QString ) ) );
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( btnNew, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addEntryToServerList );
|
||||
connect( btnEdit, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::modifyEntryOfServerList );
|
||||
connect( btnDelete, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::deleteEntryOfServerList );
|
||||
connect( btnConnect, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::connectToServer );
|
||||
connect( btnChangeSpatialRefSys, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::changeCrs );
|
||||
connect( lineFilter, &QLineEdit::textChanged, this, &QgsSourceSelectDialog::filterChanged );
|
||||
populateConnectionList();
|
||||
mProjectionSelector = new QgsProjectionSelectionDialog( this );
|
||||
mProjectionSelector->setMessage( QString() );
|
||||
@ -104,8 +104,8 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
|
||||
mModelProxy->setSortCaseSensitivity( Qt::CaseInsensitive );
|
||||
treeView->setModel( mModelProxy );
|
||||
|
||||
connect( treeView, SIGNAL( doubleClicked( const QModelIndex & ) ), this, SLOT( treeWidgetItemDoubleClicked( const QModelIndex & ) ) );
|
||||
connect( treeView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), this, SLOT( treeWidgetCurrentRowChanged( const QModelIndex &, const QModelIndex & ) ) );
|
||||
connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsSourceSelectDialog::treeWidgetItemDoubleClicked );
|
||||
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsSourceSelectDialog::treeWidgetCurrentRowChanged );
|
||||
}
|
||||
|
||||
QgsSourceSelectDialog::~QgsSourceSelectDialog()
|
||||
|
@ -46,21 +46,21 @@ QgsSQLComposerDialog::QgsSQLComposerDialog( QWidget *parent, Qt::WindowFlags fl
|
||||
mTablesCombo->view()->installEventFilter( this );
|
||||
|
||||
|
||||
connect( mButtonBox->button( QDialogButtonBox::Reset ), SIGNAL( clicked() ),
|
||||
this, SLOT( reset() ) );
|
||||
connect( mButtonBox->button( QDialogButtonBox::Reset ), &QAbstractButton::clicked,
|
||||
this, &QgsSQLComposerDialog::reset );
|
||||
|
||||
connect( mQueryEdit, SIGNAL( textChanged() ),
|
||||
this, SLOT( splitSQLIntoFields() ) );
|
||||
connect( mColumnsEditor, SIGNAL( textChanged() ),
|
||||
this, SLOT( buildSQLFromFields() ) );
|
||||
connect( mTablesEditor, SIGNAL( textChanged( const QString & ) ),
|
||||
this, SLOT( buildSQLFromFields() ) );
|
||||
connect( mWhereEditor, SIGNAL( textChanged() ),
|
||||
this, SLOT( buildSQLFromFields() ) );
|
||||
connect( mOrderEditor, SIGNAL( textChanged() ),
|
||||
this, SLOT( buildSQLFromFields() ) );
|
||||
connect( mTableJoins, SIGNAL( cellChanged( int, int ) ),
|
||||
this, SLOT( buildSQLFromFields() ) );
|
||||
connect( mQueryEdit, &QsciScintilla::textChanged,
|
||||
this, &QgsSQLComposerDialog::splitSQLIntoFields );
|
||||
connect( mColumnsEditor, &QTextEdit::textChanged,
|
||||
this, &QgsSQLComposerDialog::buildSQLFromFields );
|
||||
connect( mTablesEditor, &QLineEdit::textChanged,
|
||||
this, &QgsSQLComposerDialog::buildSQLFromFields );
|
||||
connect( mWhereEditor, &QTextEdit::textChanged,
|
||||
this, &QgsSQLComposerDialog::buildSQLFromFields );
|
||||
connect( mOrderEditor, &QTextEdit::textChanged,
|
||||
this, &QgsSQLComposerDialog::buildSQLFromFields );
|
||||
connect( mTableJoins, &QTableWidget::cellChanged,
|
||||
this, &QgsSQLComposerDialog::buildSQLFromFields );
|
||||
|
||||
QStringList baseList;
|
||||
baseList << QStringLiteral( "SELECT" );
|
||||
|
@ -52,7 +52,7 @@ QgsSublayersDialog::QgsSublayersDialog( ProviderType providerType, const QString
|
||||
// add a "Select All" button - would be nicer with an icon
|
||||
QPushButton *button = new QPushButton( tr( "Select All" ) );
|
||||
buttonBox->addButton( button, QDialogButtonBox::ActionRole );
|
||||
connect( button, SIGNAL( pressed() ), layersTable, SLOT( selectAll() ) );
|
||||
connect( button, &QAbstractButton::pressed, layersTable, &QTreeView::selectAll );
|
||||
// connect( pbnSelectNone, SIGNAL( pressed() ), SLOT( layersTable->selectNone() ) );
|
||||
|
||||
QgsSettings settings;
|
||||
|
@ -28,7 +28,7 @@ QgsSubstitutionListWidget::QgsSubstitutionListWidget( QWidget *parent )
|
||||
: QgsPanelWidget( parent )
|
||||
{
|
||||
setupUi( this );
|
||||
connect( mTableSubstitutions, SIGNAL( cellChanged( int, int ) ), this, SLOT( tableChanged() ) );
|
||||
connect( mTableSubstitutions, &QTableWidget::cellChanged, this, &QgsSubstitutionListWidget::tableChanged );
|
||||
}
|
||||
|
||||
void QgsSubstitutionListWidget::setSubstitutions( const QgsStringReplacementCollection &substitutions )
|
||||
@ -190,12 +190,12 @@ void QgsSubstitutionListWidget::addSubstitution( const QgsStringReplacement &sub
|
||||
QCheckBox *caseSensitiveChk = new QCheckBox( this );
|
||||
caseSensitiveChk->setChecked( substitution.caseSensitive() );
|
||||
mTableSubstitutions->setCellWidget( row, 2, caseSensitiveChk );
|
||||
connect( caseSensitiveChk, SIGNAL( toggled( bool ) ), this, SLOT( tableChanged() ) );
|
||||
connect( caseSensitiveChk, &QAbstractButton::toggled, this, &QgsSubstitutionListWidget::tableChanged );
|
||||
|
||||
QCheckBox *wholeWordChk = new QCheckBox( this );
|
||||
wholeWordChk->setChecked( substitution.wholeWordOnly() );
|
||||
mTableSubstitutions->setCellWidget( row, 3, wholeWordChk );
|
||||
connect( wholeWordChk, SIGNAL( toggled( bool ) ), this, SLOT( tableChanged() ) );
|
||||
connect( wholeWordChk, &QAbstractButton::toggled, this, &QgsSubstitutionListWidget::tableChanged );
|
||||
}
|
||||
|
||||
|
||||
@ -213,8 +213,8 @@ QgsSubstitutionListDialog::QgsSubstitutionListDialog( QWidget *parent )
|
||||
mWidget = new QgsSubstitutionListWidget();
|
||||
vLayout->addWidget( mWidget );
|
||||
QDialogButtonBox *bbox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal );
|
||||
connect( bbox, SIGNAL( accepted() ), this, SLOT( accept() ) );
|
||||
connect( bbox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( bbox, &QDialogButtonBox::accepted, this, &QDialog::accept );
|
||||
connect( bbox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
vLayout->addWidget( bbox );
|
||||
setLayout( vLayout );
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ QgsTableWidgetBase::QgsTableWidgetBase( QWidget *parent )
|
||||
void QgsTableWidgetBase::init( QAbstractTableModel *model )
|
||||
{
|
||||
tableView->setModel( model );
|
||||
connect( tableView->selectionModel(), SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection & ) ), this, SLOT( onSelectionChanged() ) );
|
||||
connect( model, SIGNAL( dataChanged( const QModelIndex &, const QModelIndex & ) ), this, SIGNAL( valueChanged() ) );
|
||||
connect( tableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsTableWidgetBase::onSelectionChanged );
|
||||
connect( model, &QAbstractItemModel::dataChanged, this, &QgsTableWidgetBase::valueChanged );
|
||||
}
|
||||
|
||||
void QgsTableWidgetBase::on_addButton_clicked()
|
||||
|
@ -68,7 +68,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
|
||||
mPreviewScaleComboBox->setMapCanvas( mMapCanvas );
|
||||
mPreviewScaleComboBox->setShowCurrentScaleButton( true );
|
||||
connect( mPreviewScaleComboBox, SIGNAL( scaleChanged( double ) ), this, SLOT( previewScaleChanged( double ) ) );
|
||||
connect( mPreviewScaleComboBox, &QgsScaleWidget::scaleChanged, this, &QgsTextFormatWidget::previewScaleChanged );
|
||||
|
||||
Q_FOREACH ( QgsUnitSelectionWidget *unitWidget, findChildren<QgsUnitSelectionWidget *>() )
|
||||
{
|
||||
@ -120,23 +120,23 @@ void QgsTextFormatWidget::initWidget()
|
||||
mRefFont = lblFontPreview->font();
|
||||
|
||||
// internal connections
|
||||
connect( mFontTranspSlider, SIGNAL( valueChanged( int ) ), mFontTranspSpinBox, SLOT( setValue( int ) ) );
|
||||
connect( mFontTranspSpinBox, SIGNAL( valueChanged( int ) ), mFontTranspSlider, SLOT( setValue( int ) ) );
|
||||
connect( mBufferTranspSlider, SIGNAL( valueChanged( int ) ), mBufferTranspSpinBox, SLOT( setValue( int ) ) );
|
||||
connect( mBufferTranspSpinBox, SIGNAL( valueChanged( int ) ), mBufferTranspSlider, SLOT( setValue( int ) ) );
|
||||
connect( mShapeTranspSlider, SIGNAL( valueChanged( int ) ), mShapeTranspSpinBox, SLOT( setValue( int ) ) );
|
||||
connect( mShapeTranspSpinBox, SIGNAL( valueChanged( int ) ), mShapeTranspSlider, SLOT( setValue( int ) ) );
|
||||
connect( mShadowOffsetAngleDial, SIGNAL( valueChanged( int ) ), mShadowOffsetAngleSpnBx, SLOT( setValue( int ) ) );
|
||||
connect( mShadowOffsetAngleSpnBx, SIGNAL( valueChanged( int ) ), mShadowOffsetAngleDial, SLOT( setValue( int ) ) );
|
||||
connect( mShadowTranspSlider, SIGNAL( valueChanged( int ) ), mShadowTranspSpnBx, SLOT( setValue( int ) ) );
|
||||
connect( mShadowTranspSpnBx, SIGNAL( valueChanged( int ) ), mShadowTranspSlider, SLOT( setValue( int ) ) );
|
||||
connect( mLimitLabelChkBox, SIGNAL( toggled( bool ) ), mLimitLabelSpinBox, SLOT( setEnabled( bool ) ) );
|
||||
connect( mCheckBoxSubstituteText, SIGNAL( toggled( bool ) ), mToolButtonConfigureSubstitutes, SLOT( setEnabled( bool ) ) );
|
||||
connect( mFontTranspSlider, &QAbstractSlider::valueChanged, mFontTranspSpinBox, &QSpinBox::setValue );
|
||||
connect( mFontTranspSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mFontTranspSlider, &QAbstractSlider::setValue );
|
||||
connect( mBufferTranspSlider, &QAbstractSlider::valueChanged, mBufferTranspSpinBox, &QSpinBox::setValue );
|
||||
connect( mBufferTranspSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mBufferTranspSlider, &QAbstractSlider::setValue );
|
||||
connect( mShapeTranspSlider, &QAbstractSlider::valueChanged, mShapeTranspSpinBox, &QSpinBox::setValue );
|
||||
connect( mShapeTranspSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mShapeTranspSlider, &QAbstractSlider::setValue );
|
||||
connect( mShadowOffsetAngleDial, &QAbstractSlider::valueChanged, mShadowOffsetAngleSpnBx, &QSpinBox::setValue );
|
||||
connect( mShadowOffsetAngleSpnBx, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mShadowOffsetAngleDial, &QAbstractSlider::setValue );
|
||||
connect( mShadowTranspSlider, &QAbstractSlider::valueChanged, mShadowTranspSpnBx, &QSpinBox::setValue );
|
||||
connect( mShadowTranspSpnBx, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), mShadowTranspSlider, &QAbstractSlider::setValue );
|
||||
connect( mLimitLabelChkBox, &QAbstractButton::toggled, mLimitLabelSpinBox, &QWidget::setEnabled );
|
||||
connect( mCheckBoxSubstituteText, &QAbstractButton::toggled, mToolButtonConfigureSubstitutes, &QWidget::setEnabled );
|
||||
|
||||
//connections to prevent users removing all line placement positions
|
||||
connect( chkLineAbove, SIGNAL( toggled( bool ) ), this, SLOT( updateLinePlacementOptions() ) );
|
||||
connect( chkLineBelow, SIGNAL( toggled( bool ) ), this, SLOT( updateLinePlacementOptions() ) );
|
||||
connect( chkLineOn, SIGNAL( toggled( bool ) ), this, SLOT( updateLinePlacementOptions() ) );
|
||||
connect( chkLineAbove, &QAbstractButton::toggled, this, &QgsTextFormatWidget::updateLinePlacementOptions );
|
||||
connect( chkLineBelow, &QAbstractButton::toggled, this, &QgsTextFormatWidget::updateLinePlacementOptions );
|
||||
connect( chkLineOn, &QAbstractButton::toggled, this, &QgsTextFormatWidget::updateLinePlacementOptions );
|
||||
|
||||
populateFontCapitalsComboBox();
|
||||
|
||||
@ -188,8 +188,8 @@ void QgsTextFormatWidget::initWidget()
|
||||
//mShapeCollisionsChkBx->setVisible( false ); // until implemented
|
||||
|
||||
// post updatePlacementWidgets() connections
|
||||
connect( chkLineAbove, SIGNAL( toggled( bool ) ), this, SLOT( updatePlacementWidgets() ) );
|
||||
connect( chkLineBelow, SIGNAL( toggled( bool ) ), this, SLOT( updatePlacementWidgets() ) );
|
||||
connect( chkLineAbove, &QAbstractButton::toggled, this, &QgsTextFormatWidget::updatePlacementWidgets );
|
||||
connect( chkLineBelow, &QAbstractButton::toggled, this, &QgsTextFormatWidget::updatePlacementWidgets );
|
||||
|
||||
// setup point placement button group
|
||||
mPlacePointBtnGrp = new QButtonGroup( this );
|
||||
@ -197,7 +197,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
mPlacePointBtnGrp->addButton( radAroundPoint, ( int )QgsPalLayerSettings::AroundPoint );
|
||||
mPlacePointBtnGrp->addButton( radOverPoint, ( int )QgsPalLayerSettings::OverPoint );
|
||||
mPlacePointBtnGrp->setExclusive( true );
|
||||
connect( mPlacePointBtnGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( updatePlacementWidgets() ) );
|
||||
connect( mPlacePointBtnGrp, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsTextFormatWidget::updatePlacementWidgets );
|
||||
|
||||
// setup line placement button group (assigned enum id currently unused)
|
||||
mPlaceLineBtnGrp = new QButtonGroup( this );
|
||||
@ -205,7 +205,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
mPlaceLineBtnGrp->addButton( radLineCurved, ( int )QgsPalLayerSettings::Curved );
|
||||
mPlaceLineBtnGrp->addButton( radLineHorizontal, ( int )QgsPalLayerSettings::Horizontal );
|
||||
mPlaceLineBtnGrp->setExclusive( true );
|
||||
connect( mPlaceLineBtnGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( updatePlacementWidgets() ) );
|
||||
connect( mPlaceLineBtnGrp, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsTextFormatWidget::updatePlacementWidgets );
|
||||
|
||||
// setup polygon placement button group (assigned enum id currently unused)
|
||||
mPlacePolygonBtnGrp = new QButtonGroup( this );
|
||||
@ -216,7 +216,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
mPlacePolygonBtnGrp->addButton( radPolygonPerimeter, ( int )QgsPalLayerSettings::Line );
|
||||
mPlacePolygonBtnGrp->addButton( radPolygonPerimeterCurved, ( int )QgsPalLayerSettings::PerimeterCurved );
|
||||
mPlacePolygonBtnGrp->setExclusive( true );
|
||||
connect( mPlacePolygonBtnGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( updatePlacementWidgets() ) );
|
||||
connect( mPlacePolygonBtnGrp, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsTextFormatWidget::updatePlacementWidgets );
|
||||
|
||||
// TODO: is this necessary? maybe just use the data defined-only rotation?
|
||||
mPointAngleDDBtn->setVisible( false );
|
||||
@ -229,9 +229,9 @@ void QgsTextFormatWidget::initWidget()
|
||||
}
|
||||
|
||||
connect( groupBox_mPreview,
|
||||
SIGNAL( collapsedStateChanged( bool ) ),
|
||||
&QgsCollapsibleGroupBoxBasic::collapsedStateChanged,
|
||||
this,
|
||||
SLOT( collapseSample( bool ) ) );
|
||||
&QgsTextFormatWidget::collapseSample );
|
||||
|
||||
// get rid of annoying outer focus rect on Mac
|
||||
mLabelingOptionsListWidget->setAttribute( Qt::WA_MacShowFocusRect, false );
|
||||
@ -251,7 +251,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
}
|
||||
|
||||
// set up reverse connection from stack to list
|
||||
connect( mLabelStackedWidget, SIGNAL( currentChanged( int ) ), this, SLOT( optionsStackedWidget_CurrentChanged( int ) ) );
|
||||
connect( mLabelStackedWidget, &QStackedWidget::currentChanged, this, &QgsTextFormatWidget::optionsStackedWidget_CurrentChanged );
|
||||
|
||||
// restore dialog, splitters and current tab
|
||||
mFontPreviewSplitter->restoreState( settings.value( QStringLiteral( "Windows/Labeling/FontPreviewSplitState" ) ).toByteArray() );
|
||||
@ -475,7 +475,7 @@ void QgsTextFormatWidget::initWidget()
|
||||
<< mCheckBoxSubstituteText;
|
||||
connectValueChanged( widgets, SLOT( updatePreview() ) );
|
||||
|
||||
connect( mQuadrantBtnGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( updatePreview() ) );
|
||||
connect( mQuadrantBtnGrp, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsTextFormatWidget::updatePreview );
|
||||
|
||||
// set correct initial tab to match displayed setting page
|
||||
whileBlocking( mOptionsTab )->setCurrentIndex( mLabelStackedWidget->currentIndex() );
|
||||
@ -1352,7 +1352,7 @@ void QgsTextFormatWidget::on_mToolButtonConfigureSubstitutes_clicked()
|
||||
QgsSubstitutionListWidget *widget = new QgsSubstitutionListWidget( panel );
|
||||
widget->setPanelTitle( tr( "Substitutions" ) );
|
||||
widget->setSubstitutions( mSubstitutions );
|
||||
connect( widget, SIGNAL( substitutionsChanged( QgsStringReplacementCollection ) ), this, SLOT( onSubstitutionsChanged( QgsStringReplacementCollection ) ) );
|
||||
connect( widget, &QgsSubstitutionListWidget::substitutionsChanged, this, &QgsTextFormatWidget::onSubstitutionsChanged );
|
||||
panel->openPanel( widget );
|
||||
return;
|
||||
}
|
||||
@ -1416,8 +1416,8 @@ QgsTextFormatDialog::QgsTextFormatDialog( const QgsTextFormat &format, QgsMapCan
|
||||
QgsSettings settings;
|
||||
restoreGeometry( settings.value( QStringLiteral( "Windows/TextFormatDialog/geometry" ) ).toByteArray() );
|
||||
|
||||
connect( buttonBox->button( QDialogButtonBox::Ok ), SIGNAL( clicked() ), this, SLOT( accept() ) );
|
||||
connect( buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL( clicked() ), this, SLOT( reject() ) );
|
||||
connect( buttonBox->button( QDialogButtonBox::Ok ), &QAbstractButton::clicked, this, &QDialog::accept );
|
||||
connect( buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QDialog::reject );
|
||||
}
|
||||
|
||||
QgsTextFormatDialog::~QgsTextFormatDialog()
|
||||
@ -1435,7 +1435,7 @@ QgsTextFormatPanelWidget::QgsTextFormatPanelWidget( const QgsTextFormat &format,
|
||||
: QgsPanelWidgetWrapper( new QgsTextFormatWidget( format, mapCanvas ), parent )
|
||||
{
|
||||
mFormatWidget = qobject_cast< QgsTextFormatWidget * >( widget() );
|
||||
connect( mFormatWidget, SIGNAL( widgetChanged() ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mFormatWidget, &QgsTextFormatWidget::widgetChanged, this, &QgsPanelWidget::widgetChanged );
|
||||
}
|
||||
|
||||
QgsTextFormat QgsTextFormatPanelWidget::format() const
|
||||
|
@ -28,8 +28,8 @@ QgsUserInputDockWidget::QgsUserInputDockWidget( QWidget *parent )
|
||||
w->setLayout( mLayout );
|
||||
setWidget( w );
|
||||
|
||||
connect( this, SIGNAL( dockLocationChanged( Qt::DockWidgetArea ) ), this, SLOT( areaChanged( Qt::DockWidgetArea ) ) );
|
||||
connect( this, SIGNAL( topLevelChanged( bool ) ), this, SLOT( floatingChanged( bool ) ) );
|
||||
connect( this, &QDockWidget::dockLocationChanged, this, &QgsUserInputDockWidget::areaChanged );
|
||||
connect( this, &QDockWidget::topLevelChanged, this, &QgsUserInputDockWidget::floatingChanged );
|
||||
hide();
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ void QgsUserInputDockWidget::addUserInputWidget( QWidget *widget )
|
||||
}
|
||||
mLayout->addWidget( widget );
|
||||
|
||||
connect( widget, SIGNAL( destroyed( QObject * ) ), this, SLOT( widgetDestroyed( QObject * ) ) );
|
||||
connect( widget, &QObject::destroyed, this, &QgsUserInputDockWidget::widgetDestroyed );
|
||||
|
||||
mWidgetList.insert( widget, line );
|
||||
|
||||
|
@ -61,10 +61,10 @@ QgsVariableEditorWidget::QgsVariableEditorWidget( QWidget *parent )
|
||||
mRemoveButton->setToolTip( tr( "Remove variable" ) );
|
||||
horizontalLayout->addWidget( mRemoveButton );
|
||||
verticalLayout->addLayout( horizontalLayout );
|
||||
connect( mRemoveButton, SIGNAL( clicked() ), this, SLOT( on_mRemoveButton_clicked() ) );
|
||||
connect( mAddButton, SIGNAL( clicked() ), this, SLOT( on_mAddButton_clicked() ) );
|
||||
connect( mTreeWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
|
||||
connect( mTreeWidget, SIGNAL( scopeChanged() ), this, SIGNAL( scopeChanged() ) );
|
||||
connect( mRemoveButton, &QAbstractButton::clicked, this, &QgsVariableEditorWidget::on_mRemoveButton_clicked );
|
||||
connect( mAddButton, &QAbstractButton::clicked, this, &QgsVariableEditorWidget::on_mAddButton_clicked );
|
||||
connect( mTreeWidget, &QTreeWidget::itemSelectionChanged, this, &QgsVariableEditorWidget::selectionChanged );
|
||||
connect( mTreeWidget, &QgsVariableEditorTree::scopeChanged, this, &QgsVariableEditorWidget::scopeChanged );
|
||||
|
||||
//setContext clones context
|
||||
QgsExpressionContext *context = new QgsExpressionContext();
|
||||
|
@ -61,11 +61,11 @@ QgsHillshadeRendererWidget::QgsHillshadeRendererWidget( QgsRasterLayer *layer, c
|
||||
|
||||
setFromRenderer( layer->renderer() );
|
||||
|
||||
connect( mLightAngle, SIGNAL( valueChanged( double ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mLightAzimuth, SIGNAL( valueChanged( double ) ), this, SLOT( on_mLightAzimuth_updated( double ) ) );
|
||||
connect( mLightAzimuthDial, SIGNAL( valueChanged( int ) ), this, SLOT( on_mLightAzimuthDail_updated( int ) ) );
|
||||
connect( mZFactor, SIGNAL( valueChanged( double ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mMultiDirection, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mLightAngle, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsRasterRendererWidget::widgetChanged );
|
||||
connect( mLightAzimuth, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsHillshadeRendererWidget::on_mLightAzimuth_updated );
|
||||
connect( mLightAzimuthDial, &QAbstractSlider::valueChanged, this, &QgsHillshadeRendererWidget::on_mLightAzimuthDail_updated );
|
||||
connect( mZFactor, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsRasterRendererWidget::widgetChanged );
|
||||
connect( mMultiDirection, &QAbstractButton::toggled, this, &QgsRasterRendererWidget::widgetChanged );
|
||||
}
|
||||
|
||||
QgsRasterRenderer *QgsHillshadeRendererWidget::renderer()
|
||||
|
@ -50,12 +50,12 @@ QgsMultiBandColorRendererWidget::QgsMultiBandColorRendererWidget( QgsRasterLayer
|
||||
connect( mMinMaxWidget, &QgsRasterMinMaxWidget::load,
|
||||
this, &QgsMultiBandColorRendererWidget::loadMinMax );
|
||||
|
||||
connect( mRedBandComboBox, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SLOT( onBandChanged( int ) ) );
|
||||
connect( mGreenBandComboBox, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SLOT( onBandChanged( int ) ) );
|
||||
connect( mBlueBandComboBox, SIGNAL( currentIndexChanged( int ) ),
|
||||
this, SLOT( onBandChanged( int ) ) );
|
||||
connect( mRedBandComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsMultiBandColorRendererWidget::onBandChanged );
|
||||
connect( mGreenBandComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsMultiBandColorRendererWidget::onBandChanged );
|
||||
connect( mBlueBandComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ),
|
||||
this, &QgsMultiBandColorRendererWidget::onBandChanged );
|
||||
|
||||
//fill available bands into combo boxes
|
||||
mRedBandComboBox->addItem( tr( "Not set" ), -1 );
|
||||
@ -80,7 +80,7 @@ QgsMultiBandColorRendererWidget::QgsMultiBandColorRendererWidget( QgsRasterLayer
|
||||
setFromRenderer( mRasterLayer->renderer() );
|
||||
onBandChanged( 0 ); // reset mMinMaxWidget bands
|
||||
|
||||
connect( mContrastEnhancementAlgorithmComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mContrastEnhancementAlgorithmComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRasterRendererWidget::widgetChanged );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,15 +45,15 @@ QgsRasterTransparencyWidget::QgsRasterTransparencyWidget( QgsRasterLayer *layer,
|
||||
|
||||
syncToLayer();
|
||||
|
||||
connect( sliderTransparency, SIGNAL( valueChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( cboxTransparencyBand, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( sliderTransparency, SIGNAL( valueChanged( int ) ), this, SLOT( sliderTransparency_valueChanged( int ) ) );
|
||||
connect( sliderTransparency, &QAbstractSlider::valueChanged, this, &QgsPanelWidget::widgetChanged );
|
||||
connect( cboxTransparencyBand, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( sliderTransparency, &QAbstractSlider::valueChanged, this, &QgsRasterTransparencyWidget::sliderTransparency_valueChanged );
|
||||
|
||||
mPixelSelectorTool = nullptr;
|
||||
if ( mMapCanvas )
|
||||
{
|
||||
mPixelSelectorTool = new QgsMapToolEmitPoint( mMapCanvas );
|
||||
connect( mPixelSelectorTool, SIGNAL( canvasClicked( const QgsPoint &, Qt::MouseButton ) ), this, SLOT( pixelSelected( const QgsPoint & ) ) );
|
||||
connect( mPixelSelectorTool, &QgsMapToolEmitPoint::canvasClicked, this, &QgsRasterTransparencyWidget::pixelSelected );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -630,14 +630,14 @@ void QgsRasterTransparencyWidget::setTransparencyCell( int row, int column, doub
|
||||
break;
|
||||
}
|
||||
lineEdit->setText( valueString );
|
||||
connect( lineEdit, SIGNAL( textEdited( QString ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( lineEdit, &QLineEdit::textEdited, this, &QgsPanelWidget::widgetChanged );
|
||||
}
|
||||
tableTransparency->setCellWidget( row, column, lineEdit );
|
||||
adjustTransparencyCellWidth( row, column );
|
||||
|
||||
if ( nBands == 1 && ( column == 0 || column == 1 ) )
|
||||
{
|
||||
connect( lineEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( transparencyCellTextEdited( const QString & ) ) );
|
||||
connect( lineEdit, &QLineEdit::textEdited, this, &QgsRasterTransparencyWidget::transparencyCellTextEdited );
|
||||
}
|
||||
tableTransparency->resizeColumnsToContents();
|
||||
emit widgetChanged();
|
||||
|
@ -70,45 +70,45 @@ QgsRendererRasterPropertiesWidget::QgsRendererRasterPropertiesWidget( QgsMapLaye
|
||||
mZoomedOutResamplingComboBox->insertItem( 0, tr( "Nearest neighbour" ) );
|
||||
mZoomedOutResamplingComboBox->insertItem( 1, tr( "Average" ) );
|
||||
|
||||
connect( cboRenderers, SIGNAL( currentIndexChanged( int ) ), this, SLOT( rendererChanged() ) );
|
||||
connect( cboRenderers, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRendererRasterPropertiesWidget::rendererChanged );
|
||||
|
||||
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, &QgsRendererRasterPropertiesWidget::toggleSaturationControls );
|
||||
|
||||
// enable or disable colorize colorbutton with colorize checkbox
|
||||
connect( mColorizeCheck, SIGNAL( toggled( bool ) ), this, SLOT( toggleColorizeControls( bool ) ) );
|
||||
connect( mColorizeCheck, &QAbstractButton::toggled, this, &QgsRendererRasterPropertiesWidget::toggleColorizeControls );
|
||||
|
||||
// Just connect the spin boxes because the sliders update the spinners
|
||||
connect( mBrightnessSpinBox, SIGNAL( valueChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mContrastSpinBox, SIGNAL( valueChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( spinBoxSaturation, SIGNAL( valueChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( spinColorizeStrength, SIGNAL( valueChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( btnColorizeColor, SIGNAL( colorChanged( QColor ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mBrightnessSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( mContrastSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( spinBoxSaturation, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( spinColorizeStrength, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( btnColorizeColor, &QgsColorButton::colorChanged, this, &QgsPanelWidget::widgetChanged );
|
||||
|
||||
connect( mBlendModeComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mZoomedInResamplingComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mZoomedOutResamplingComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mMaximumOversamplingSpinBox, SIGNAL( valueChanged( double ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mBlendModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( mZoomedInResamplingComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( mZoomedOutResamplingComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
connect( mMaximumOversamplingSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsPanelWidget::widgetChanged );
|
||||
|
||||
// finally sync to the layer - even though some actions may emit widgetChanged signal,
|
||||
// this is not a problem - nobody is listening to our signals yet
|
||||
syncToLayer( mRasterLayer );
|
||||
|
||||
connect( mRasterLayer, SIGNAL( styleChanged() ), this, SLOT( refreshAfterStyleChanged() ) );
|
||||
connect( mRasterLayer, &QgsMapLayer::styleChanged, this, &QgsRendererRasterPropertiesWidget::refreshAfterStyleChanged );
|
||||
}
|
||||
|
||||
void QgsRendererRasterPropertiesWidget::setMapCanvas( QgsMapCanvas *canvas )
|
||||
@ -357,7 +357,7 @@ void QgsRendererRasterPropertiesWidget::setRendererWidget( const QString &render
|
||||
mRasterLayer->renderer()->setOpacity( opacity );
|
||||
mRendererWidget = rendererEntry.widgetCreateFunction( mRasterLayer, myExtent );
|
||||
mRendererWidget->setMapCanvas( mMapCanvas );
|
||||
connect( mRendererWidget, SIGNAL( widgetChanged() ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mRendererWidget, &QgsRasterRendererWidget::widgetChanged, this, &QgsPanelWidget::widgetChanged );
|
||||
stackedWidget->addWidget( mRendererWidget );
|
||||
stackedWidget->setCurrentWidget( mRendererWidget );
|
||||
if ( oldWidget )
|
||||
|
@ -72,8 +72,8 @@ QgsSingleBandGrayRendererWidget::QgsSingleBandGrayRendererWidget( QgsRasterLayer
|
||||
|
||||
setFromRenderer( layer->renderer() );
|
||||
|
||||
connect( mGradientComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mContrastEnhancementComboBox, SIGNAL( currentIndexChanged( int ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mGradientComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRasterRendererWidget::widgetChanged );
|
||||
connect( mContrastEnhancementComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsRasterRendererWidget::widgetChanged );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,12 +126,12 @@ QgsSingleBandPseudoColorRendererWidget::QgsSingleBandPseudoColorRendererWidget(
|
||||
|
||||
resetClassifyButton();
|
||||
|
||||
connect( mClassificationModeComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( classify() ) );
|
||||
connect( mClassificationModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsSingleBandPseudoColorRendererWidget::classify );
|
||||
connect( mClassifyButton, &QPushButton::clicked, this, &QgsSingleBandPseudoColorRendererWidget::applyColorRamp );
|
||||
connect( btnColorRamp, &QgsColorRampButton::colorRampChanged, this, &QgsSingleBandPseudoColorRendererWidget::applyColorRamp );
|
||||
connect( mNumberOfEntriesSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( classify() ) );
|
||||
connect( mBandComboBox, SIGNAL( currentIndexChanged( int ) ), this, SLOT( classify() ) );
|
||||
connect( mClipCheckBox, SIGNAL( toggled( bool ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mNumberOfEntriesSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsSingleBandPseudoColorRendererWidget::classify );
|
||||
connect( mBandComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsSingleBandPseudoColorRendererWidget::classify );
|
||||
connect( mClipCheckBox, &QAbstractButton::toggled, this, &QgsRasterRendererWidget::widgetChanged );
|
||||
}
|
||||
|
||||
QgsRasterRenderer *QgsSingleBandPseudoColorRendererWidget::renderer()
|
||||
@ -307,8 +307,8 @@ void QgsSingleBandPseudoColorRendererWidget::on_mAddEntryButton_clicked()
|
||||
newItem->setBackground( ColorColumn, QBrush( QColor( Qt::magenta ) ) );
|
||||
newItem->setText( LabelColumn, QString() );
|
||||
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
|
||||
connect( newItem, SIGNAL( itemEdited( QTreeWidgetItem *, int ) ),
|
||||
this, SLOT( mColormapTreeWidget_itemEdited( QTreeWidgetItem *, int ) ) );
|
||||
connect( newItem, &QgsTreeWidgetItemObject::itemEdited,
|
||||
this, &QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemEdited );
|
||||
mColormapTreeWidget->sortItems( ValueColumn, Qt::AscendingOrder );
|
||||
autoLabel();
|
||||
emit widgetChanged();
|
||||
@ -360,8 +360,8 @@ void QgsSingleBandPseudoColorRendererWidget::classify()
|
||||
newItem->setBackground( ColorColumn, QBrush( it->color ) );
|
||||
newItem->setText( LabelColumn, it->label );
|
||||
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
|
||||
connect( newItem, SIGNAL( itemEdited( QTreeWidgetItem *, int ) ),
|
||||
this, SLOT( mColormapTreeWidget_itemEdited( QTreeWidgetItem *, int ) ) );
|
||||
connect( newItem, &QgsTreeWidgetItemObject::itemEdited,
|
||||
this, &QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemEdited );
|
||||
}
|
||||
mClipCheckBox->setChecked( colorRampShader->clip() );
|
||||
}
|
||||
@ -415,8 +415,8 @@ void QgsSingleBandPseudoColorRendererWidget::populateColormapTreeWidget( const Q
|
||||
newItem->setBackground( ColorColumn, QBrush( it->color ) );
|
||||
newItem->setText( LabelColumn, it->label );
|
||||
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
|
||||
connect( newItem, SIGNAL( itemEdited( QTreeWidgetItem *, int ) ),
|
||||
this, SLOT( mColormapTreeWidget_itemEdited( QTreeWidgetItem *, int ) ) );
|
||||
connect( newItem, &QgsTreeWidgetItemObject::itemEdited,
|
||||
this, &QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemEdited );
|
||||
}
|
||||
setUnitFromLabels();
|
||||
}
|
||||
@ -682,8 +682,8 @@ void QgsSingleBandPseudoColorRendererWidget::setFromRenderer( const QgsRasterRen
|
||||
newItem->setBackground( ColorColumn, QBrush( it->color ) );
|
||||
newItem->setText( LabelColumn, it->label );
|
||||
newItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsSelectable );
|
||||
connect( newItem, SIGNAL( itemEdited( QTreeWidgetItem *, int ) ),
|
||||
this, SLOT( mColormapTreeWidget_itemEdited( QTreeWidgetItem *, int ) ) );
|
||||
connect( newItem, &QgsTreeWidgetItemObject::itemEdited,
|
||||
this, &QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemEdited );
|
||||
}
|
||||
setUnitFromLabels();
|
||||
mClipCheckBox->setChecked( colorRampShader->clip() );
|
||||
|
@ -71,14 +71,14 @@ Qgs25DRendererWidget::Qgs25DRendererWidget( QgsVectorLayer *layer, QgsStyle *sty
|
||||
mShadowSizeWidget->setValue( mRenderer->shadowSpread() );
|
||||
mWallExpositionShading->setChecked( mRenderer->wallShadingEnabled() );
|
||||
|
||||
connect( mAngleWidget, SIGNAL( valueChanged( int ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mHeightWidget, SIGNAL( fieldChanged( QString ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mWallColorButton, SIGNAL( colorChanged( QColor ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mRoofColorButton, SIGNAL( colorChanged( QColor ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mShadowColorButton, SIGNAL( colorChanged( QColor ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mShadowEnabledWidget, SIGNAL( toggled( bool ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mShadowSizeWidget, SIGNAL( valueChanged( double ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mWallExpositionShading, SIGNAL( toggled( bool ) ), this, SLOT( updateRenderer() ) );
|
||||
connect( mAngleWidget, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mHeightWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) > ( &QgsFieldExpressionWidget::fieldChanged ), this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mWallColorButton, &QgsColorButton::colorChanged, this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mRoofColorButton, &QgsColorButton::colorChanged, this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mShadowColorButton, &QgsColorButton::colorChanged, this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mShadowEnabledWidget, &QGroupBox::toggled, this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mShadowSizeWidget, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &Qgs25DRendererWidget::updateRenderer );
|
||||
connect( mWallExpositionShading, &QAbstractButton::toggled, this, &Qgs25DRendererWidget::updateRenderer );
|
||||
}
|
||||
|
||||
QgsFeatureRenderer *Qgs25DRendererWidget::renderer()
|
||||
|
@ -442,19 +442,19 @@ QgsCategorizedSymbolRendererWidget::QgsCategorizedSymbolRendererWidget( QgsVecto
|
||||
|
||||
viewCategories->setStyle( new QgsCategorizedSymbolRendererViewStyle( viewCategories->style() ) );
|
||||
|
||||
connect( mModel, SIGNAL( rowsMoved() ), this, SLOT( rowsMoved() ) );
|
||||
connect( mModel, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), this, SIGNAL( widgetChanged() ) );
|
||||
connect( mModel, &QgsCategorizedSymbolRendererModel::rowsMoved, this, &QgsCategorizedSymbolRendererWidget::rowsMoved );
|
||||
connect( mModel, &QAbstractItemModel::dataChanged, this, &QgsPanelWidget::widgetChanged );
|
||||
|
||||
connect( mExpressionWidget, SIGNAL( fieldChanged( QString ) ), this, SLOT( categoryColumnChanged( QString ) ) );
|
||||
connect( mExpressionWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) >( &QgsFieldExpressionWidget::fieldChanged ), this, &QgsCategorizedSymbolRendererWidget::categoryColumnChanged );
|
||||
|
||||
connect( viewCategories, SIGNAL( doubleClicked( const QModelIndex & ) ), this, SLOT( categoriesDoubleClicked( const QModelIndex & ) ) );
|
||||
connect( viewCategories, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( contextMenuViewCategories( const QPoint & ) ) );
|
||||
connect( viewCategories, &QAbstractItemView::doubleClicked, this, &QgsCategorizedSymbolRendererWidget::categoriesDoubleClicked );
|
||||
connect( viewCategories, &QTreeView::customContextMenuRequested, this, &QgsCategorizedSymbolRendererWidget::contextMenuViewCategories );
|
||||
|
||||
connect( btnChangeCategorizedSymbol, SIGNAL( clicked() ), this, SLOT( changeCategorizedSymbol() ) );
|
||||
connect( btnAddCategories, SIGNAL( clicked() ), this, SLOT( addCategories() ) );
|
||||
connect( btnDeleteCategories, SIGNAL( clicked() ), this, SLOT( deleteCategories() ) );
|
||||
connect( btnDeleteAllCategories, SIGNAL( clicked() ), this, SLOT( deleteAllCategories() ) );
|
||||
connect( btnAddCategory, SIGNAL( clicked() ), this, SLOT( addCategory() ) );
|
||||
connect( btnChangeCategorizedSymbol, &QAbstractButton::clicked, this, &QgsCategorizedSymbolRendererWidget::changeCategorizedSymbol );
|
||||
connect( btnAddCategories, &QAbstractButton::clicked, this, &QgsCategorizedSymbolRendererWidget::addCategories );
|
||||
connect( btnDeleteCategories, &QAbstractButton::clicked, this, &QgsCategorizedSymbolRendererWidget::deleteCategories );
|
||||
connect( btnDeleteAllCategories, &QAbstractButton::clicked, this, &QgsCategorizedSymbolRendererWidget::deleteAllCategories );
|
||||
connect( btnAddCategory, &QAbstractButton::clicked, this, &QgsCategorizedSymbolRendererWidget::addCategory );
|
||||
|
||||
connect( btnColorRamp, &QgsColorRampButton::colorRampChanged, this, &QgsCategorizedSymbolRendererWidget::applyColorRamp );
|
||||
|
||||
@ -543,7 +543,7 @@ void QgsCategorizedSymbolRendererWidget::changeCategorizedSymbol()
|
||||
QgsSymbolSelectorWidget *dlg = new QgsSymbolSelectorWidget( newSymbol, mStyle, mLayer, nullptr );
|
||||
dlg->setContext( mContext );
|
||||
|
||||
connect( dlg, SIGNAL( widgetChanged() ), this, SLOT( updateSymbolsFromWidget() ) );
|
||||
connect( dlg, &QgsPanelWidget::widgetChanged, this, &QgsCategorizedSymbolRendererWidget::updateSymbolsFromWidget );
|
||||
connect( dlg, &QgsPanelWidget::panelAccepted, this, &QgsCategorizedSymbolRendererWidget::cleanUpSymbolSelector );
|
||||
openPanel( dlg );
|
||||
}
|
||||
@ -586,7 +586,7 @@ void QgsCategorizedSymbolRendererWidget::changeCategorySymbol()
|
||||
|
||||
QgsSymbolSelectorWidget *dlg = new QgsSymbolSelectorWidget( symbol, mStyle, mLayer, nullptr );
|
||||
dlg->setContext( mContext );
|
||||
connect( dlg, SIGNAL( widgetChanged() ), this, SLOT( updateSymbolsFromWidget() ) );
|
||||
connect( dlg, &QgsPanelWidget::widgetChanged, this, &QgsCategorizedSymbolRendererWidget::updateSymbolsFromWidget );
|
||||
connect( dlg, &QgsPanelWidget::panelAccepted, this, &QgsCategorizedSymbolRendererWidget::cleanUpSymbolSelector );
|
||||
openPanel( dlg );
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ QgsCptCityColorRampDialog::QgsCptCityColorRampDialog( const QgsCptCityColorRamp
|
||||
|
||||
tabBar->blockSignals( false );
|
||||
|
||||
connect( this, SIGNAL( finished( int ) ), this, SLOT( onFinished() ) );
|
||||
connect( this, &QDialog::finished, this, &QgsCptCityColorRampDialog::onFinished );
|
||||
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,9 @@ QgsEllipseSymbolLayerWidget::QgsEllipseSymbolLayerWidget( const QgsVectorLayer *
|
||||
delete lyr;
|
||||
}
|
||||
|
||||
connect( spinOffsetX, SIGNAL( valueChanged( double ) ), this, SLOT( setOffset() ) );
|
||||
connect( spinOffsetY, SIGNAL( valueChanged( double ) ), this, SLOT( setOffset() ) );
|
||||
connect( cboJoinStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penJoinStyleChanged() ) );
|
||||
connect( spinOffsetX, static_cast < void ( QgsDoubleSpinBox::* )( double ) > ( &QgsDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::setOffset );
|
||||
connect( spinOffsetY, static_cast < void ( QgsDoubleSpinBox::* )( double ) > ( &QgsDoubleSpinBox::valueChanged ), this, &QgsEllipseSymbolLayerWidget::setOffset );
|
||||
connect( cboJoinStyle, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsEllipseSymbolLayerWidget::penJoinStyleChanged );
|
||||
}
|
||||
|
||||
void QgsEllipseSymbolLayerWidget::setSymbolLayer( QgsSymbolLayer *layer )
|
||||
|
@ -55,8 +55,8 @@ QgsGraduatedHistogramWidget::QgsGraduatedHistogramWidget( QWidget *parent )
|
||||
|
||||
mFilter = new QgsGraduatedHistogramEventFilter( mPlot );
|
||||
|
||||
connect( mFilter, SIGNAL( mousePress( double ) ), this, SLOT( mousePress( double ) ) );
|
||||
connect( mFilter, SIGNAL( mouseRelease( double ) ), this, SLOT( mouseRelease( double ) ) );
|
||||
connect( mFilter, &QgsGraduatedHistogramEventFilter::mousePress, this, &QgsGraduatedHistogramWidget::mousePress );
|
||||
connect( mFilter, &QgsGraduatedHistogramEventFilter::mouseRelease, this, &QgsGraduatedHistogramWidget::mouseRelease );
|
||||
|
||||
mHistoPicker = new QwtPlotPicker( mPlot->canvas() );
|
||||
mHistoPicker->setTrackerMode( QwtPicker::ActiveOnly );
|
||||
|
@ -488,19 +488,19 @@ QgsGraduatedSymbolRendererWidget::QgsGraduatedSymbolRendererWidget( QgsVectorLay
|
||||
}
|
||||
methodComboBox->blockSignals( false );
|
||||
|
||||
connect( mExpressionWidget, SIGNAL( fieldChanged( QString ) ), this, SLOT( graduatedColumnChanged( QString ) ) );
|
||||
connect( viewGraduated, SIGNAL( doubleClicked( const QModelIndex & ) ), this, SLOT( rangesDoubleClicked( const QModelIndex & ) ) );
|
||||
connect( viewGraduated, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( rangesClicked( const QModelIndex & ) ) );
|
||||
connect( viewGraduated, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( contextMenuViewCategories( const QPoint & ) ) );
|
||||
connect( mExpressionWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) >( &QgsFieldExpressionWidget::fieldChanged ), this, &QgsGraduatedSymbolRendererWidget::graduatedColumnChanged );
|
||||
connect( viewGraduated, &QAbstractItemView::doubleClicked, this, &QgsGraduatedSymbolRendererWidget::rangesDoubleClicked );
|
||||
connect( viewGraduated, &QAbstractItemView::clicked, this, &QgsGraduatedSymbolRendererWidget::rangesClicked );
|
||||
connect( viewGraduated, &QTreeView::customContextMenuRequested, this, &QgsGraduatedSymbolRendererWidget::contextMenuViewCategories );
|
||||
|
||||
connect( btnGraduatedClassify, SIGNAL( clicked() ), this, SLOT( classifyGraduated() ) );
|
||||
connect( btnChangeGraduatedSymbol, SIGNAL( clicked() ), this, SLOT( changeGraduatedSymbol() ) );
|
||||
connect( btnGraduatedDelete, SIGNAL( clicked() ), this, SLOT( deleteClasses() ) );
|
||||
connect( btnDeleteAllClasses, SIGNAL( clicked() ), this, SLOT( deleteAllClasses() ) );
|
||||
connect( btnGraduatedAdd, SIGNAL( clicked() ), this, SLOT( addClass() ) );
|
||||
connect( cbxLinkBoundaries, SIGNAL( toggled( bool ) ), this, SLOT( toggleBoundariesLink( bool ) ) );
|
||||
connect( btnGraduatedClassify, &QAbstractButton::clicked, this, &QgsGraduatedSymbolRendererWidget::classifyGraduated );
|
||||
connect( btnChangeGraduatedSymbol, &QAbstractButton::clicked, this, &QgsGraduatedSymbolRendererWidget::changeGraduatedSymbol );
|
||||
connect( btnGraduatedDelete, &QAbstractButton::clicked, this, &QgsGraduatedSymbolRendererWidget::deleteClasses );
|
||||
connect( btnDeleteAllClasses, &QAbstractButton::clicked, this, &QgsGraduatedSymbolRendererWidget::deleteAllClasses );
|
||||
connect( btnGraduatedAdd, &QAbstractButton::clicked, this, &QgsGraduatedSymbolRendererWidget::addClass );
|
||||
connect( cbxLinkBoundaries, &QAbstractButton::toggled, this, &QgsGraduatedSymbolRendererWidget::toggleBoundariesLink );
|
||||
|
||||
connect( mSizeUnitWidget, SIGNAL( changed() ), this, SLOT( on_mSizeUnitWidget_changed() ) );
|
||||
connect( mSizeUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsGraduatedSymbolRendererWidget::on_mSizeUnitWidget_changed );
|
||||
|
||||
connectUpdateHandlers();
|
||||
|
||||
@ -516,8 +516,8 @@ QgsGraduatedSymbolRendererWidget::QgsGraduatedSymbolRendererWidget( QgsVectorLay
|
||||
|
||||
mHistogramWidget->setLayer( mLayer );
|
||||
mHistogramWidget->setRenderer( mRenderer );
|
||||
connect( mHistogramWidget, SIGNAL( rangesModified( bool ) ), this, SLOT( refreshRanges( bool ) ) );
|
||||
connect( mExpressionWidget, SIGNAL( fieldChanged( QString ) ), mHistogramWidget, SLOT( setSourceFieldExp( QString ) ) );
|
||||
connect( mHistogramWidget, &QgsGraduatedHistogramWidget::rangesModified, this, &QgsGraduatedSymbolRendererWidget::refreshRanges );
|
||||
connect( mExpressionWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) >( &QgsFieldExpressionWidget::fieldChanged ), mHistogramWidget, &QgsHistogramWidget::setSourceFieldExp );
|
||||
|
||||
mExpressionWidget->registerExpressionContextGenerator( this );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user