Class: QgsProviderConnectionModel

class qgis.core.QgsProviderConnectionModel(provider: str, parent: QObject = None)

Bases: PyQt5.QtCore.QAbstractItemModel

Constructor for QgsProviderConnectionModel, for the specified provider.

Warning

The provider must support the connection API methods in its QgsProviderMetadata implementation in order for the model to work correctly.

A model containing registered connection names for a specific data provider.

Warning

The provider must support the connection API methods in its QgsProviderMetadata implementation in order for the model to work correctly.

New in version 3.14.

Parameters
  • provider (str) –

  • parent

class Role

Bases: int

baseClass

alias of QgsProviderConnectionModel

RoleConfiguration = 258
RoleConnectionName = 256
RoleEmpty = 259
RoleUri = 257
allowEmptyConnection(self) → bool

Returns True if the model allows the empty connection (“not set”) choice.

Return type

bool

beginInsertColumns()
beginInsertRows()
beginMoveColumns()
beginMoveRows()
beginRemoveColumns()
beginRemoveRows()
beginResetModel()
changePersistentIndex()
changePersistentIndexList()
childEvent()
columnCount(self, parent: QModelIndex = QModelIndex()) → int
Parameters

parent (QModelIndex = QModelIndex()) –

Return type

int

connectNotify()
createIndex()
customEvent()
data(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any
Parameters
  • index (QModelIndex) –

  • role (int = Qt.DisplayRole) –

Return type

Any

decodeData()
disconnectNotify()
encodeData()
endInsertColumns()
endInsertRows()
endMoveColumns()
endMoveRows()
endRemoveColumns()
endRemoveRows()
endResetModel()
index(self, row: int, column: int, parent: QModelIndex) → QModelIndex
Parameters
  • row (int) –

  • column (int) –

  • parent (QModelIndex) –

Return type

QModelIndex

isSignalConnected()
parent(self, child: QModelIndex) → QModelIndex
Parameters

child (QModelIndex) –

Return type

QModelIndex

persistentIndexList()
receivers()
resetInternalData()
rowCount(self, parent: QModelIndex = QModelIndex()) → int
Parameters

parent (QModelIndex = QModelIndex()) –

Return type

int

sender()
senderSignalIndex()
setAllowEmptyConnection(self, allowEmpty: bool)

Sets whether an optional empty connection (“not set”) option is present in the model.

Parameters

allowEmpty (bool) –

timerEvent()