Class: QgsCalloutAbstractMetadata¶
Stores metadata about one callout renderer class.
Note
It’s necessary to implement createCallout()
function.
In C++ you can use QgsCalloutMetadata
convenience class.
Added in version 3.10.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: createCallout()
Class Hierarchy¶
Subclasses¶
Convenience metadata class that uses static functions to create callouts and their widgets. |
Abstract Methods
Create a callout of this type given the map of properties. |
Methods
Returns an icon representing the callout. |
|
Returns the unique name of the callout type. |
|
Sets an icon representing the callout. |
|
Returns a friendly display name of the callout type. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsCalloutAbstractMetadata. See the FAQ for more details.
Creates a widget for configuring callouts of this type. |
- class qgis.core.QgsCalloutAbstractMetadata[source]¶
Bases:
object
- __init__(name: str | None, visibleName: str | None, icon: QIcon = QIcon())
Constructor for QgsCalloutAbstractMetadata, with the specified
name
.The
visibleName
argument gives a translated, user friendly string identifying the callout type.The
icon
argument can be used to specify an icon representing the callout.- Parameters:
name (Optional[str])
visibleName (Optional[str])
icon (QIcon = QIcon())
- __init__(a0: QgsCalloutAbstractMetadata)
- Parameters:
- abstract createCallout(self, properties: Dict[str, Any], context: QgsReadWriteContext) QgsCallout | None [source]¶
Create a callout of this type given the map of
properties
.Ownership of the callout is transferred to the caller.
- Parameters:
properties (Dict[str, Any])
context (QgsReadWriteContext)
- Return type:
Optional[QgsCallout]
- virtual createCalloutWidget(self, a0: QgsMapLayer | None) QgsCalloutWidget | None [source]¶
Creates a widget for configuring callouts of this type. Can return
None
if there’s no GUI required.Ownership of the widget is transferred to the caller.
- Parameters:
a0 (Optional[QgsMapLayer])
- Return type:
Optional[QgsCalloutWidget]
- name(self) str [source]¶
Returns the unique name of the callout type. This value is not translated.
See also
- Return type:
str