Class: QgsSubsetStringEditorProviderRegistry

class qgis.gui.QgsSubsetStringEditorProviderRegistry

Bases: sip.wrapper

This class keeps a list of subset string editor providers.

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

Methods

addProvider

Add a provider implementation.

createDialog

Creates a new dialog to edit the subset string of the provided layer. It will default to returning a :py:class:`QgsQueryBuilder`* if no provider was found. The returned object must be destroyed by the caller.

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: QgsSubsetStringEditorProvider)

Add a provider implementation. Takes ownership of the object.

Parameters

provider (QgsSubsetStringEditorProvider) –

createDialog(self, layer: QgsVectorLayer, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)QgsSubsetStringEditorInterface

Creates a new dialog to edit the subset string of the provided layer. It will default to returning a :py:class:`QgsQueryBuilder`* if no provider was found. The returned object must be destroyed by the caller.

Parameters
  • layer (QgsVectorLayer) –

  • parent (QWidget = None) –

  • fl (Union[Qt.WindowFlags) –

Return type

QgsSubsetStringEditorInterface

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)QgsSubsetStringEditorProvider

Returns a provider by name or None if not found

Parameters

name (str) –

Return type

QgsSubsetStringEditorProvider

providers(self) → List[QgsSubsetStringEditorProvider]

Gets list of available providers

Return type

List[QgsSubsetStringEditorProvider]

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

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

Parameters

providerKey (str) –

Return type

List[QgsSubsetStringEditorProvider]

removeProvider(self, provider: QgsSubsetStringEditorProvider) → 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 (QgsSubsetStringEditorProvider) –