QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
The QgsDatabaseSchemaComboBox class is a combo box which displays the list of schemas for a specific database connection. More...
#include <qgsdatabaseschemacombobox.h>
Public Slots | |
void | refreshSchemas () |
Refreshes the list of available schemas. More... | |
void | setConnectionName (const QString &connection, const QString &provider=QString()) |
Sets the database connection name from which to retrieve the available schemas. More... | |
void | setSchema (const QString &schema) |
Sets the current schema selected in the combo box. More... | |
Signals | |
void | schemaChanged (const QString &schema) |
Emitted whenever the currently selected schema changes. More... | |
Public Member Functions | |
QgsDatabaseSchemaComboBox (const QString &provider, const QString &connection, QWidget *parent=nullptr) | |
Constructor for QgsDatabaseSchemaComboBox, for the specified provider and connection. More... | |
QgsDatabaseSchemaComboBox (QgsAbstractDatabaseProviderConnection *connection, QWidget *parent=nullptr) | |
Constructor for QgsDatabaseSchemaComboBox, for the specified connection. More... | |
bool | allowEmptySchema () const |
Returns true if the combobox allows the empty schema ("not set") choice. More... | |
QComboBox * | comboBox () |
Returns the combobox portion of the widget. More... | |
QString | currentSchema () const |
Returns the name of the current schema selected in the combo box. More... | |
void | setAllowEmptySchema (bool allowEmpty) |
Sets whether an optional empty schema ("not set") option is present in the combobox. More... | |
The QgsDatabaseSchemaComboBox class is a combo box which displays the list of schemas for a specific database connection.
Definition at line 51 of file qgsdatabaseschemacombobox.h.
|
explicit |
Constructor for QgsDatabaseSchemaComboBox, for the specified provider and connection.
Definition at line 23 of file qgsdatabaseschemacombobox.cpp.
|
explicit |
Constructor for QgsDatabaseSchemaComboBox, for the specified connection.
Ownership of connection is transferred to the combobox.
Definition at line 32 of file qgsdatabaseschemacombobox.cpp.
bool QgsDatabaseSchemaComboBox::allowEmptySchema | ( | ) | const |
Returns true
if the combobox allows the empty schema ("not set") choice.
Definition at line 46 of file qgsdatabaseschemacombobox.cpp.
|
inline |
Returns the combobox portion of the widget.
Definition at line 92 of file qgsdatabaseschemacombobox.h.
QString QgsDatabaseSchemaComboBox::currentSchema | ( | ) | const |
Returns the name of the current schema selected in the combo box.
Definition at line 150 of file qgsdatabaseschemacombobox.cpp.
|
slot |
Refreshes the list of available schemas.
Definition at line 142 of file qgsdatabaseschemacombobox.cpp.
|
signal |
Emitted whenever the currently selected schema changes.
void QgsDatabaseSchemaComboBox::setAllowEmptySchema | ( | bool | allowEmpty | ) |
Sets whether an optional empty schema ("not set") option is present in the combobox.
Definition at line 39 of file qgsdatabaseschemacombobox.cpp.
|
slot |
Sets the database connection name from which to retrieve the available schemas.
Optionally the provider can be reset too.
Definition at line 117 of file qgsdatabaseschemacombobox.cpp.
|
slot |
Sets the current schema selected in the combo box.
Definition at line 86 of file qgsdatabaseschemacombobox.cpp.