Class: QgsAnnotationMarkerItem¶
An annotation item which renders a marker symbol at a point location.
Added in version 3.16.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Abstract base class for annotation items which are drawn with |
Constructor
Abstract Methods
Methods
Returns the point geometry of the marker. |
|
Sets the point geometry location of the marker. |
|
Sets the symbol used to render the marker item. |
|
Returns the symbol used to render the marker item. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsAnnotationMarkerItem. See the FAQ for more details.
Static Methods
Creates a new marker annotation item. |
- class qgis.core.QgsAnnotationMarkerItem[source]¶
Bases:
QgsAnnotationItem- __init__(point: QgsPoint)¶
Constructor for QgsAnnotationMarkerItem, at the specified
point.- Parameters:
point (QgsPoint)
- abstract clone(self) QgsAnnotationMarkerItem | None[source]¶
- Return type:
- static create() QgsAnnotationMarkerItem | None¶
Creates a new marker annotation item.
- Return type:
- geometry(self) QgsPointXY[source]¶
Returns the point geometry of the marker.
The coordinate reference system for the point will be the parent layer’s
QgsAnnotationLayer.crs().See also
- Return type:
- setGeometry(self, geometry: QgsPoint)[source]¶
Sets the point
geometrylocation of the marker.The coordinate reference system for the point will be the parent layer’s
QgsAnnotationLayer.crs().See also
- Parameters:
geometry (QgsPoint)
- setSymbol(self, symbol: QgsMarkerSymbol | None)[source]¶
Sets the
symbolused to render the marker item.The item takes ownership of the symbol.
See also
- Parameters:
symbol (QgsMarkerSymbol|None)
- symbol(self) QgsMarkerSymbol | None[source]¶
Returns the symbol used to render the marker item.
See also
- Return type:
QgsMarkerSymbol|None
- virtual transientEditResultsV2(self, operation: QgsAbstractAnnotationItemEditOperation | None, context: QgsAnnotationItemEditContext) QgsAnnotationItemEditOperationTransientResults | None[source]¶
- Parameters:
operation (QgsAbstractAnnotationItemEditOperation|None)
context (QgsAnnotationItemEditContext)
- Return type: