Class: QgsProviderSourceWidgetProvider

class qgis.gui.QgsProviderSourceWidgetProvider

Bases: sip.wrapper

An interface for providers of widgets designed to configure a data provider’s source.

New in version 3.18:

Methods

canHandleLayer

Returns True if the provider can handle the specified layer.

createWidget

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

name

Source widget provider name, this is useful to retrieve a particular source widget provider in case the provider has more than one, it should be unique among all providers.

providerKey

Provider key

canHandleLayer(self, layer: QgsMapLayer) bool

Returns True if the provider can handle the specified layer.

Parameters:

layer (QgsMapLayer) –

Return type:

bool

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 it cannot handle the layer. The returned object must be destroyed by the caller.

Parameters:
Return type:

QgsProviderSourceWidget

name(self) str

Source widget provider name, this is useful to retrieve a particular source widget provider in case the provider has more than one, it should be unique among all providers.

The default implementation returns the providerKey()

Return type:

str

providerKey(self) str

Provider key

Return type:

str