QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsannotationitemeditoperation.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsannotationitemeditoperation.cpp
3  ----------------
4  copyright : (C) 2021 by Nyall Dawson
5  email : nyall dot dawson at gmail dot com
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
18 
19 //
20 // QgsAbstractAnnotationItemEditOperation
21 //
23  : mItemId( itemId )
24 {
25 
26 }
27 
29 
30 
31 //
32 // QgsAnnotationItemEditOperationMoveNode
33 //
36  , mNodeId( nodeId )
37  , mBefore( before )
38  , mAfter( after )
39 {
40 
41 }
42 
44 {
45  return Type::MoveNode;
46 }
47 
48 
49 //
50 // QgsAnnotationItemEditOperationDeleteNode
51 //
52 
55  , mNodeId( nodeId )
56  , mBefore( before )
57 {
58 
59 }
60 
62 {
63  return Type::DeleteNode;
64 }
65 
66 //
67 // QgsAnnotationItemEditOperationTranslateItem
68 //
69 
70 QgsAnnotationItemEditOperationTranslateItem::QgsAnnotationItemEditOperationTranslateItem( const QString &itemId, double translateX, double translateY )
72  , mTranslateX( translateX )
73  , mTranslateY( translateY )
74 {
75 
76 }
77 
79 {
80  return Type::TranslateItem;
81 }
82 
83 
84 //
85 // QgsAnnotationItemEditOperationAddNode
86 //
87 
90  , mPoint( point )
91 {
92 
93 }
94 
96 {
97  return Type::AddNode;
98 }
Abstract base class for annotation item edit operations.
@ TranslateItem
Translate (move) an item.
QgsAbstractAnnotationItemEditOperation(const QString &itemId)
Constructor for QgsAbstractAnnotationItemEditOperation, for the specified item id.
QgsAnnotationItemEditOperationAddNode(const QString &itemId, const QgsPoint &point)
Constructor for QgsAnnotationItemEditOperationAddNode at the specified point.
Type type() const override
Returns the operation type.
QgsAnnotationItemEditOperationDeleteNode(const QString &itemId, QgsVertexId nodeId, const QgsPoint &before)
Constructor for QgsAnnotationItemEditOperationDeleteNode, where the node with the specified id and pr...
Type type() const override
Returns the operation type.
Type type() const override
Returns the operation type.
QgsAnnotationItemEditOperationMoveNode(const QString &itemId, QgsVertexId nodeId, const QgsPoint &before, const QgsPoint &after)
Constructor for QgsAnnotationItemEditOperationMoveNode, where the node with the specified id moves fr...
QgsAnnotationItemEditOperationTranslateItem(const QString &itemId, double translateX, double translateY)
Constructor for QgsAnnotationItemEditOperationTranslateItem, where the node with the specified id and...
Type type() const override
Returns the operation type.
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:49
Utility class for identifying a unique vertex within a geometry.
Definition: qgsvertexid.h:31