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
Returns
True
if the provider can handle the specifiedlayer
.Creates a new widget to configure the source of the specified
layer
.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.
Provider key
- canHandleLayer(self, layer: QgsMapLayer) bool ¶
Returns
True
if the provider can handle the specifiedlayer
.- 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 returnNone
if it cannot handle the layer. The returned object must be destroyed by the caller.- Parameters:
layer (QgsMapLayer) –
parent (QWidget = None) –
- Return type:
- 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