16 #ifndef QGSPROVIDERCONNECTIONMODEL_H
17 #define QGSPROVIDERCONNECTIONMODEL_H
19 #include <QAbstractItemModel>
20 #include <QSortFilterProxyModel>
21 #include <QStringList>
23 #include "qgis_core.h"
47 RoleConnectionName = Qt::UserRole,
66 void setAllowEmptyConnection(
bool allowEmpty );
75 QModelIndex parent(
const QModelIndex &child )
const override;
76 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
77 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
78 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
79 QModelIndex index(
int row,
int column,
const QModelIndex &parent )
const override;
81 void removeConnection(
const QString &connection );
82 void addConnection(
const QString &connection );
87 QStringList mConnections;
88 bool mAllowEmpty =
false;
91 #endif // QGSPROVIDERCONNECTIONMODEL_H