Class: QgsAnnotationMarkerItem

class qgis.core.QgsAnnotationMarkerItem

Bases: QgsAnnotationItem

An annotation item which renders a marker symbol at a point location.

New in version 3.16.

QgsAnnotationMarkerItem(point: QgsPoint) Constructor for QgsAnnotationMarkerItem, at the specified point.

Methods

applyEdit

param operation

boundingBox

rtype

QgsRectangle

clone

rtype

QgsAnnotationMarkerItem

copyCommonProperties

Copies common properties from the base class from an other item.

create

Creates a new marker annotation item.

flags

rtype

Qgis.AnnotationItemFlags

geometry

Returns the point geometry of the marker.

nodes

rtype

List[QgsAnnotationItemNode]

readCommonProperties

Reads common properties from the base class from the given DOM element.

readXml

param element

render

param context

setGeometry

Sets the point geometry location of the marker.

setSymbol

Sets the symbol used to render the marker item.

symbol

Returns the symbol used to render the marker item.

transientEditResults

param operation

type

rtype

str

writeCommonProperties

Writes common properties from the base class into an XML element.

writeXml

param element

applyEdit(self, operation: QgsAbstractAnnotationItemEditOperation) Qgis.AnnotationItemEditOperationResult
Parameters

operation (QgsAbstractAnnotationItemEditOperation) –

Return type

Qgis.AnnotationItemEditOperationResult

boundingBox(self) QgsRectangle
boundingBox(self, context: QgsRenderContext) QgsRectangle
Return type

QgsRectangle

clone(self) QgsAnnotationMarkerItem
Return type

QgsAnnotationMarkerItem

copyCommonProperties(self, other: QgsAnnotationItem)

Copies common properties from the base class from an other item.

New in version 3.22.

create() QgsAnnotationMarkerItem

Creates a new marker annotation item.

Return type

QgsAnnotationMarkerItem

flags(self) Qgis.AnnotationItemFlags
Return type

Qgis.AnnotationItemFlags

geometry(self) QgsPointXY

Returns the point geometry of the marker.

The coordinate reference system for the point will be the parent layer’s QgsAnnotationLayer.crs().

See also

setGeometry()

Return type

QgsPointXY

nodes(self) List[QgsAnnotationItemNode]
Return type

List[QgsAnnotationItemNode]

readCommonProperties(self, element: QDomElement, context: QgsReadWriteContext) bool

Reads common properties from the base class from the given DOM element.

See also

readXml()

New in version 3.22.

readXml(self, element: QDomElement, context: QgsReadWriteContext) bool
Parameters
Return type

bool

render(self, context: QgsRenderContext, feedback: QgsFeedback)
Parameters
setGeometry(self, geometry: QgsPoint)

Sets the point geometry location of the marker.

The coordinate reference system for the point will be the parent layer’s QgsAnnotationLayer.crs().

See also

geometry()

Parameters

geometry (QgsPoint) –

setSymbol(self, symbol: QgsMarkerSymbol)

Sets the symbol used to render the marker item.

The item takes ownership of the symbol.

See also

symbol()

Parameters

symbol (QgsMarkerSymbol) –

symbol(self) QgsMarkerSymbol

Returns the symbol used to render the marker item.

See also

setSymbol()

Return type

QgsMarkerSymbol

transientEditResults(self, operation: QgsAbstractAnnotationItemEditOperation) QgsAnnotationItemEditOperationTransientResults
Parameters

operation (QgsAbstractAnnotationItemEditOperation) –

Return type

QgsAnnotationItemEditOperationTransientResults

type(self) str
Return type

str

writeCommonProperties(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool

Writes common properties from the base class into an XML element.

See also

writeXml()

New in version 3.22.

writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool
Parameters
Return type

bool