Class: QgsCalloutRegistry

class qgis.core.QgsCalloutRegistry

Bases: sip.wrapper

Registry of available callout classes.

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

New in version 3.10:

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.

defaultCallout

Create a new instance of a callout with default settings.

addCalloutType(self, metadata: QgsCalloutAbstractMetadata) bool

Registers a new callout type.

Ownership of metadata is transferred to the registry.

Parameters

metadata (QgsCalloutAbstractMetadata) –

Return type

bool

calloutMetadata(self, type: str) QgsCalloutAbstractMetadata

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

Parameters

type (str) –

Return type

QgsCalloutAbstractMetadata

calloutTypes(self) List[str]

Returns a list of all available callout types.

Return type

List[str]

createCallout(self, type: str, properties: Dict[str, Any] = {}, context: QgsReadWriteContext = QgsReadWriteContext()) QgsCallout

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

The caller takes ownership of the callout.

createCallout(self, type: str, element: QDomElement, context: QgsReadWriteContext) -> 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
  • type (str) –

  • properties (Dict[str) –

  • context (QgsReadWriteContext = QgsReadWriteContext()) –

Return type

QgsCallout

defaultCallout() QgsCallout

Create a new instance of a callout with default settings.

The caller takes ownership of the callout.

Return type

QgsCallout