Class: QgsSimpleLegendNode¶
- class qgis.core.QgsSimpleLegendNode¶
Bases:
QgsLayerTreeModelLegendNode
Implementation of legend node interface for displaying arbitrary label with icon.
QgsSimpleLegendNode(nodeLayer: Optional[QgsLayerTreeLayer], label: Optional[str], icon: QIcon = QIcon(), parent: Optional[QObject] = None, key: Optional[str] = ‘’) Constructor for QgsSimpleLegendNode.
- Parameters:
nodeLayer – layer node
label – label
icon – icon
parent – attach a parent QObject to the legend node.
key –
the rule key
Methods
Returns a temporary context or
None
if legendMapViewData are not valid- param role:
- childEvent(self, a0: QChildEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- createTemporaryRenderContext(self) QgsRenderContext | None ¶
Returns a temporary context or
None
if legendMapViewData are not valid
- customEvent(self, a0: QEvent | None)¶
- data(self, role: int) Any ¶
- Parameters:
role (int)
- Return type:
Any
- disconnectNotify(self, signal: QMetaMethod)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- receivers(self, signal: PYQT_SIGNAL) int ¶
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, a0: QTimerEvent | None)¶