16 #ifndef QGSPROVIDERCONNECTIONCOMBOBOX_H
17 #define QGSPROVIDERCONNECTIONCOMBOBOX_H
23 #include <QSortFilterProxyModel>
29 class GUI_EXPORT QgsProviderConnectionComboBoxSortModel:
public QSortFilterProxyModel
32 explicit QgsProviderConnectionComboBoxSortModel( QObject *parent =
nullptr );
34 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
76 void setProvider(
const QString &provider );
82 void setAllowEmptyConnection(
bool allowEmpty );
88 bool allowEmptyConnection()
const;
93 QString currentConnection()
const;
98 QString currentConnectionUri()
const;
105 void setConnection(
const QString &connection );
112 void indexChanged(
int i );
117 QSortFilterProxyModel *mSortModel =
nullptr;
120 #endif // QGSPROVIDERCONNECTIONCOMBOBOX_H