Class: QgsDataItemProviderRegistry

A registry for data item providers that may add items to the browser tree.

When created, it automatically adds providers from provider plugins (e.g. PostGIS, WMS, …)

QgsDataItemProviderRegistry is not usually directly created, but rather accessed through QgsApplication.dataItemProviderRegistry().

Class Hierarchy

Inheritance diagram of qgis.core.QgsDataItemProviderRegistry

Base classes

QObject

class qgis.core.QgsDataItemProviderRegistry[source]

Bases: QObject

addProvider(self, provider: QgsDataItemProvider | None)[source]

Adds a provider implementation to the registry. Ownership of the provider is transferred to the registry.

Parameters:

provider (Optional[QgsDataItemProvider])

dataProviderKey(self, dataItemProviderName: str | None) str[source]

Returns the (possibly blank) data provider key for a given data item provider name.

Parameters:

dataItemProviderName (Optional[str]) – name of the data item provider

Added in version 3.14.

Return type:

str

provider(self, providerName: str | None) QgsDataItemProvider | None[source]

Returns the (possibly None) data item provider named providerName

Added in version 3.14.

Parameters:

providerName (Optional[str])

Return type:

Optional[QgsDataItemProvider]

signal providerAdded[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

signal providerWillBeRemoved[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

providers(self) List[QgsDataItemProvider]

Returns the list of available providers.

Return type:

List[QgsDataItemProvider]

removeProvider(self, provider: QgsDataItemProvider | None)[source]

Removes a provider implementation from the registry. The provider object is automatically deleted.

Parameters:

provider (Optional[QgsDataItemProvider])