Class: QgsAnnotationLineItem¶
An annotation item which renders a line symbol along a line geometry.
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 geometry of the item. |
|
Sets the geometry of the item. |
|
Sets the symbol used to render the marker item. |
|
Returns the symbol used to render the item. |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsAnnotationLineItem. See the FAQ for more details.
Static Methods
Creates a new linestring annotation item. |
- class qgis.core.QgsAnnotationLineItem[source]¶
Bases:
QgsAnnotationItem- __init__(curve: QgsCurve | None)¶
Constructor for QgsAnnotationLineItem, with the specified
curve.- Parameters:
curve (QgsCurve|None)
- abstract clone(self) QgsAnnotationLineItem | None[source]¶
- Return type:
- static create() QgsAnnotationLineItem | None¶
Creates a new linestring annotation item.
- Return type:
- geometry(self) QgsCurve | None[source]¶
Returns the geometry of the item.
The coordinate reference system for the line will be the parent layer’s
QgsAnnotationLayer.crs().See also
- Return type:
QgsCurve|None
- setGeometry(self, geometry: QgsCurve | None)[source]¶
Sets the
geometryof the item. Ownership ofgeometryis transferred.The coordinate reference system for the line will be the parent layer’s
QgsAnnotationLayer.crs().See also
- Parameters:
geometry (QgsCurve|None)
- setSymbol(self, symbol: QgsLineSymbol | None)[source]¶
Sets the
symbolused to render the marker item.The item takes ownership of the symbol.
See also
- Parameters:
symbol (QgsLineSymbol|None)
- symbol(self) QgsLineSymbol | None[source]¶
Returns the symbol used to render the item.
See also
- Return type:
QgsLineSymbol|None
- virtual transientEditResultsV2(self, operation: QgsAbstractAnnotationItemEditOperation | None, context: QgsAnnotationItemEditContext) QgsAnnotationItemEditOperationTransientResults | None[source]¶
- Parameters:
operation (QgsAbstractAnnotationItemEditOperation|None)
context (QgsAnnotationItemEditContext)
- Return type: