QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
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. | |
void | setConnectionName (const QString &connection, const QString &provider=QString()) |
Sets the database connection name from which to retrieve the available schemas. | |
void | setSchema (const QString &schema) |
Sets the current schema selected in the combo box. | |
Signals | |
void | schemaChanged (const QString &schema) |
Emitted whenever the currently selected schema changes. | |
Public Member Functions | |
QgsDatabaseSchemaComboBox (const QString &provider, const QString &connection, QWidget *parent=nullptr) | |
Constructor for QgsDatabaseSchemaComboBox, for the specified provider and connection. | |
QgsDatabaseSchemaComboBox (QgsAbstractDatabaseProviderConnection *connection, QWidget *parent=nullptr) | |
Constructor for QgsDatabaseSchemaComboBox, for the specified connection. | |
bool | allowEmptySchema () const |
Returns true if the combobox allows the empty schema ("not set") choice. | |
QComboBox * | comboBox () |
Returns the combobox portion of the widget. | |
QString | currentSchema () const |
Returns the name of the current schema selected in the combo box. | |
void | setAllowEmptySchema (bool allowEmpty) |
Sets whether an optional empty schema ("not set") option is present in the combobox. | |
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.