QGIS API Documentation 3.41.0-Master (cea29feecf2)
|
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 24 of file qgsdatabaseschemacombobox.cpp.
|
explicit |
Constructor for QgsDatabaseSchemaComboBox, for the specified connection.
Ownership of connection is transferred to the combobox.
Definition at line 33 of file qgsdatabaseschemacombobox.cpp.
bool QgsDatabaseSchemaComboBox::allowEmptySchema | ( | ) | const |
Returns true
if the combobox allows the empty schema ("not set") choice.
Definition at line 47 of file qgsdatabaseschemacombobox.cpp.
|
inline |
Returns the combobox portion of the widget.
Definition at line 91 of file qgsdatabaseschemacombobox.h.
QString QgsDatabaseSchemaComboBox::currentSchema | ( | ) | const |
Returns the name of the current schema selected in the combo box.
Definition at line 151 of file qgsdatabaseschemacombobox.cpp.
|
slot |
Refreshes the list of available schemas.
Definition at line 143 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 40 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 118 of file qgsdatabaseschemacombobox.cpp.
|
slot |
Sets the current schema selected in the combo box.
Definition at line 87 of file qgsdatabaseschemacombobox.cpp.