16 #ifndef QGSDATABASESCHEMACOMBOBOX_H
17 #define QGSDATABASESCHEMACOMBOBOX_H
23 #include <QSortFilterProxyModel>
30 class GUI_EXPORT QgsDatabaseSchemaComboBoxSortModel:
public QSortFilterProxyModel
33 explicit QgsDatabaseSchemaComboBoxSortModel( QObject *parent =
nullptr );
35 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
75 void setAllowEmptySchema(
bool allowEmpty );
81 bool allowEmptySchema()
const;
86 QString currentSchema()
const;
98 void setSchema(
const QString &schema );
105 void setConnectionName(
const QString &connection,
const QString &provider = QString() );
110 void refreshSchemas();
117 void indexChanged(
int i );
123 bool mAllowEmpty =
false;
126 QSortFilterProxyModel *mSortModel =
nullptr;
127 QComboBox *mComboBox =
nullptr;
130 #endif // QGSDATABASESCHEMACOMBOBOX_H