Class: QgsCalloutPanelWidget

A panel widget for configuration of callouts.

Added in version 3.40.

QgsCalloutPanelWidget

QgsCalloutPanelWidget

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCalloutPanelWidget

Base classes

QgsPanelWidget

Base class for any widget that can be shown as an inline panel.

QWidget

QObject

QPaintDevice

Methods

callout

Returns a new callout, respecting the configuration from the widget.

context

Returns the context in which the widget is shown, e.g., the associated map canvas and expression contexts.

geometryType

Returns the geometry type for the objects associated with the callouts.

setCallout

Sets the widget state to match the specified callout.

setContext

Sets the context in which the widget is shown, e.g., the associated map canvas and expression contexts.

setGeometryType

Sets the geometry type for the objects associated with the callouts.

Signals

calloutChanged

Emitted when the callout defined by the widget changes

class qgis.gui.QgsCalloutPanelWidget[source]

Bases: QgsPanelWidget

__init__(parent: QWidget | None = None, layer: QgsMapLayer | None = None)

Constructor for QgsCalloutPanelWidget, with the specified parent widget

The optional layer argument can be set to an associated map layer.

Parameters:
  • parent (Optional[QWidget] = None)

  • layer (Optional[QgsMapLayer] = None)

callout(self) QgsCallout | None[source]

Returns a new callout, respecting the configuration from the widget.

See also

setCallout()

Return type:

Optional[QgsCallout]

signal calloutChanged[source]

Emitted when the callout defined by the widget changes

context(self) QgsSymbolWidgetContext[source]

Returns the context in which the widget is shown, e.g., the associated map canvas and expression contexts.

See also

setContext()

Return type:

QgsSymbolWidgetContext

geometryType(self) Qgis.GeometryType[source]

Returns the geometry type for the objects associated with the callouts.

If the type is Qgis.GeometryType.Unknown then an attempt will be made to deduce the type from the associated map layer.

Return type:

Qgis.GeometryType

setCallout(self, callout: QgsCallout | None)[source]

Sets the widget state to match the specified callout.

Ownership is not transferred.

See also

callout()

Parameters:

callout (Optional[QgsCallout])

setContext(self, context: QgsSymbolWidgetContext)[source]

Sets the context in which the widget is shown, e.g., the associated map canvas and expression contexts.

See also

context()

Parameters:

context (QgsSymbolWidgetContext)

setGeometryType(self, type: Qgis.GeometryType)[source]

Sets the geometry type for the objects associated with the callouts.

If type is Qgis.GeometryType.Unknown then an attempt will be made to deduce the type from the associated map layer.

See also

geometryType()

Parameters:

type (Qgis.GeometryType)