Subgroup: Default
Class: QgsDefaultVectorLayerLegend¶
-
class
qgis.core.
QgsDefaultVectorLayerLegend
¶ Bases:
qgis._core.QgsMapLayerLegend
Default legend implementation for vector layers
New in version 2.6: Methods
childEvent
connectNotify
createLayerTreeModelLegendNodes
customEvent
disconnectNotify
isSignalConnected
readXml
receivers
sender
senderSignalIndex
setTextOnSymbolContent
Sets per-symbol content of labels for “text on symbol” functionality. setTextOnSymbolEnabled
Sets whether the “text on symbol” functionality is enabled. setTextOnSymbolTextFormat
Sets text format of symbol labels for “text on symbol” functionality. textOnSymbolContent
Returns per-symbol content of labels for “text on symbol” functionality. textOnSymbolEnabled
Returns whether the “text on symbol” functionality is enabled. textOnSymbolTextFormat
Returns text format of symbol labels for “text on symbol” functionality. timerEvent
writeXml
Signals
Attributes
-
childEvent
()¶
-
connectNotify
()¶
-
createLayerTreeModelLegendNodes
(self, nodeLayer: QgsLayerTreeLayer) → List[QgsLayerTreeModelLegendNode]¶
-
customEvent
()¶
-
disconnectNotify
()¶
-
isSignalConnected
()¶
-
readXml
(self, elem: QDomElement, context: QgsReadWriteContext)¶
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setTextOnSymbolContent
(self, content: Dict[str, str])¶ Sets per-symbol content of labels for “text on symbol” functionality. In the passed dictionary the keys are rule keys of legend items, the values are labels to be shown.
New in version 3.2.
-
setTextOnSymbolEnabled
(self, enabled: bool)¶ Sets whether the “text on symbol” functionality is enabled. When enabled, legend symbols may have extra text rendered on top. The content of labels and their style is controlled by textOnSymbolContent() and textOnSymbolTextFormat().
New in version 3.2.
-
setTextOnSymbolTextFormat
(self, format: QgsTextFormat)¶ Sets text format of symbol labels for “text on symbol” functionality.
New in version 3.2.
-
textOnSymbolContent
(self) → Dict[str, str]¶ Returns per-symbol content of labels for “text on symbol” functionality. In the passed dictionary the keys are rule keys of legend items, the values are labels to be shown.
New in version 3.2.
-
textOnSymbolEnabled
(self) → bool¶ Returns whether the “text on symbol” functionality is enabled. When enabled, legend symbols may have extra text rendered on top. The content of labels and their style is controlled by textOnSymbolContent() and textOnSymbolTextFormat().
New in version 3.2.
-
textOnSymbolTextFormat
(self) → QgsTextFormat¶ Returns text format of symbol labels for “text on symbol” functionality.
New in version 3.2.
-
timerEvent
()¶
-
writeXml
(self, doc: QDomDocument, context: QgsReadWriteContext) → QDomElement¶
-