Class: QgsCalloutAbstractMetadata¶
- class qgis.core.QgsCalloutAbstractMetadata¶
Bases:
sip.wrapper
Stores metadata about one callout renderer class.
Note
It’s necessary to implement
createCallout()
function. In C++ you can useQgsCalloutMetadata
convenience class.Added in version 3.10.
QgsCalloutAbstractMetadata(name: Optional[str], visibleName: Optional[str], icon: QIcon = QIcon()) Constructor for
QgsCalloutAbstractMetadata
, with the specifiedname
.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.QgsCalloutAbstractMetadata(a0:
QgsCalloutAbstractMetadata
)Methods
Create a callout of this type given the map of
properties
.Creates a widget for configuring callouts of this type.
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.
- createCallout(self, properties: Dict[str, Any], context: QgsReadWriteContext) QgsCallout | None ¶
Create a callout of this type given the map of
properties
.Ownership of the callout is transferred to the caller.
- Parameters:
properties (Dict[str)
context (QgsReadWriteContext)
- Return type:
Optional[QgsCallout]
- createCalloutWidget(self, a0: QgsVectorLayer | None) QgsCalloutWidget | None ¶
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[QgsVectorLayer])
- Return type:
Optional[QgsCalloutWidget]
- name(self) str ¶
Returns the unique name of the callout type. This value is not translated.
See also
- Return type:
str
- setIcon(self, icon: QIcon)¶
Sets an
icon
representing the callout.See also
- Parameters:
icon (QIcon)