Class: QgsDataItemProviderRegistry

class qgis.core.QgsDataItemProviderRegistry

Bases: sip.wrapper

This class keeps a list of 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()

Methods

addProvider

Adds a provider implementation to the registry.

dataProviderKey

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

provider

Returns the (possibly NULL) data item provider named providerName

providers

Returns the list of available providers.

removeProvider

Removes a provider implementation from the registry.

addProvider(self, provider: QgsDataItemProvider)

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

Parameters

provider (QgsDataItemProvider) –

dataProviderKey(self, dataItemProviderName: str) → str

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

Parameters

dataItemProviderName (str) – name of the data item provider

New in version 3.14.

Return type

str

provider(self, providerName: str)QgsDataItemProvider

Returns the (possibly NULL) data item provider named providerName

New in version 3.14.

Parameters

providerName (str) –

Return type

QgsDataItemProvider

providers(self) → List[QgsDataItemProvider]

Returns the list of available providers.

Return type

List[QgsDataItemProvider]

removeProvider(self, provider: QgsDataItemProvider)

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

Parameters

provider (QgsDataItemProvider) –