Class: QgsRasterSymbolLegendNode

class qgis.core.QgsRasterSymbolLegendNode

Bases: QgsLayerTreeModelLegendNode

Implementation of legend node interface for displaying raster legend entries

New in version 2.6.

QgsRasterSymbolLegendNode(nodeLayer: QgsLayerTreeLayer, color: Union[QColor, Qt.GlobalColor, QGradient], label: str, parent: QObject = None, isCheckable: bool = False, ruleKey: str = ‘’) Constructor for QgsRasterSymbolLegendNode.

Parameters
childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createTemporaryRenderContext(self)QgsRenderContext

Returns a temporary context or None if legendMapViewData are not valid

customEvent(self, QEvent)
data(self, role: int)Any
Parameters

role (int) –

Return type

Any

disconnectNotify(self, QMetaMethod)
drawSymbol(self, settings: QgsLegendSettings, ctx: QgsLayerTreeModelLegendNode.ItemContext, itemHeight: float)QSizeF
Parameters
Return type

QSizeF

exportSymbolToJson(self, settings: QgsLegendSettings, context: QgsRenderContext)Dict[str, QJsonValue]
Parameters
Return type

Dict[str, QJsonValue]

flags(self)Qt.ItemFlags
Return type

Qt.ItemFlags

isCheckable(self)bool

Returns whether the item is user-checkable - whether renderer supports enabling/disabling it.

New in version 3.18.

Return type

bool

isSignalConnected(self, QMetaMethod)bool
receivers(self, PYQT_SIGNAL)int
ruleKey(self)str

Returns the unique identifier of node for identification of the item within renderer.

New in version 3.18.

Return type

str

sender(self)QObject
senderSignalIndex(self)int
setData(self, value: Any, role: int)bool
Parameters
  • value (Any) –

  • role (int) –

Return type

bool

timerEvent(self, QTimerEvent)