Skip to content

Commit

Permalink
Remove autoconnected slots, pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 8, 2017
1 parent fea2726 commit 1429f2c
Show file tree
Hide file tree
Showing 144 changed files with 2,328 additions and 1,452 deletions.
30 changes: 20 additions & 10 deletions src/app/composer/qgsatlascompositionwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ QgsAtlasCompositionWidget::QgsAtlasCompositionWidget( QWidget *parent, QgsCompos
QWidget( parent ), mComposition( c )
{
setupUi( this );
connect( mUseAtlasCheckBox, &QCheckBox::stateChanged, this, &QgsAtlasCompositionWidget::mUseAtlasCheckBox_stateChanged );
connect( mAtlasFilenamePatternEdit, &QLineEdit::editingFinished, this, &QgsAtlasCompositionWidget::mAtlasFilenamePatternEdit_editingFinished );
connect( mAtlasFilenameExpressionButton, &QToolButton::clicked, this, &QgsAtlasCompositionWidget::mAtlasFilenameExpressionButton_clicked );
connect( mAtlasHideCoverageCheckBox, &QCheckBox::stateChanged, this, &QgsAtlasCompositionWidget::mAtlasHideCoverageCheckBox_stateChanged );
connect( mAtlasSingleFileCheckBox, &QCheckBox::stateChanged, this, &QgsAtlasCompositionWidget::mAtlasSingleFileCheckBox_stateChanged );
connect( mAtlasSortFeatureCheckBox, &QCheckBox::stateChanged, this, &QgsAtlasCompositionWidget::mAtlasSortFeatureCheckBox_stateChanged );
connect( mAtlasSortFeatureDirectionButton, &QToolButton::clicked, this, &QgsAtlasCompositionWidget::mAtlasSortFeatureDirectionButton_clicked );
connect( mAtlasFeatureFilterEdit, &QLineEdit::editingFinished, this, &QgsAtlasCompositionWidget::mAtlasFeatureFilterEdit_editingFinished );
connect( mAtlasFeatureFilterButton, &QToolButton::clicked, this, &QgsAtlasCompositionWidget::mAtlasFeatureFilterButton_clicked );
connect( mAtlasFeatureFilterCheckBox, &QCheckBox::stateChanged, this, &QgsAtlasCompositionWidget::mAtlasFeatureFilterCheckBox_stateChanged );

mAtlasCoverageLayerComboBox->setFilters( QgsMapLayerProxyModel::VectorLayer );

Expand Down Expand Up @@ -59,7 +69,7 @@ QgsAtlasCompositionWidget::QgsAtlasCompositionWidget( QWidget *parent, QgsCompos
updateGuiElements();
}

void QgsAtlasCompositionWidget::on_mUseAtlasCheckBox_stateChanged( int state )
void QgsAtlasCompositionWidget::mUseAtlasCheckBox_stateChanged( int state )
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( state == Qt::Checked )
Expand Down Expand Up @@ -97,7 +107,7 @@ void QgsAtlasCompositionWidget::changeCoverageLayer( QgsMapLayer *layer )
}
}

void QgsAtlasCompositionWidget::on_mAtlasFilenamePatternEdit_editingFinished()
void QgsAtlasCompositionWidget::mAtlasFilenamePatternEdit_editingFinished()
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand All @@ -117,7 +127,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenamePatternEdit_editingFinished()
}
}

void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
void QgsAtlasCompositionWidget::mAtlasFilenameExpressionButton_clicked()
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap || !atlasMap->coverageLayer() )
Expand Down Expand Up @@ -150,7 +160,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFilenameExpressionButton_clicked()
}
}

void QgsAtlasCompositionWidget::on_mAtlasHideCoverageCheckBox_stateChanged( int state )
void QgsAtlasCompositionWidget::mAtlasHideCoverageCheckBox_stateChanged( int state )
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand All @@ -160,7 +170,7 @@ void QgsAtlasCompositionWidget::on_mAtlasHideCoverageCheckBox_stateChanged( int
atlasMap->setHideCoverage( state == Qt::Checked );
}

void QgsAtlasCompositionWidget::on_mAtlasSingleFileCheckBox_stateChanged( int state )
void QgsAtlasCompositionWidget::mAtlasSingleFileCheckBox_stateChanged( int state )
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand All @@ -180,7 +190,7 @@ void QgsAtlasCompositionWidget::on_mAtlasSingleFileCheckBox_stateChanged( int st
atlasMap->setSingleFile( state == Qt::Checked );
}

void QgsAtlasCompositionWidget::on_mAtlasSortFeatureCheckBox_stateChanged( int state )
void QgsAtlasCompositionWidget::mAtlasSortFeatureCheckBox_stateChanged( int state )
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand Down Expand Up @@ -242,7 +252,7 @@ void QgsAtlasCompositionWidget::changesSortFeatureField( const QString &fieldNam
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterCheckBox_stateChanged( int state )
void QgsAtlasCompositionWidget::mAtlasFeatureFilterCheckBox_stateChanged( int state )
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand Down Expand Up @@ -276,7 +286,7 @@ void QgsAtlasCompositionWidget::pageNameExpressionChanged( const QString &, bool
atlasMap->setPageNameExpression( expression );
}

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_editingFinished()
void QgsAtlasCompositionWidget::mAtlasFeatureFilterEdit_editingFinished()
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
if ( !atlasMap )
Expand All @@ -288,7 +298,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterEdit_editingFinished()
updateAtlasFeatures();
}

void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterButton_clicked()
void QgsAtlasCompositionWidget::mAtlasFeatureFilterButton_clicked()
{
QgsAtlasComposition *atlasMap = &mComposition->atlasComposition();
QgsVectorLayer *vl = dynamic_cast<QgsVectorLayer *>( mAtlasCoverageLayerComboBox->currentLayer() );
Expand All @@ -314,7 +324,7 @@ void QgsAtlasCompositionWidget::on_mAtlasFeatureFilterButton_clicked()
}
}

void QgsAtlasCompositionWidget::on_mAtlasSortFeatureDirectionButton_clicked()
void QgsAtlasCompositionWidget::mAtlasSortFeatureDirectionButton_clicked()
{
Qt::ArrowType at = mAtlasSortFeatureDirectionButton->arrowType();
at = ( at == Qt::UpArrow ) ? Qt::DownArrow : Qt::UpArrow;
Expand Down
20 changes: 10 additions & 10 deletions src/app/composer/qgsatlascompositionwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ class QgsAtlasCompositionWidget:
QgsAtlasCompositionWidget( QWidget *parent, QgsComposition *c );

public slots:
void on_mUseAtlasCheckBox_stateChanged( int state );
void mUseAtlasCheckBox_stateChanged( int state );
void changeCoverageLayer( QgsMapLayer *layer );
void on_mAtlasFilenamePatternEdit_editingFinished();
void on_mAtlasFilenameExpressionButton_clicked();
void on_mAtlasHideCoverageCheckBox_stateChanged( int state );
void on_mAtlasSingleFileCheckBox_stateChanged( int state );
void mAtlasFilenamePatternEdit_editingFinished();
void mAtlasFilenameExpressionButton_clicked();
void mAtlasHideCoverageCheckBox_stateChanged( int state );
void mAtlasSingleFileCheckBox_stateChanged( int state );

void on_mAtlasSortFeatureCheckBox_stateChanged( int state );
void mAtlasSortFeatureCheckBox_stateChanged( int state );
void changesSortFeatureField( const QString &fieldName );
void on_mAtlasSortFeatureDirectionButton_clicked();
void on_mAtlasFeatureFilterEdit_editingFinished();
void on_mAtlasFeatureFilterButton_clicked();
void on_mAtlasFeatureFilterCheckBox_stateChanged( int state );
void mAtlasSortFeatureDirectionButton_clicked();
void mAtlasFeatureFilterEdit_editingFinished();
void mAtlasFeatureFilterButton_clicked();
void mAtlasFeatureFilterCheckBox_stateChanged( int state );
void pageNameExpressionChanged( const QString &expression, bool valid );

void changeFileFormat();
Expand Down
27 changes: 18 additions & 9 deletions src/app/composer/qgsattributeselectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,15 @@ QgsAttributeSelectionDialog::QgsAttributeSelectionDialog( QgsComposerAttributeTa

{
setupUi( this );
connect( mRemoveColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mRemoveColumnPushButton_clicked );
connect( mAddColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mAddColumnPushButton_clicked );
connect( mColumnUpPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mColumnUpPushButton_clicked );
connect( mColumnDownPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mColumnDownPushButton_clicked );
connect( mResetColumnsPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mResetColumnsPushButton_clicked );
connect( mAddSortColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mAddSortColumnPushButton_clicked );
connect( mRemoveSortColumnPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mRemoveSortColumnPushButton_clicked );
connect( mSortColumnUpPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mSortColumnUpPushButton_clicked );
connect( mSortColumnDownPushButton, &QPushButton::clicked, this, &QgsAttributeSelectionDialog::mSortColumnDownPushButton_clicked );

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/AttributeSelectionDialog/geometry" ) ).toByteArray() );
Expand Down Expand Up @@ -319,7 +328,7 @@ QgsAttributeSelectionDialog::~QgsAttributeSelectionDialog()
settings.setValue( QStringLiteral( "Windows/AttributeSelectionDialog/geometry" ), saveGeometry() );
}

void QgsAttributeSelectionDialog::on_mRemoveColumnPushButton_clicked()
void QgsAttributeSelectionDialog::mRemoveColumnPushButton_clicked()
{
//remove selected row from model
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
Expand All @@ -330,13 +339,13 @@ void QgsAttributeSelectionDialog::on_mRemoveColumnPushButton_clicked()
}
}

void QgsAttributeSelectionDialog::on_mAddColumnPushButton_clicked()
void QgsAttributeSelectionDialog::mAddColumnPushButton_clicked()
{
//add a new row to the model
mColumnModel->insertRow( mColumnModel->rowCount() );
}

void QgsAttributeSelectionDialog::on_mColumnUpPushButton_clicked()
void QgsAttributeSelectionDialog::mColumnUpPushButton_clicked()
{
//move selected row up
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
Expand All @@ -347,7 +356,7 @@ void QgsAttributeSelectionDialog::on_mColumnUpPushButton_clicked()
}
}

void QgsAttributeSelectionDialog::on_mColumnDownPushButton_clicked()
void QgsAttributeSelectionDialog::mColumnDownPushButton_clicked()
{
//move selected row down
QItemSelection viewSelection( mColumnsTableView->selectionModel()->selection() );
Expand All @@ -358,14 +367,14 @@ void QgsAttributeSelectionDialog::on_mColumnDownPushButton_clicked()
}
}

void QgsAttributeSelectionDialog::on_mResetColumnsPushButton_clicked()
void QgsAttributeSelectionDialog::mResetColumnsPushButton_clicked()
{
//reset columns to match vector layer's fields
mColumnModel->resetToLayer();
mSortColumnComboBox->setCurrentIndex( 0 );
}

void QgsAttributeSelectionDialog::on_mAddSortColumnPushButton_clicked()
void QgsAttributeSelectionDialog::mAddSortColumnPushButton_clicked()
{
//add column to sort order widget
QgsComposerTableColumn *column = mAvailableSortProxyModel->columnFromRow( mSortColumnComboBox->currentIndex() );
Expand All @@ -380,7 +389,7 @@ void QgsAttributeSelectionDialog::on_mAddSortColumnPushButton_clicked()
mSortedProxyModel->resetFilter();
}

void QgsAttributeSelectionDialog::on_mRemoveSortColumnPushButton_clicked()
void QgsAttributeSelectionDialog::mRemoveSortColumnPushButton_clicked()
{
//remove selected rows from sort order widget
QItemSelection sortSelection( mSortColumnTableView->selectionModel()->selection() );
Expand All @@ -406,7 +415,7 @@ void QgsAttributeSelectionDialog::on_mRemoveSortColumnPushButton_clicked()
mSortColumnTableView->selectRow( rowToRemove );
}

void QgsAttributeSelectionDialog::on_mSortColumnUpPushButton_clicked()
void QgsAttributeSelectionDialog::mSortColumnUpPushButton_clicked()
{
//find selected row
QItemSelection sortSelection( mSortColumnTableView->selectionModel()->selection() );
Expand All @@ -425,7 +434,7 @@ void QgsAttributeSelectionDialog::on_mSortColumnUpPushButton_clicked()
mColumnModel->moveColumnInSortRank( column, QgsComposerAttributeTableColumnModelV2::ShiftUp );
}

void QgsAttributeSelectionDialog::on_mSortColumnDownPushButton_clicked()
void QgsAttributeSelectionDialog::mSortColumnDownPushButton_clicked()
{
//find selected row
QItemSelection sortSelection( mSortColumnTableView->selectionModel()->selection() );
Expand Down
18 changes: 9 additions & 9 deletions src/app/composer/qgsattributeselectiondialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ class QgsAttributeSelectionDialog: public QDialog, private Ui::QgsAttributeSelec
~QgsAttributeSelectionDialog();

private slots:
void on_mRemoveColumnPushButton_clicked();
void on_mAddColumnPushButton_clicked();
void on_mColumnUpPushButton_clicked();
void on_mColumnDownPushButton_clicked();
void on_mResetColumnsPushButton_clicked();
void on_mAddSortColumnPushButton_clicked();
void on_mRemoveSortColumnPushButton_clicked();
void on_mSortColumnUpPushButton_clicked();
void on_mSortColumnDownPushButton_clicked();
void mRemoveColumnPushButton_clicked();
void mAddColumnPushButton_clicked();
void mColumnUpPushButton_clicked();
void mColumnDownPushButton_clicked();
void mResetColumnsPushButton_clicked();
void mAddSortColumnPushButton_clicked();
void mRemoveSortColumnPushButton_clicked();
void mSortColumnUpPushButton_clicked();
void mSortColumnDownPushButton_clicked();

private:
QgsComposerAttributeTableV2 *mComposerTable = nullptr;
Expand Down
Loading

0 comments on commit 1429f2c

Please sign in to comment.