Class: QgsVectorLabelLegendNode¶
Produces legend node for a labeling text symbol
Added in version 3.20.
Class Hierarchy¶
Base classes¶
The   | 
|
Methods
data Returns data associated with the item  | 
|
drawSymbol  | 
|
exportSymbolToJson  | 
- class qgis.core.QgsVectorLabelLegendNode[source]¶
 Bases:
QgsLayerTreeModelLegendNode- __init__(nodeLayer: QgsLayerTreeLayer | None, labelSettings: QgsPalLayerSettings, parent: QObject | None = None)
 QgsVectorLabelLegendNode
- Parameters:
 nodeLayer (Optional[QgsLayerTreeLayer]) – the parent node
labelSettings (QgsPalLayerSettings) – setting of the label class
parent (Optional[QObject] = None) – the parent object
- data(self, role: int) Any[source]¶
 data Returns data associated with the item
- Parameters:
 role (int) – the data role
- Return type:
 Any
- Returns:
 variant containing the data for the role
- drawSymbol(self, settings: QgsLegendSettings, ctx: QgsLayerTreeModelLegendNode.ItemContext | None, itemHeight: float) QSizeF[source]¶
 - drawSymbol(None) None
 - Parameters:
 settings (QgsLegendSettings) – the legend settings
ctx (Optional[QgsLayerTreeModelLegendNode.ItemContext]) – context for the item
itemHeight (float) – the height of the item
- Return type:
 QSizeF
- Returns:
 size of the item
- exportSymbolToJson(self, settings: QgsLegendSettings, context: QgsRenderContext) Dict[str, QJsonValue][source]¶
 - exportSymbolToJson(None) None
 - Parameters:
 settings (QgsLegendSettings) – the legend settings
context (QgsRenderContext) – the item context
- Return type:
 Dict[str, QJsonValue]
- Returns:
 the json object