Class: QgsSubsetStringEditorProvider¶
- class qgis.gui.QgsSubsetStringEditorProvider¶
Bases:
sip.wrapper
This is the interface for those who want to provide a dialog to edit a subset string.
Added in version 3.18:
Methods
Returns true if the provider can handle the layer
Returns true if the provider can handle specifically the layer->:py:func:~QgsSubsetStringEditorProvider.provider->:py:func:~QgsSubsetStringEditorProvider.storageType This method will only be called if
canHandleLayer()
returned true.Creates a new dialog to edit the subset string of the provided
layer
.Subset string editor provider name, this is useful to retrieve a particular subset string editor in case the provider has more than one, it should be unique among all providers.
Provider key
- canHandleLayer(self, layer: QgsVectorLayer) bool ¶
Returns true if the provider can handle the layer
- Parameters:
layer (QgsVectorLayer)
- Return type:
bool
- canHandleLayerStorageType(self, layer: QgsVectorLayer) bool ¶
Returns true if the provider can handle specifically the layer->:py:func:~QgsSubsetStringEditorProvider.provider->:py:func:~QgsSubsetStringEditorProvider.storageType This method will only be called if
canHandleLayer()
returned true. Typically a generic SQL provider for the OGR provider will return false, whereas a dedicated plugin with a specific behavior for a OGR driver will return true.- Parameters:
layer (QgsVectorLayer)
- Return type:
bool
- createDialog(self, layer: QgsVectorLayer, parent: QWidget = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags) QgsSubsetStringEditorInterface ¶
Creates a new dialog to edit the subset string of the provided
layer
. It may return None if it cannot handle the layer. The returned object must be destroyed by the caller. On successfulaccept()
, theQgsSubsetStringEditorInterface
implementation is responsible for setting the updated string on layer.- Parameters:
layer (QgsVectorLayer)
parent (QWidget = None)
fl (Union[Qt.WindowFlags)
- Return type:
- name(self) str ¶
Subset string editor provider name, this is useful to retrieve a particular subset string editor 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