QGIS API Documentation  3.6.0-Noosa (5873452)
Public Member Functions | List of all members
QgsLayerTreeEmbeddedWidgetProvider Class Referenceabstract

Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree. More...

#include <qgslayertreeembeddedwidgetregistry.h>

Public Member Functions

virtual ~QgsLayerTreeEmbeddedWidgetProvider ()=default
 
virtual QWidget * createWidget (QgsMapLayer *layer, int widgetIndex)=0
 Factory to create widgets. More...
 
virtual QString id () const =0
 Unique name of the provider (among other providers) More...
 
virtual QString name () const =0
 Human readable name - may be translatable with tr() More...
 
virtual bool supportsLayer (QgsMapLayer *layer)=0
 Whether it makes sense to use this widget for a particular layer. More...
 

Detailed Description

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.

See also
QgsLayerTreeEmbeddedWidgetRegistry
Since
QGIS 2.16

Definition at line 35 of file qgslayertreeembeddedwidgetregistry.h.

Constructor & Destructor Documentation

◆ ~QgsLayerTreeEmbeddedWidgetProvider()

virtual QgsLayerTreeEmbeddedWidgetProvider::~QgsLayerTreeEmbeddedWidgetProvider ( )
virtualdefault

Member Function Documentation

◆ createWidget()

virtual QWidget* QgsLayerTreeEmbeddedWidgetProvider::createWidget ( QgsMapLayer layer,
int  widgetIndex 
)
pure virtual

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

virtual QString QgsLayerTreeEmbeddedWidgetProvider::id ( ) const
pure virtual

Unique name of the provider (among other providers)

◆ name()

virtual QString QgsLayerTreeEmbeddedWidgetProvider::name ( ) const
pure virtual

Human readable name - may be translatable with tr()

◆ supportsLayer()

virtual bool QgsLayerTreeEmbeddedWidgetProvider::supportsLayer ( QgsMapLayer layer)
pure virtual

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


The documentation for this class was generated from the following file: