Class: QgsCalloutRegistry

Registry of available callout classes.

QgsCalloutRegistry is not usually directly created, but rather accessed through QgsApplication.calloutRegistry().

Added in version 3.10.

List of all members, including inherited members

Methods

addCalloutType

Registers a new callout type.

calloutMetadata

Returns the metadata for specified the specified callout type.

calloutTypes

Returns a list of all available callout types.

createCallout

Creates a new instance of a callout, given the callout type and properties.

Static Methods

defaultCallout

Create a new instance of a callout with default settings.

class qgis.core.QgsCalloutRegistry[source]

Bases: object

addCalloutType(self, metadata: QgsCalloutAbstractMetadata | None) bool[source]

Registers a new callout type.

Ownership of metadata is transferred to the registry.

Parameters:

metadata (Optional[QgsCalloutAbstractMetadata])

Return type:

bool

calloutMetadata(self, type: str | None) QgsCalloutAbstractMetadata | None[source]

Returns the metadata for specified the specified callout type. Returns None if no matching callout style was found.

Parameters:

type (Optional[str])

Return type:

Optional[QgsCalloutAbstractMetadata]

calloutTypes(self) list[str][source]

Returns a list of all available callout types.

Return type:

list[str]

createCallout(self, type: str | None, properties: dict[str | None, Any] = {}, context: QgsReadWriteContext = QgsReadWriteContext()) QgsCallout | None[source]

Creates a new instance of a callout, given the callout type and properties.

The caller takes ownership of the callout.

createCallout(self, type: Optional[str], element: QDomElement, context: QgsReadWriteContext) -> Optional[QgsCallout] Creates a new instance of a callout of the specified type, using the properties from a DOM element.

The caller takes ownership of the callout.

Parameters:
Return type:

Optional[QgsCallout]

static defaultCallout() QgsCallout | None[source]

Create a new instance of a callout with default settings.

The caller takes ownership of the callout.

Return type:

Optional[QgsCallout]