Class: QgsProviderSourceWidgetProviderRegistry

class qgis.gui.QgsProviderSourceWidgetProviderRegistry

Bases: sip.wrapper

This class keeps a list of provider source widget providers.

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

Methods

addProvider

Add a provider implementation.

createWidget

Creates a new widget to configure the source of the specified layer.

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)

addProvider(self, provider: QgsProviderSourceWidgetProvider)

Add a provider implementation. Takes ownership of the object.

Parameters

provider (QgsProviderSourceWidgetProvider) –

createWidget(self, layer: QgsMapLayer, parent: QWidget = None)QgsProviderSourceWidget

Creates a new widget to configure the source of the specified layer. It may return None if no provider was found. The returned object must be destroyed by the caller.

Parameters
Return type

QgsProviderSourceWidget

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.

Parameters

providerGuiRegistry (QgsProviderGuiRegistry) –

providerByName(self, name: str)QgsProviderSourceWidgetProvider

Returns a provider by name or None if not found

Parameters

name (str) –

Return type

QgsProviderSourceWidgetProvider

providers(self) → List[QgsProviderSourceWidgetProvider]

Gets list of available providers

Return type

List[QgsProviderSourceWidgetProvider]

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

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

Parameters

providerKey (str) –

Return type

List[QgsProviderSourceWidgetProvider]

removeProvider(self, provider: QgsProviderSourceWidgetProvider) → bool

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

Return type

bool

Returns

True if the provider was actually removed and deleted

Parameters

provider (QgsProviderSourceWidgetProvider) –