16#ifndef QGSPROVIDERCONNECTIONMODEL_H
17#define QGSPROVIDERCONNECTIONMODEL_H
19#include <QAbstractItemModel>
20#include <QSortFilterProxyModel>
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;
A model containing registered connection names for a specific data provider.
bool allowEmptyConnection() const
Returns true if the model allows the empty connection ("not set") choice.
@ RoleEmpty
Entry is an empty entry.
@ RoleUri
Connection URI string.
@ RoleConfiguration
Connection configuration variant map.