16 #ifndef QGSMAPLAYERLEGEND_H 17 #define QGSMAPLAYERLEGEND_H 33 #include "qgis_core.h" 63 virtual QDomElement writeXml( QDomDocument &doc,
const QgsReadWriteContext &context )
const;
97 static void setLegendNodeOrder(
QgsLayerTreeLayer *nodeLayer,
const QList<int> &order );
101 static void setLegendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex,
const QString &newLabel );
102 static QString legendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
103 static bool hasLegendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
106 static void applyLayerNodeProperties(
QgsLayerTreeLayer *nodeLayer, QList<QgsLayerTreeModelLegendNode *> &nodes );
176 bool mTextOnSymbolEnabled =
false;
178 QHash<QString, QString> mTextOnSymbolContent;
221 #endif // QGSMAPLAYERLEGEND_H The class is used as a container of context for various read/write operations on other objects...
virtual QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a DOM element, to be used later with readXml()
QHash< QString, QString > textOnSymbolContent() const
Returns per-symbol content of labels for "text on symbol" functionality.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
Base class for plugin layers.
Default legend implementation for mesh layers.
Default legend implementation for raster layers.
void setTextOnSymbolTextFormat(const QgsTextFormat &format)
Sets text format of symbol labels for "text on symbol" functionality.
void setTextOnSymbolContent(const QHash< QString, QString > &content)
Sets per-symbol content of labels for "text on symbol" functionality.
virtual QList< QgsLayerTreeModelLegendNode * > createLayerTreeModelLegendNodes(QgsLayerTreeLayer *nodeLayer)=0
Returns list of legend nodes to be used for a particular layer tree layer node.
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer...
Miscellaneous utility functions for handling of map layer legend.
void setTextOnSymbolEnabled(bool enabled)
Sets whether the "text on symbol" functionality is enabled.
bool textOnSymbolEnabled() const
Returns whether the "text on symbol" functionality is enabled.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Container for all settings relating to text rendering.
Default legend implementation for vector layers.
QgsTextFormat textOnSymbolTextFormat() const
Returns text format of symbol labels for "text on symbol" functionality.
Represents a vector layer which manages a vector based data sets.
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from a DOM element previously written by writeXml()
Layer tree node points to a map layer.