Skip to content
Permalink
Browse files

Disable filter if search checkbox is unticked in database selection d…

…ialogs (fixes #9168)
  • Loading branch information
jef-n committed Dec 5, 2013
1 parent 705927e commit fd6e37cdcf226a05ef3da83f4a0f91b6ad9479be
@@ -27,6 +27,7 @@ class CORE_EXPORT QgsDbFilterProxyModel: public QSortFilterProxyModel
public:
QgsDbFilterProxyModel( QObject* parent = 0 );
~QgsDbFilterProxyModel();
void setFilterEnabled( bool );
/**Calls QSortFilterProxyModel::setFilterWildcard and triggers update*/
void _setFilterWildcard( const QString& pattern );
/**Calls QSortFilterProxyModel::setFilterRegExp and triggers update*/
@@ -318,6 +318,14 @@ void QgsMssqlSourceSelect::on_mTablesTreeView_doubleClicked( const QModelIndex &
}
}

void QgsMssqlSourceSelect::on_mSearchGroupBox_toggled( bool checked )
{
if ( mSearchTableEdit->text().isEmpty() )
return;

on_mSearchTableEdit_textChanged( checked ? mSearchTableEdit->text() : "" );
}

void QgsMssqlSourceSelect::on_mSearchTableEdit_textChanged( const QString & text )
{
if ( mSearchModeComboBox->currentText() == tr( "Wildcard" ) )
@@ -130,6 +130,7 @@ class QgsMssqlSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
void on_btnSave_clicked();
//! Loads the selected connections from file
void on_btnLoad_clicked();
void on_mSearchGroupBox_toggled( bool );
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
void on_mSearchModeComboBox_currentIndexChanged( const QString & text );
@@ -351,6 +351,14 @@ void QgsOracleSourceSelect::on_mTablesTreeView_doubleClicked( const QModelIndex
}
}

void QgsOracleSourceSelect::on_mSearchGroupBox_toggled( bool checked )
{
if ( mSearchTableEdit->text().isEmpty() )
return;

on_mSearchTableEdit_textChanged( checked ? mSearchTableEdit->text() : "" );
}

void QgsOracleSourceSelect::on_mSearchTableEdit_textChanged( const QString & text )
{
if ( mSearchModeComboBox->currentText() == tr( "Wildcard" ) )
@@ -109,6 +109,7 @@ class QgsOracleSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
void on_btnSave_clicked();
//! Loads the selected connections from file
void on_btnLoad_clicked();
void on_mSearchGroupBox_toggled( bool );
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
void on_mSearchModeComboBox_currentIndexChanged( const QString & text );
@@ -335,6 +335,14 @@ void QgsPgSourceSelect::on_mTablesTreeView_doubleClicked( const QModelIndex &ind
}
}

void QgsPgSourceSelect::on_mSearchGroupBox_toggled( bool checked )
{
if ( mSearchTableEdit->text().isEmpty() )
return;

on_mSearchTableEdit_textChanged( checked ? mSearchTableEdit->text() : "" );
}

void QgsPgSourceSelect::on_mSearchTableEdit_textChanged( const QString & text )
{
if ( mSearchModeComboBox->currentText() == tr( "Wildcard" ) )
@@ -99,6 +99,7 @@ class QgsPgSourceSelect : public QDialog, private Ui::QgsDbSourceSelectBase
void on_btnSave_clicked();
//! Loads the selected connections from file
void on_btnLoad_clicked();
void on_mSearchGroupBox_toggled( bool );
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
void on_mSearchModeComboBox_currentIndexChanged( const QString & text );
@@ -181,6 +181,14 @@ void QgsSpatiaLiteSourceSelect::on_mTablesTreeView_doubleClicked( const QModelIn
setSql( index );
}

void QgsSpatiaLiteSourceSelect::on_mSearchGroupBox_toggled( bool checked )
{
if ( mSearchTableEdit->text().isEmpty() )
return;

on_mSearchTableEdit_textChanged( checked ? mSearchTableEdit->text() : "" );
}

void QgsSpatiaLiteSourceSelect::on_mSearchTableEdit_textChanged( const QString & text )
{
if ( mSearchModeComboBox->currentText() == tr( "Wildcard" ) )
@@ -80,6 +80,7 @@ class QgsSpatiaLiteSourceSelect: public QDialog, private Ui::QgsDbSourceSelectBa
void on_btnNew_clicked();
//! Deletes the selected connection
void on_btnDelete_clicked();
void on_mSearchGroupBox_toggled( bool );
void on_mSearchTableEdit_textChanged( const QString & text );
void on_mSearchColumnComboBox_currentIndexChanged( const QString & text );
void on_mSearchModeComboBox_currentIndexChanged( const QString & text );

0 comments on commit fd6e37c

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