QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSMAPLAYERLEGEND_H
17 #define QGSMAPLAYERLEGEND_H
35 #include "qgis_core.h"
65 virtual QDomElement writeXml( QDomDocument &doc,
const QgsReadWriteContext &context )
const;
99 static void setLegendNodeOrder(
QgsLayerTreeLayer *nodeLayer,
const QList<int> &order );
103 static void setLegendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex,
const QString &newLabel );
104 static QString legendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
105 static bool hasLegendNodeUserLabel(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
132 static void setLegendNodeSymbolSize(
QgsLayerTreeLayer *nodeLayer,
int originalIndex, QSizeF size );
143 static QSizeF legendNodeSymbolSize(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
175 static void setLegendNodeColumnBreak(
QgsLayerTreeLayer *nodeLayer,
int originalIndex,
bool columnBreakBeforeNode );
183 static bool legendNodeColumnBreak(
QgsLayerTreeLayer *nodeLayer,
int originalIndex );
186 static void applyLayerNodeProperties(
QgsLayerTreeLayer *nodeLayer, QList<QgsLayerTreeModelLegendNode *> &nodes );
256 bool mTextOnSymbolEnabled =
false;
258 QHash<QString, QString> mTextOnSymbolContent;
301 #endif // QGSMAPLAYERLEGEND_H
Default legend implementation for vector layers.
The class is used as a container of context for various read/write operations on other objects.
The QgsMapLayerLegend class is abstract interface for implementations of legends for one map layer.
virtual QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a DOM element, to be used later with readXml()
virtual QList< QgsLayerTreeModelLegendNode * > createLayerTreeModelLegendNodes(QgsLayerTreeLayer *nodeLayer)=0
Returns list of legend nodes to be used for a particular layer tree layer node.
Abstract base class for all rendered symbols.
Default legend implementation for raster layers.
Represents a patch shape for use in map legends.
Container for all settings relating to text rendering.
bool textOnSymbolEnabled() const
Returns whether the "text on symbol" functionality is enabled.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Layer tree node points to a map layer.
Represents a raster layer.
Default legend implementation for mesh layers.
Base class for plugin layers.
void setTextOnSymbolEnabled(bool enabled)
Sets whether the "text on symbol" functionality is enabled.
void setTextOnSymbolContent(const QHash< QString, QString > &content)
Sets per-symbol content of labels for "text on symbol" functionality.
Miscellaneous utility functions for handling of map layer legend.
Represents a vector layer which manages a vector based data sets.
void itemsChanged()
Emitted when existing items/nodes got invalid and should be replaced by new ones.
void setTextOnSymbolTextFormat(const QgsTextFormat &format)
Sets text format of symbol labels for "text on symbol" functionality.
QHash< QString, QString > textOnSymbolContent() const
Returns per-symbol content of labels for "text on symbol" functionality.
QgsTextFormat textOnSymbolTextFormat() const
Returns text format of symbol labels for "text on symbol" functionality.
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from a DOM element previously written by writeXml()
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...