Class: QgsLayerTreeEmbeddedWidgetRegistry

class qgis.gui.QgsLayerTreeEmbeddedWidgetRegistry

Bases: sip.wrapper

Constructor for QgsLayerTreeEmbeddedWidgetRegistry

QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through QgsGui.layerTreeEmbeddedWidgetRegistry()

Registry of widgets that may be embedded into layer tree view. Embedded widgets are assigned per individual map layers and they are shown before any legend entries. Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets.

QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through QgsGui.layerTreeEmbeddedWidgetRegistry()

Methods

addProvider

Register a provider, takes ownership of the object.

provider

Gets provider object from the provider’s ID

providers

Returns list of all registered providers

removeProvider

Unregister a provider, the provider object is deleted.

addProvider(self, provider: QgsLayerTreeEmbeddedWidgetProvider) → bool

Register a provider, takes ownership of the object. Returns True on success, False if the provider is already registered. *

Parameters

provider (QgsLayerTreeEmbeddedWidgetProvider) –

Return type

bool

provider(self, providerId: str) → QgsLayerTreeEmbeddedWidgetProvider

Gets provider object from the provider’s ID

Parameters

providerId (str) –

Return type

QgsLayerTreeEmbeddedWidgetProvider

providers(self) → List[str]

Returns list of all registered providers

Return type

List[str]

removeProvider(self, providerId: str) → bool

Unregister a provider, the provider object is deleted. Returns True on success, False if the provider was not registered. *

Parameters

providerId (str) –

Return type

bool