16#ifndef QGSDATABASESCHEMACOMBOBOX_H
17#define QGSDATABASESCHEMACOMBOBOX_H
23#include <QSortFilterProxyModel>
30class GUI_EXPORT QgsDatabaseSchemaComboBoxSortModel:
public QSortFilterProxyModel
34 explicit QgsDatabaseSchemaComboBoxSortModel( QObject *parent =
nullptr );
36 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
76 void setAllowEmptySchema(
bool allowEmpty );
82 bool allowEmptySchema()
const;
87 QString currentSchema()
const;
99 void setSchema(
const QString &schema );
106 void setConnectionName(
const QString &connection,
const QString &provider = QString() );
111 void refreshSchemas();
118 void indexChanged(
int i );
124 bool mAllowEmpty =
false;
127 QSortFilterProxyModel *mSortModel =
nullptr;
128 QComboBox *mComboBox =
nullptr;
The QgsAbstractDatabaseProviderConnection class provides common functionality for DB based connection...
The QgsDatabaseSchemaComboBox class is a combo box which displays the list of schemas for a specific ...
void schemaChanged(const QString &schema)
Emitted whenever the currently selected schema changes.
QComboBox * comboBox()
Returns the combobox portion of the widget.
A model containing schemas from a database connection.