QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 }
QgsAnnotationItemEditOperationDeleteNode::type
Type type() const override
Returns the operation type.
Definition: qgsannotationitemeditoperation.cpp:61
QgsAbstractAnnotationItemEditOperation::Type::DeleteNode
@ DeleteNode
Delete a node.
QgsAnnotationItemEditOperationDeleteNode::QgsAnnotationItemEditOperationDeleteNode
QgsAnnotationItemEditOperationDeleteNode(const QString &itemId, QgsVertexId nodeId, const QgsPoint &before)
Constructor for QgsAnnotationItemEditOperationDeleteNode, where the node with the specified id and pr...
Definition: qgsannotationitemeditoperation.cpp:53
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:48
QgsAbstractAnnotationItemEditOperation::Type
Type
Operation type.
Definition: qgsannotationitemeditoperation.h:51
QgsAnnotationItemEditOperationMoveNode::QgsAnnotationItemEditOperationMoveNode
QgsAnnotationItemEditOperationMoveNode(const QString &itemId, QgsVertexId nodeId, const QgsPoint &before, const QgsPoint &after)
Constructor for QgsAnnotationItemEditOperationMoveNode, where the node with the specified id moves fr...
Definition: qgsannotationitemeditoperation.cpp:34
QgsAnnotationItemEditOperationTranslateItem::QgsAnnotationItemEditOperationTranslateItem
QgsAnnotationItemEditOperationTranslateItem(const QString &itemId, double translateX, double translateY)
Constructor for QgsAnnotationItemEditOperationTranslateItem, where the node with the specified id and...
Definition: qgsannotationitemeditoperation.cpp:70
QgsAbstractAnnotationItemEditOperation::QgsAbstractAnnotationItemEditOperation
QgsAbstractAnnotationItemEditOperation(const QString &itemId)
Constructor for QgsAbstractAnnotationItemEditOperation, for the specified item id.
Definition: qgsannotationitemeditoperation.cpp:22
QgsAbstractAnnotationItemEditOperation::Type::TranslateItem
@ TranslateItem
Translate (move) an item.
QgsAnnotationItemEditOperationAddNode::QgsAnnotationItemEditOperationAddNode
QgsAnnotationItemEditOperationAddNode(const QString &itemId, const QgsPoint &point)
Constructor for QgsAnnotationItemEditOperationAddNode at the specified point.
Definition: qgsannotationitemeditoperation.cpp:88
QgsAnnotationItemEditOperationTranslateItem::type
Type type() const override
Returns the operation type.
Definition: qgsannotationitemeditoperation.cpp:78
QgsAbstractAnnotationItemEditOperation
Abstract base class for annotation item edit operations.
Definition: qgsannotationitemeditoperation.h:32
QgsAnnotationItemEditOperationMoveNode::type
Type type() const override
Returns the operation type.
Definition: qgsannotationitemeditoperation.cpp:43
QgsAbstractAnnotationItemEditOperation::Type::AddNode
@ AddNode
Add a node.
QgsAbstractAnnotationItemEditOperation::Type::MoveNode
@ MoveNode
Move a node.
QgsVertexId
Utility class for identifying a unique vertex within a geometry.
Definition: qgsvertexid.h:30
QgsAbstractAnnotationItemEditOperation::~QgsAbstractAnnotationItemEditOperation
virtual ~QgsAbstractAnnotationItemEditOperation()
QgsAnnotationItemEditOperationAddNode::type
Type type() const override
Returns the operation type.
Definition: qgsannotationitemeditoperation.cpp:95
qgsannotationitemeditoperation.h