Class: QgsSubsetStringEditorProvider¶
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 |
|
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 |
- class qgis.gui.QgsSubsetStringEditorProvider[source]¶
Bases:
object- canHandleLayer(self, layer: QgsVectorLayer | None) bool[source]¶
Returns true if the provider can handle the layer
- Parameters:
layer (Optional[QgsVectorLayer])
- Return type:
bool
- canHandleLayerStorageType(self, layer: QgsVectorLayer | None) bool[source]¶
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 (Optional[QgsVectorLayer])
- Return type:
bool
- createDialog(self, layer: QgsVectorLayer | None, parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags) QgsSubsetStringEditorInterface | None[source]¶
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(), theQgsSubsetStringEditorInterfaceimplementation is responsible for setting the updated string on layer.- Parameters:
layer (Optional[QgsVectorLayer])
parent (Optional[QWidget] = None)
fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)
- Return type:
Optional[QgsSubsetStringEditorInterface]
- name(self) str[source]¶
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