Class: QgsCalloutWidget¶
Base class for widgets which allow control over the properties of callouts.
Added in version 3.10.
Class Hierarchy¶
Base classes¶
Methods
Returns the callout defined by the current settings in the widget. |
|
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. |
|
Returns the vector layer associated with the widget. |
|
Registers a data defined override button. |
|
Sets the callout to show in the widget. |
|
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts. |
|
Sets the geometry type of the features to customize the widget accordingly. |
|
Returns the vector layer associated with the widget. |
Signals
Should be emitted whenever configuration changes happened on this symbol layer configuration. |
- class qgis.gui.QgsCalloutWidget[source]¶
Bases:
QWidget
- __init__(parent: QWidget | None, vl: QgsMapLayer | None = None)
Constructor for QgsCalloutWidget.
- Parameters:
vl (Optional[QgsMapLayer] = None) – associated map layer
parent (Optional[QWidget]) – parent widget
- callout(self) QgsCallout | None [source]¶
Returns the callout defined by the current settings in the widget. Ownership is not transferred, and the caller should clone the returned value.
See also
- Return type:
Optional[QgsCallout]
- signal changed[source]¶
Should be emitted whenever configuration changes happened on this symbol layer configuration. If the subsymbol is changed,
symbolChanged()
should be emitted instead.
- context(self) QgsSymbolWidgetContext [source]¶
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
See also
- Return type:
- createExpressionContext(self) QgsExpressionContext [source]¶
- Return type:
- layer(self) QgsMapLayer | None [source]¶
Returns the vector layer associated with the widget.
Added in version 3.40.
- Return type:
Optional[QgsMapLayer]
- registerDataDefinedButton(self, button: QgsPropertyOverrideButton | None, key: QgsCallout.Property)[source]¶
Registers a data defined override button. Handles setting up connections for the button and initializing the button to show the correct descriptions and help text for the associated property.
- Parameters:
button (Optional[QgsPropertyOverrideButton])
key (QgsCallout.Property)
- setCallout(self, callout: QgsCallout | None)[source]¶
Sets the
callout
to show in the widget. Ownership is not transferred.See also
- Parameters:
callout (Optional[QgsCallout])
- setContext(self, context: QgsSymbolWidgetContext)[source]¶
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
- Parameters:
context (QgsSymbolWidgetContext) – symbol widget context
See also
- setGeometryType(self, type: Qgis.GeometryType)[source]¶
Sets the geometry
type
of the features to customize the widget accordingly.- Parameters:
type (Qgis.GeometryType)
- vectorLayer(self) QgsVectorLayer | None [source]¶
Returns the vector layer associated with the widget.
Deprecated since version 3.40: Use
layer()
instead.- Return type:
Optional[QgsVectorLayer]