QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
3
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
c
l
s
t
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
annotations
qgsannotationitemnode.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsannotationitemnode.h
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
17
#ifndef QGSANNOTATIONITEMEDITNODE_H
18
#define QGSANNOTATIONITEMEDITNODE_H
19
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include "
qgspointxy.h
"
23
#include "
qgsvertexid.h
"
24
#include "
qgis.h
"
25
31
class
CORE_EXPORT
QgsAnnotationItemNode
32
{
33
public
:
34
38
QgsAnnotationItemNode
() =
default
;
39
43
QgsAnnotationItemNode
(
const
QgsVertexId
&
id
,
const
QgsPointXY
&point,
Qgis::AnnotationItemNodeType
type )
44
: mId(
id
)
45
, mPoint( point )
46
, mType( type )
47
{}
48
49
#ifdef SIP_RUN
50
SIP_PYOBJECT __repr__();
51
% MethodCode
52
QString
str
= QStringLiteral(
"<QgsAnnotationItemNode: %1 - %2 (%3, %4)>"
).arg( sipCpp->id().vertex )
53
.arg(
qgsEnumValueToKey
( sipCpp->type() ) )
54
.arg( sipCpp->point().x() )
55
.arg( sipCpp->point().y() );
56
sipRes = PyUnicode_FromString(
str
.toUtf8().constData() );
57
% End
58
#endif
59
63
QgsVertexId
id()
const
{
return
mId; }
64
72
QgsPointXY
point()
const
{
return
mPoint; }
73
81
void
setPoint(
QgsPointXY
point ) { mPoint = point; }
82
88
Qgis::AnnotationItemNodeType
type()
const
{
return
mType; }
89
95
void
setType(
Qgis::AnnotationItemNodeType
type ) { mType = type; }
96
97
// TODO c++20 - replace with = default
98
bool
operator==
(
const
QgsAnnotationItemNode
&other )
const
99
{
100
return
mId == other.mId && mType == other.mType && mPoint == other.mPoint;
101
}
102
103
bool
operator!=
(
const
QgsAnnotationItemNode
&other )
const
104
{
105
return
!( *
this
== other );
106
}
107
108
private
:
109
110
QgsVertexId
mId;
111
QgsPointXY
mPoint;
112
Qgis::AnnotationItemNodeType
mType =
Qgis::AnnotationItemNodeType::VertexHandle
;
113
114
};
115
116
#endif // QGSANNOTATIONITEMEDITNODE_H
qgsvertexid.h
qgsEnumValueToKey
QString qgsEnumValueToKey(const T &value, bool *returnOk=nullptr)
Returns the value for the given key of an enum.
Definition:
qgis.h:2440
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition:
qgsfeatureiterator.h:425
qgis.h
Qgis::AnnotationItemNodeType
AnnotationItemNodeType
Annotation item GUI flags.
Definition:
qgis.h:1142
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition:
qgsfeatureiterator.h:430
qgis_sip.h
QgsPointXY
A class to represent a 2D point.
Definition:
qgspointxy.h:58
Qgis::AnnotationItemNodeType::VertexHandle
@ VertexHandle
Node is a handle for manipulating vertices.
QgsAnnotationItemNode
Contains information about a node used for editing an annotation item.
Definition:
qgsannotationitemnode.h:31
str
#define str(x)
Definition:
qgis.cpp:37
QgsVertexId
Utility class for identifying a unique vertex within a geometry.
Definition:
qgsvertexid.h:30
qgspointxy.h
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17