Class: QgsDefaultVectorLayerLegend¶
-
class
qgis.core.
QgsDefaultVectorLayerLegend
¶ Bases:
qgis._core.QgsMapLayerLegend
Default legend implementation for vector layers
New in version 2.6: Enums
Methods
Sets per-symbol content of labels for “text on symbol” functionality.
Sets whether the “text on symbol” functionality is enabled.
Sets text format of symbol labels for “text on symbol” functionality.
Returns per-symbol content of labels for “text on symbol” functionality.
Returns whether the “text on symbol” functionality is enabled.
Returns text format of symbol labels for “text on symbol” functionality.
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¶
-