Class: QgsSimpleLegendNode¶
- class qgis.core.QgsSimpleLegendNode¶
Bases:
QgsLayerTreeModelLegendNode
Implementation of legend node interface for displaying arbitrary label with icon.
New in version 2.6.
QgsSimpleLegendNode(nodeLayer:
QgsLayerTreeLayer
, label: str, icon: QIcon = QIcon(), parent: QObject = None, key: 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, 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)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- receivers(self, PYQT_SIGNAL) int ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- timerEvent(self, QTimerEvent)¶