Skip to content
Permalink
Browse files
Some more Qt5 signal converts
  • Loading branch information
NathanW2 committed Apr 3, 2017
1 parent 620a839 commit 541ecc55ae982096df9af0cad7170b6566e66968
Showing with 8 additions and 8 deletions.
  1. +1 −1 src/gui/qgsexpressionbuilderdialog.cpp
  2. +7 −7 src/gui/qgsexpressionbuilderwidget.cpp
@@ -23,7 +23,7 @@ QgsExpressionBuilderDialog::QgsExpressionBuilderDialog( QgsVectorLayer *layer, c
setupUi( this );

QPushButton *okButton = buttonBox->button( QDialogButtonBox::Ok );
connect( builder, SIGNAL( expressionParsed( bool ) ), okButton, SLOT( setEnabled( bool ) ) );
connect( builder, &QgsExpressionBuilderWidget::expressionParsed, okButton, &QWidget::setEnabled );

builder->setExpressionContext( context );
builder->setLayer( layer );
@@ -57,17 +57,17 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
expressionTree->sortByColumn( 0, Qt::AscendingOrder );

expressionTree->setContextMenuPolicy( Qt::CustomContextMenu );
connect( this, SIGNAL( expressionParsed( bool ) ), this, SLOT( setExpressionState( bool ) ) );
connect( expressionTree, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
connect( expressionTree->selectionModel(), SIGNAL( currentChanged( const QModelIndex &, const QModelIndex & ) ),
this, SLOT( currentChanged( const QModelIndex &, const QModelIndex & ) ) );
connect( this, &QgsExpressionBuilderWidget::expressionParsed, this, &QgsExpressionBuilderWidget::setExpressionState );
connect( expressionTree, &QWidget::customContextMenuRequested, this, &QgsExpressionBuilderWidget::showContextMenu );
connect( expressionTree->selectionModel(), &QItemSelectionModel::currentChanged,
this, &QgsExpressionBuilderWidget::currentChanged );

connect( btnLoadAll, SIGNAL( pressed() ), this, SLOT( loadAllValues() ) );
connect( btnLoadSample, SIGNAL( pressed() ), this, SLOT( loadSampleValues() ) );
connect( btnLoadAll, &QAbstractButton::pressed, this, &QgsExpressionBuilderWidget::loadAllValues );
connect( btnLoadSample, &QAbstractButton::pressed, this, &QgsExpressionBuilderWidget::loadSampleValues );

Q_FOREACH ( QPushButton *button, mOperatorsGroupBox->findChildren<QPushButton *>() )
{
connect( button, SIGNAL( pressed() ), this, SLOT( operatorButtonClicked() ) );
connect( button, &QAbstractButton::pressed, this, &QgsExpressionBuilderWidget::operatorButtonClicked );
}

txtSearchEdit->setPlaceholderText( tr( "Search" ) );

0 comments on commit 541ecc5

Please sign in to comment.