QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
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.
 
virtual QString id () const =0
 Unique name of the provider (among other providers)
 
virtual QString name () const =0
 Human readable name - may be translatable with tr()
 
virtual bool supportsLayer (QgsMapLayer *layer)=0
 Whether it makes sense to use this widget for a particular layer.
 

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

Definition at line 34 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: