Class: QgsLayerTreeEmbeddedWidgetProvider

class qgis.gui.QgsLayerTreeEmbeddedWidgetProvider

Bases: sip.wrapper

Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree. Embedded widgets are assigned per individual map layers and they are shown before any legend entries.

New in version 2.16: Enums

Methods

createWidget Factory to create widgets.
id Unique name of the provider (among other providers)
name Human readable name - may be translatable with tr()
supportsLayer Whether it makes sense to use this widget for a particular layer

Signals

Attributes

createWidget(self, layer: QgsMapLayer, widgetIndex: int) → QWidget

Factory to create widgets. The returned widget is owned by the caller. The widgetIndex argument may be used to identify which widget is being created (useful when using multiple widgets from the same provider for one layer).

id(self) → str

Unique name of the provider (among other providers)

name(self) → str

Human readable name - may be translatable with tr()

supportsLayer(self, layer: QgsMapLayer) → bool

Whether it makes sense to use this widget for a particular layer