Class: QgsDataDefinedSizeLegendWidget¶
Widget for configuration of appearance of legend for marker symbols with data-defined size.

QgsDataDefinedSizeLegendWidget allowing customization of data-defined size legends¶
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as a inline panel |
|
Methods
Returns configuration as set up in the dialog (may be |
- class qgis.gui.QgsDataDefinedSizeLegendWidget[source]¶
Bases:
QgsPanelWidget
- __init__(ddsLegend: QgsDataDefinedSizeLegend | None, ddSize: QgsProperty, overrideSymbol: QgsMarkerSymbol | None, canvas: QgsMapCanvas | None = None, parent: QWidget | None = None)
Creates the dialog and initializes the content to what is passed in the legend configuration (may be
None
). The ddSize argument determines scaling of the marker symbol - it should have a size scale transformer assigned to know the range of sizes. The overrideSymbol argument may override the source symbol: this is useful in case when the symbol is given from outside rather than being set insideQgsDataDefinedSizeLegend
.- Parameters:
ddsLegend (Optional[QgsDataDefinedSizeLegend])
ddSize (QgsProperty)
overrideSymbol (Optional[QgsMarkerSymbol])
canvas (Optional[QgsMapCanvas] = None)
parent (Optional[QWidget] = None)
- dataDefinedSizeLegend(self) QgsDataDefinedSizeLegend | None [source]¶
Returns configuration as set up in the dialog (may be
None
). Ownership is passed to the caller.- Return type:
Optional[QgsDataDefinedSizeLegend]