QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer. More...
#include <qgsmaplayerlegend.h>
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 |
Returns list of legend nodes to be used for a particular layer tree layer node. More... | |
virtual void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) |
Reads configuration from a DOM element previously written by writeXml() More... | |
virtual QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
Writes configuration to a DOM element, to be used later with readXml() More... | |
Static Public Member Functions | |
static QgsMapLayerLegend * | defaultMeshLegend (QgsMeshLayer *ml) |
Create new legend implementation for mesh layer. More... | |
static QgsMapLayerLegend * | defaultPointCloudLegend (QgsPointCloudLayer *layer) |
Create new legend implementation for a point cloud layer. More... | |
static QgsMapLayerLegend * | defaultRasterLegend (QgsRasterLayer *rl) |
Create new legend implementation for raster layer. More... | |
static QgsMapLayerLegend * | defaultVectorLegend (QgsVectorLayer *vl) |
Create new legend implementation for vector layer. More... | |
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer.
Definition at line 47 of file qgsmaplayerlegend.h.
|
explicit |
Constructor for QgsMapLayerLegend.
Definition at line 35 of file qgsmaplayerlegend.cpp.
|
pure virtual |
Returns list of legend nodes to be used for a particular layer tree layer node.
Ownership is transferred to the caller.
Implemented in QgsDefaultPointCloudLayerLegend, QgsDefaultMeshLayerLegend, QgsDefaultRasterLayerLegend, and QgsDefaultVectorLayerLegend.
|
static |
Create new legend implementation for mesh layer.
Definition at line 63 of file qgsmaplayerlegend.cpp.
|
static |
Create new legend implementation for a point cloud layer.
Definition at line 68 of file qgsmaplayerlegend.cpp.
|
static |
Create new legend implementation for raster layer.
Definition at line 58 of file qgsmaplayerlegend.cpp.
|
static |
Create new legend implementation for vector layer.
Definition at line 53 of file qgsmaplayerlegend.cpp.
|
signal |
Emitted when existing items/nodes got invalid and should be replaced by new ones.
|
virtual |
Reads configuration from a DOM element previously written by writeXml()
Reimplemented in QgsDefaultVectorLayerLegend.
Definition at line 40 of file qgsmaplayerlegend.cpp.
|
virtual |
Writes configuration to a DOM element, to be used later with readXml()
Reimplemented in QgsDefaultVectorLayerLegend.
Definition at line 46 of file qgsmaplayerlegend.cpp.