Class: QgsAnnotationItemEditOperationTranslateItem¶
Annotation item edit operation consisting of translating (moving) an item.
Added in version 3.22.
Class Hierarchy¶
Base classes¶
Abstract base class for annotation item edit operations. |
Methods
Returns the deleted node ID. |
|
Returns the x-axis translation, in layer units. |
|
Returns the x-axis translation, in pixels. |
|
Returns the y-axis translation, in layer units. |
|
Returns the y-axis translation, in pixels. |
- class qgis.core.QgsAnnotationItemEditOperationTranslateItem[source]¶
Bases:
QgsAbstractAnnotationItemEditOperation
- __init__(itemId: str | None, translateX: float, translateY: float, translatePixelsX: float = 0, translatePixelsY: float = 0)
Constructor for QgsAnnotationItemEditOperationTranslateItem, where the node with the specified
id
and translation (in map units)Since QGIS 3.40 the
translatePixelsX
andtranslatePixelsY
arguments specify the translation in pixels.- Parameters:
itemId (Optional[str])
translateX (float)
translateY (float)
translatePixelsX (float = 0)
translatePixelsY (float = 0)
- __init__(a0: QgsAnnotationItemEditOperationTranslateItem)
- Parameters:
- nodeId(self) QgsVertexId [source]¶
Returns the deleted node ID.
- Return type:
- translationX(self) float [source]¶
Returns the x-axis translation, in layer units.
since
translationY()
- Return type:
float
- translationXPixels(self) float [source]¶
Returns the x-axis translation, in pixels.
since
translationYPixels()
Added in version 3.40.
- Return type:
float
- translationY(self) float [source]¶
Returns the y-axis translation, in layer units.
since
translationX()
- Return type:
float
- translationYPixels(self) float [source]¶
Returns the y-axis translation, in pixels.
since
translationXPixels()
Added in version 3.40.
- Return type:
float