QGIS API Documentation  3.0.2-Girona (307d082)
Signals | Public Member Functions | Static Public Member Functions | List of all members
QgsMapLayerLegend Class Referenceabstract

The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer. More...

#include <qgsmaplayerlegend.h>

Inheritance diagram for QgsMapLayerLegend:
Inheritance graph
[legend]

Signals

void itemsChanged ()
 Emitted when existing items/nodes got invalid and should be replaced by new ones. More...
 

Public Member Functions

 QgsMapLayerLegend (QObject *parent=nullptr)
 Constructor for QgsMapLayerLegend. More...
 
virtual QList< QgsLayerTreeModelLegendNode * > createLayerTreeModelLegendNodes (QgsLayerTreeLayer *nodeLayer)=0
 Return list of legend nodes to be used for a particular layer tree layer node. More...
 

Static Public Member Functions

static QgsMapLayerLegenddefaultRasterLegend (QgsRasterLayer *rl)
 Create new legend implementation for raster layer. More...
 
static QgsMapLayerLegenddefaultVectorLegend (QgsVectorLayer *vl)
 Create new legend implementation for vector layer. More...
 

Detailed Description

The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer.

Since
QGIS 2.6

Definition at line 38 of file qgsmaplayerlegend.h.

Constructor & Destructor Documentation

◆ QgsMapLayerLegend()

QgsMapLayerLegend::QgsMapLayerLegend ( QObject *  parent = nullptr)
explicit

Constructor for QgsMapLayerLegend.

Definition at line 28 of file qgsmaplayerlegend.cpp.

Member Function Documentation

◆ createLayerTreeModelLegendNodes()

virtual QList<QgsLayerTreeModelLegendNode *> QgsMapLayerLegend::createLayerTreeModelLegendNodes ( QgsLayerTreeLayer nodeLayer)
pure virtual

Return list of legend nodes to be used for a particular layer tree layer node.

Ownership is transferred to the caller.

Implemented in QgsDefaultRasterLayerLegend, and QgsDefaultVectorLayerLegend.

◆ defaultRasterLegend()

QgsMapLayerLegend * QgsMapLayerLegend::defaultRasterLegend ( QgsRasterLayer rl)
static

Create new legend implementation for raster layer.

Definition at line 38 of file qgsmaplayerlegend.cpp.

◆ defaultVectorLegend()

QgsMapLayerLegend * QgsMapLayerLegend::defaultVectorLegend ( QgsVectorLayer vl)
static

Create new legend implementation for vector layer.

Definition at line 33 of file qgsmaplayerlegend.cpp.

◆ itemsChanged

void QgsMapLayerLegend::itemsChanged ( )
signal

Emitted when existing items/nodes got invalid and should be replaced by new ones.


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