Class: QgsSourceSelectProviderRegistry

class qgis.gui.QgsSourceSelectProviderRegistry

Bases: sip.wrapper

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()

New in version 3.0: Enums

Methods

addProvider

Add a provider implementation.

createSelectionWidget

Gets select widget from provider with name

initializeFromProviderGuiRegistry

Initializes the registry.

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.

createSelectionWidget(self, name: str, parent: QWidget, fl: Union[Qt.WindowFlags, Qt.WindowType], widgetMode: QgsProviderRegistry.WidgetMode) → QgsAbstractDataSourceWidget

Gets select widget from provider with name

The function is replacement of QgsProviderRegistry.createSelectionWidget() from QGIS 3.8

New in version 3.10.

initializeFromProviderGuiRegistry(self, providerGuiRegistry: QgsProviderGuiRegistry)

Initializes the registry. The registry needs to be passed explicitly (instead of using singleton) because this gets called from QgsGui constructor.

New in version 3.10.

providerByName(self, name: str) → QgsSourceSelectProvider

Returns a provider by name or None if not found

providers(self) → List[QgsSourceSelectProvider]

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