Class: QgsAnnotationItemEditOperationMoveNode

Annotation item edit operation consisting of moving a node.

Added in version 3.22.

Class Hierarchy

Inheritance diagram of qgis.core.QgsAnnotationItemEditOperationMoveNode

Base classes

QgsAbstractAnnotationItemEditOperation

Abstract base class for annotation item edit operations.

Methods

after

Returns the node position after the move occurred (in layer coordinates).

before

Returns the node position before the move occurred (in layer coordinates).

nodeId

Returns the associated node ID.

translationXPixels

Returns the x-axis translation, in pixels.

translationYPixels

Returns the y-axis translation, in pixels.

class qgis.core.QgsAnnotationItemEditOperationMoveNode[source]

Bases: QgsAbstractAnnotationItemEditOperation

__init__(itemId: str | None, nodeId: QgsVertexId, before: QgsPoint, after: QgsPoint, translatePixelsX: float = 0, translatePixelsY: float = 0)

Constructor for QgsAnnotationItemEditOperationMoveNode, where the node with the specified id moves from before to after (in layer coordinates).

Since QGIS 3.40 the translatePixelsX and translatePixelsY arguments specify the translation in pixels.

Parameters:
  • itemId (Optional[str])

  • nodeId (QgsVertexId)

  • before (QgsPoint)

  • after (QgsPoint)

  • translatePixelsX (float = 0)

  • translatePixelsY (float = 0)

__init__(a0: QgsAnnotationItemEditOperationMoveNode)
Parameters:

a0 (QgsAnnotationItemEditOperationMoveNode)

after(self) QgsPoint[source]

Returns the node position after the move occurred (in layer coordinates).

See also

before()

Return type:

QgsPoint

before(self) QgsPoint[source]

Returns the node position before the move occurred (in layer coordinates).

See also

after()

Return type:

QgsPoint

nodeId(self) QgsVertexId[source]

Returns the associated node ID.

Return type:

QgsVertexId

translationXPixels(self) float[source]

Returns the x-axis translation, in pixels.

since translationYPixels()

Added in version 3.40.

Return type:

float

translationYPixels(self) float[source]

Returns the y-axis translation, in pixels.

since translationXPixels()

Added in version 3.40.

Return type:

float