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 forQgsAnnotationMarkerItem
, at the specifiedpoint
.Methods
- param operation
- rtype
QgsRectangle
- rtype
QgsAnnotationMarkerItem
Copies common properties from the base class from an
other
item.Creates a new marker annotation item.
- rtype
Qgis.AnnotationItemFlags
Returns the point geometry of the marker.
- rtype
List[QgsAnnotationItemNode]
Reads common properties from the base class from the given DOM
element
.- param element
- param context
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.
- param operation
- rtype
str
Writes common properties from the base class into an XML
element
.- param element
- applyEdit(self, operation: QgsAbstractAnnotationItemEditOperation) Qgis.AnnotationItemEditOperationResult ¶
- Parameters
operation (QgsAbstractAnnotationItemEditOperation) –
- Return type
- boundingBox(self) QgsRectangle ¶
- boundingBox(self, context: QgsRenderContext) QgsRectangle
- Return type
- clone(self) QgsAnnotationMarkerItem ¶
- Return type
- 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
- flags(self) Qgis.AnnotationItemFlags ¶
- Return type
- 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
- Return type
- 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
New in version 3.22.
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
context (QgsReadWriteContext) –
- Return type
bool
- render(self, context: QgsRenderContext, feedback: QgsFeedback)¶
- Parameters
context (QgsRenderContext) –
feedback (QgsFeedback) –
- 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
- 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
- Parameters
symbol (QgsMarkerSymbol) –
- symbol(self) QgsMarkerSymbol ¶
Returns the symbol used to render the marker item.
See also
- Return type
- transientEditResults(self, operation: QgsAbstractAnnotationItemEditOperation) QgsAnnotationItemEditOperationTransientResults ¶
- Parameters
operation (QgsAbstractAnnotationItemEditOperation) –
- Return type
- 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
New in version 3.22.
- writeXml(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) bool ¶
- Parameters
element (QDomElement) –
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type
bool