Class: QgsMapLayerLegendUtils

class qgis.core.QgsMapLayerLegendUtils

Bases: sip.wrapper

Miscellaneous utility functions for handling of map layer legend

New in version 2.6: Methods

applyLayerNodeProperties update according to layer node’s custom properties (order of items, user labels for items)
hasLegendNodeOrder
hasLegendNodeUserLabel
legendNodeOrder
legendNodeUserLabel
setLegendNodeOrder
setLegendNodeUserLabel

Signals

Attributes

applyLayerNodeProperties(nodeLayer: QgsLayerTreeLayer, nodes: Iterable[QgsLayerTreeModelLegendNode])

update according to layer node’s custom properties (order of items, user labels for items)

hasLegendNodeOrder(nodeLayer: QgsLayerTreeLayer) → bool
hasLegendNodeUserLabel(nodeLayer: QgsLayerTreeLayer, originalIndex: int) → bool
legendNodeOrder(nodeLayer: QgsLayerTreeLayer) → List[int]
legendNodeUserLabel(nodeLayer: QgsLayerTreeLayer, originalIndex: int) → str
setLegendNodeOrder(nodeLayer: QgsLayerTreeLayer, order: Iterable[int])
setLegendNodeUserLabel(nodeLayer: QgsLayerTreeLayer, originalIndex: int, newLabel: str)