16 #ifndef QGSDATABASETABLECOMBOBOX_H 
   17 #define QGSDATABASETABLECOMBOBOX_H 
   23 #include <QSortFilterProxyModel> 
   30 class GUI_EXPORT QgsDatabaseTableComboBoxSortModel: 
public QSortFilterProxyModel
 
   33     explicit QgsDatabaseTableComboBoxSortModel( QObject *parent = 
nullptr );
 
   35     bool lessThan( 
const QModelIndex &source_left, 
const QModelIndex &source_right ) 
const override;
 
   79     void setAllowEmptyTable( 
bool allowEmpty );
 
   85     bool allowEmptyTable() 
const;
 
   90     QString currentTable() 
const;
 
   95     QString currentSchema() 
const;
 
  109     void setTable( 
const QString &table, 
const QString &schema = QString() );
 
  116     void setConnectionName( 
const QString &connection, 
const QString &provider = QString() );
 
  121     void setSchema( 
const QString &schema );
 
  126     void refreshTables();
 
  130     void tableChanged( 
const QString &table, 
const QString &schema = QString() );
 
  133     void indexChanged( 
int i );
 
  139     bool mAllowEmpty = 
false;
 
  144     QSortFilterProxyModel *mSortModel = 
nullptr;
 
  145     QComboBox *mComboBox = 
nullptr;
 
The QgsAbstractDatabaseProviderConnection class provides common functionality for DB based connection...
The QgsDatabaseTableComboBox class is a combo box which displays the list of tables for a specific da...
void tableChanged(const QString &table, const QString &schema=QString())
Emitted whenever the currently selected table changes.
QComboBox * comboBox()
Returns the combobox portion of the widget.
A model containing tables from a database connection.