QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
A model containing registered connection names for a specific data provider. More...
#include <qgsproviderconnectionmodel.h>
Public Types | |
enum | Role { RoleConnectionName = Qt::UserRole , RoleUri , RoleConfiguration , RoleEmpty } |
Model roles. More... | |
Public Member Functions | |
QgsProviderConnectionModel (const QString &provider, QObject *parent=nullptr) | |
Constructor for QgsProviderConnectionModel, for the specified provider. More... | |
bool | allowEmptyConnection () const |
Returns true if the model allows the empty connection ("not set") choice. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
QModelIndex | parent (const QModelIndex &child) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
void | setAllowEmptyConnection (bool allowEmpty) |
Sets whether an optional empty connection ("not set") option is present in the model. More... | |
A model containing registered connection names for a specific data provider.
Definition at line 38 of file qgsproviderconnectionmodel.h.
Model roles.
Enumerator | |
---|---|
RoleConnectionName | Connection name. |
RoleUri | Connection URI string. |
RoleConfiguration | Connection configuration variant map. |
RoleEmpty | Entry is an empty entry. |
Definition at line 45 of file qgsproviderconnectionmodel.h.
|
explicit |
Constructor for QgsProviderConnectionModel, for the specified provider.
Definition at line 20 of file qgsproviderconnectionmodel.cpp.
|
inline |
Returns true
if the model allows the empty connection ("not set") choice.
Definition at line 72 of file qgsproviderconnectionmodel.h.
|
override |
Definition at line 85 of file qgsproviderconnectionmodel.cpp.
|
override |
Definition at line 92 of file qgsproviderconnectionmodel.cpp.
|
override |
Definition at line 158 of file qgsproviderconnectionmodel.cpp.
|
override |
Definition at line 70 of file qgsproviderconnectionmodel.cpp.
|
override |
Definition at line 77 of file qgsproviderconnectionmodel.cpp.
void QgsProviderConnectionModel::setAllowEmptyConnection | ( | bool | allowEmpty | ) |
Sets whether an optional empty connection ("not set") option is present in the model.
Definition at line 33 of file qgsproviderconnectionmodel.cpp.