| QGIS API Documentation
    3.20.0-Odense (decaadbb31)
    | 
The QgsDatabaseTableComboBox class is a combo box which displays the list of tables for a specific database connection. More...
#include <qgsdatabasetablecombobox.h>

| Public Slots | |
| void | refreshTables () | 
| Refreshes the list of available tables.  More... | |
| void | setConnectionName (const QString &connection, const QString &provider=QString()) | 
| Sets the database connection name from which to retrieve the available tables.  More... | |
| void | setSchema (const QString &schema) | 
| Sets the schema from which to retrieve the available tables.  More... | |
| void | setTable (const QString &table, const QString &schema=QString()) | 
| Sets the current table selected in the combo box.  More... | |
| Signals | |
| void | tableChanged (const QString &table, const QString &schema=QString()) | 
| Emitted whenever the currently selected table changes.  More... | |
| Public Member Functions | |
| QgsDatabaseTableComboBox (const QString &provider, const QString &connection, const QString &schema=QString(), QWidget *parent=nullptr) | |
| Constructor for QgsDatabaseTableComboBox, for the specified provider and connection.  More... | |
| QgsDatabaseTableComboBox (QgsAbstractDatabaseProviderConnection *connection, const QString &schema=QString(), QWidget *parent=nullptr) | |
| Constructor for QgsDatabaseTableComboBox, for the specified connection.  More... | |
| bool | allowEmptyTable () const | 
| Returns trueif the combobox allows the empty table ("not set") choice.  More... | |
| QComboBox * | comboBox () | 
| Returns the combobox portion of the widget.  More... | |
| QString | currentSchema () const | 
| Returns the schema of the current table selected in the combo box.  More... | |
| QString | currentTable () const | 
| Returns the name of the current table selected in the combo box.  More... | |
| void | setAllowEmptyTable (bool allowEmpty) | 
| Sets whether an optional empty table ("not set") option is present in the combobox.  More... | |
The QgsDatabaseTableComboBox class is a combo box which displays the list of tables for a specific database connection.
Definition at line 50 of file qgsdatabasetablecombobox.h.
| 
 | explicit | 
Constructor for QgsDatabaseTableComboBox, for the specified provider and connection.
The optional schema argument can be used to restrict the listed tables to a specific schema.
Definition at line 23 of file qgsdatabasetablecombobox.cpp.
| 
 | explicit | 
Constructor for QgsDatabaseTableComboBox, for the specified connection.
The optional schema argument can be used to restrict the listed tables to a specific schema.
Ownership of connection is transferred to the combobox.
Definition at line 34 of file qgsdatabasetablecombobox.cpp.
| bool QgsDatabaseTableComboBox::allowEmptyTable | ( | ) | const | 
Returns true if the combobox allows the empty table ("not set") choice. 
Definition at line 49 of file qgsdatabasetablecombobox.cpp.
| 
 | inline | 
Returns the combobox portion of the widget.
Definition at line 100 of file qgsdatabasetablecombobox.h.
| QString QgsDatabaseTableComboBox::currentSchema | ( | ) | const | 
Returns the schema of the current table selected in the combo box.
Definition at line 172 of file qgsdatabasetablecombobox.cpp.
| QString QgsDatabaseTableComboBox::currentTable | ( | ) | const | 
Returns the name of the current table selected in the combo box.
Definition at line 183 of file qgsdatabasetablecombobox.cpp.
| 
 | slot | 
Refreshes the list of available tables.
Definition at line 163 of file qgsdatabasetablecombobox.cpp.
| void QgsDatabaseTableComboBox::setAllowEmptyTable | ( | bool | allowEmpty | ) | 
Sets whether an optional empty table ("not set") option is present in the combobox.
Definition at line 42 of file qgsdatabasetablecombobox.cpp.
| 
 | slot | 
Sets the database connection name from which to retrieve the available tables.
Optionally the provider can be reset too.
Definition at line 118 of file qgsdatabasetablecombobox.cpp.
| 
 | slot | 
Sets the schema from which to retrieve the available tables.
Definition at line 146 of file qgsdatabasetablecombobox.cpp.
| 
 | slot | 
Sets the current table selected in the combo box.
If necessary, the schema can be specified too.
Definition at line 87 of file qgsdatabasetablecombobox.cpp.
| 
 | signal | 
Emitted whenever the currently selected table changes.