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

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]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

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)