Skip to content
Permalink
Browse files

Merge pull request #2316 from slarosa/fix_return_pressed_we

[attribute table] enable returnPressed signal for the search widget
  • Loading branch information
m-kuhn committed Sep 16, 2015
2 parents 0daf6dd + c823bcd commit f0f53b17ed58658fd9b2e09887647b0745f718e9
@@ -469,6 +469,7 @@ void QgsAttributeTableDialog::filterColumnChanged( QObject* filterAction )
}
else
{
connect( mCurrentSearchWidgetWrapper, SIGNAL( expressionChanged() ), SLOT( filterQueryAccepted() ) );
mApplyFilterButton->setVisible( true );
}

@@ -504,6 +505,10 @@ void QgsAttributeTableDialog::filterShowAll()
mFilterButton->setDefaultAction( mActionShowAllFilter );
mFilterButton->setPopupMode( QToolButton::InstantPopup );
mFilterQuery->setVisible( false );
if ( mCurrentSearchWidgetWrapper != 0 )
{
mCurrentSearchWidgetWrapper->widget()->setVisible( false );
}
mApplyFilterButton->setVisible( false );
mMainView->setFilterMode( QgsAttributeTableFilterModel::ShowAll );
}
@@ -70,6 +70,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper
signals:

void expressionChanged( QString exp );
void expressionChanged();

protected slots:

@@ -96,6 +96,7 @@ void QgsDefaultSearchWidgetWrapper::initWidget( QWidget* widget )
mContainer->layout()->addWidget( mLineEdit );
mContainer->layout()->addWidget( mCheckbox );
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( setExpression( QString ) ) );
connect( mLineEdit, SIGNAL( returnPressed() ), this, SIGNAL( expressionChanged() ) );
connect( mCheckbox, SIGNAL( stateChanged( int ) ), this, SLOT( setCaseString( int ) ) );
mCheckbox->setChecked( Qt::Unchecked );
mCaseString = "ILIKE";
@@ -36,6 +36,7 @@ class GUI_EXPORT QgsDefaultSearchWidgetWrapper : public QgsSearchWidgetWrapper
public:
QString expression() override;
bool applyDirectly() override;

protected slots:
void setExpression( QString exp ) override;

0 comments on commit f0f53b1

Please sign in to comment.
You can’t perform that action at this time.