Class: QgsRasterSymbolLegendNode¶
Implementation of legend node interface for displaying raster legend entries.
Class Hierarchy¶
Base classes¶
An abstract interface for legend items returned from |
|
Methods
Returns whether the item is user-checkable - whether renderer supports enabling/disabling it. |
|
Returns the unique identifier of node for identification of the item within renderer. |
- class qgis.core.QgsRasterSymbolLegendNode[source]¶
Bases:
QgsLayerTreeModelLegendNode
- __init__(nodeLayer: QgsLayerTreeLayer | None, color: QColor | Qt.GlobalColor, label: str | None, parent: QObject | None = None, isCheckable: bool = False, ruleKey: str | None = '', parentRuleKey: str | None = '')
Constructor for QgsRasterSymbolLegendNode.
- Parameters:
nodeLayer (Optional[QgsLayerTreeLayer]) – layer node
color (Union[QColor, Qt.GlobalColor]) – color
label (Optional[str]) – label
parent (Optional[QObject] = None) – attach a parent QObject to the legend node.
isCheckable (bool = False) – set to
True
to enable the checkbox for the node (since QGIS 3.18)ruleKey (Optional[str] = '') – optional identifier to allow a unique ID to be assigned to the node by a renderer (since QGIS 3.18)
parentRuleKey (Optional[str] = '') – rule key of parent (since QGIS 3.40)