QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Miscellaneous utility functions for handling of map layer legend. More...
#include <qgsmaplayerlegend.h>
Static Public Member Functions | |
static void | applyLayerNodeProperties (QgsLayerTreeLayer *nodeLayer, QList< QgsLayerTreeModelLegendNode * > &nodes) |
update according to layer node's custom properties (order of items, user labels for items) More... | |
static bool | hasLegendNodeOrder (QgsLayerTreeLayer *nodeLayer) |
static bool | hasLegendNodeUserLabel (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
static QgsColorRampLegendNodeSettings * | legendNodeColorRampSettings (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
Returns the custom legend color ramp settings for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static bool | legendNodeColumnBreak (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
Returns whether a forced column break should occur before the node. More... | |
static QgsSymbol * | legendNodeCustomSymbol (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
Returns the custom legend symbol for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static QList< int > | legendNodeOrder (QgsLayerTreeLayer *nodeLayer) |
static QgsLegendPatchShape | legendNodePatchShape (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
Returns the legend patch shape for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static QSizeF | legendNodeSymbolSize (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
Returns the legend node symbol size for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static QString | legendNodeUserLabel (QgsLayerTreeLayer *nodeLayer, int originalIndex) |
static void | setLegendNodeColorRampSettings (QgsLayerTreeLayer *nodeLayer, int originalIndex, const QgsColorRampLegendNodeSettings *settings) |
Sets a custom legend color ramp settings for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static void | setLegendNodeColumnBreak (QgsLayerTreeLayer *nodeLayer, int originalIndex, bool columnBreakBeforeNode) |
Sets whether a forced column break should occur before the node. More... | |
static void | setLegendNodeCustomSymbol (QgsLayerTreeLayer *nodeLayer, int originalIndex, const QgsSymbol *symbol) |
Sets a custom legend symbol for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static void | setLegendNodeOrder (QgsLayerTreeLayer *nodeLayer, const QList< int > &order) |
static void | setLegendNodePatchShape (QgsLayerTreeLayer *nodeLayer, int originalIndex, const QgsLegendPatchShape &shape) |
Sets the legend patch shape for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static void | setLegendNodeSymbolSize (QgsLayerTreeLayer *nodeLayer, int originalIndex, QSizeF size) |
Sets the legend symbol size for the legend node belonging to nodeLayer at the specified originalIndex. More... | |
static void | setLegendNodeUserLabel (QgsLayerTreeLayer *nodeLayer, int originalIndex, const QString &newLabel) |
Miscellaneous utility functions for handling of map layer legend.
Definition at line 104 of file qgsmaplayerlegend.h.
|
static |
update according to layer node's custom properties (order of items, user labels for items)
Definition at line 277 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 140 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 155 of file qgsmaplayerlegend.cpp.
|
static |
Returns the custom legend color ramp settings for the legend node belonging to nodeLayer at the specified originalIndex.
If the corresponding legend node is not a QgsColorRampLegendNode then calling this method will return nullptr
.
If the returned value is non-nullptr
, they will be used in place of the default settings when rendering the legend node.
Caller takes ownership of the returned settings.
Definition at line 246 of file qgsmaplayerlegend.cpp.
|
static |
Returns whether a forced column break should occur before the node.
Definition at line 272 of file qgsmaplayerlegend.cpp.
|
static |
Returns the custom legend symbol for the legend node belonging to nodeLayer at the specified originalIndex.
If the symbol is non-nullptr
, it will be used in place of the default symbol when rendering the legend node.
Caller takes ownership of the returned symbol.
Definition at line 214 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 113 of file qgsmaplayerlegend.cpp.
|
static |
Returns the legend patch shape for the legend node belonging to nodeLayer at the specified originalIndex.
Definition at line 169 of file qgsmaplayerlegend.cpp.
|
static |
Returns the legend node symbol size for the legend node belonging to nodeLayer at the specified originalIndex.
If either the width or height are non-zero, they will be used when rendering the legend node instead of the default symbol width or height from QgsLegendSettings.
Definition at line 190 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 150 of file qgsmaplayerlegend.cpp.
|
static |
Sets a custom legend color ramp settings for the legend node belonging to nodeLayer at the specified originalIndex.
If the corresponding legend node is not a QgsColorRampLegendNode then calling this method will have no effect.
If settings is non-nullptr
, they will be used in place of the default settigns when rendering the legend node.
Definition at line 230 of file qgsmaplayerlegend.cpp.
|
static |
Sets whether a forced column break should occur before the node.
Definition at line 264 of file qgsmaplayerlegend.cpp.
|
static |
Sets a custom legend symbol for the legend node belonging to nodeLayer at the specified originalIndex.
If symbol is non-nullptr
, it will be used in place of the default symbol when rendering the legend node.
Definition at line 199 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 76 of file qgsmaplayerlegend.cpp.
|
static |
Sets the legend patch shape for the legend node belonging to nodeLayer at the specified originalIndex.
Definition at line 160 of file qgsmaplayerlegend.cpp.
|
static |
Sets the legend symbol size for the legend node belonging to nodeLayer at the specified originalIndex.
If either the width or height are non-zero, they will be used when rendering the legend node instead of the default symbol width or height from QgsLegendSettings.
Definition at line 182 of file qgsmaplayerlegend.cpp.
|
static |
Definition at line 145 of file qgsmaplayerlegend.cpp.