Class: QgsCalloutRegistry¶
-
class
qgis.core.
QgsCalloutRegistry
¶ Bases:
sip.wrapper
Registry of available callout classes.
QgsCalloutRegistry
is not usually directly created, but rather accessed throughQgsApplication.calloutRegistry()
Methods
Registers a new callout type.
Returns the metadata for specified the specified callout
type
.Returns a list of all available callout types.
Creates a new instance of a callout, given the callout
type
andproperties
.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
. ReturnsNone
if no matching callout style was found.- Parameters
type (str) –
- Return type
-
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
andproperties
.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 specifiedtype
, using the properties from a DOMelement
.The caller takes ownership of the callout.
- Parameters
type (str) –
properties (Dict[str) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- Return type
-
defaultCallout
() → QgsCallout¶ Create a new instance of a callout with default settings.
The caller takes ownership of the callout.
- Return type
-