Subgroup: Source

Class: QgsSourceSelectProviderRegistry

class qgis.gui.QgsSourceSelectProviderRegistry

Bases: sip.wrapper

Constructor for QgsSourceSelectProviderRegistry.

This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDialog When created, it automatically adds providers from data provider plugins (e.g. PostGIS, WMS, …)

QgsSourceSelectProviderRegistry is not usually directly created, but rather accessed through QgsGui.sourceSelectProviderRegistry()

Note

This class access to QgsProviderRegistry instance to initialize, but QgsProviderRegistry is typically initialized after QgsGui is constructed, for this reason a delayed initialization has been implemented in the class.

New in version 3.0: Methods

addProvider Add a provider implementation.
providerByName Returns a provider by name or None if not found
providers Gets list of available providers
providersByKey Returns a (possibly empty) list of providers by data providerkey
removeProvider Remove provider implementation from the list (provider object is deleted)

Signals

Attributes

addProvider(self, provider: QgsSourceSelectProvider)

Add a provider implementation. Takes ownership of the object.

providerByName(self, name: str) → QgsSourceSelectProvider

Returns a provider by name or None if not found

providers(self) → object

Gets list of available providers

providersByKey(self, providerKey: str) → List[QgsSourceSelectProvider]

Returns a (possibly empty) list of providers by data providerkey

removeProvider(self, provider: QgsSourceSelectProvider) → bool

Remove provider implementation from the list (provider object is deleted)

Returns:true if the provider was actually removed and deleted