QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
i
l
m
n
o
p
s
t
+
Functions
a
b
c
d
f
g
i
l
m
n
o
p
t
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
2
_
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
_
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
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
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
h
i
l
m
n
o
p
r
s
t
u
v
+
Related Functions
a
c
d
e
f
g
l
n
o
p
q
r
s
t
v
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
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
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
Enumerator
+
Macros
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
qgsdartmeasurement.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdartmeasurement.cpp
3
--------------------------------------
4
Date : 8.11.2014
5
Copyright : (C) 2014 Matthias Kuhn
6
Email : matthias at opengis dot ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgsdartmeasurement.h
"
17
18
#include <QTextStream>
19
20
QgsDartMeasurement::QgsDartMeasurement
(
const
QString
& name,
Type
type,
const
QString
& value )
21
: mName( name )
22
, mType( type )
23
, mValue( value )
24
{
25
}
26
27
const
QString
QgsDartMeasurement::toString
()
const
28
{
29
QString
elementName =
"DartMeasurement"
;
30
if
( mType ==
ImagePng
)
31
{
32
elementName =
"DartMeasurementFile"
;
33
}
34
35
QString
dashMessage =
QString
(
"<%1 name=\"%2\" type=\"%3\">%4</%1>"
)
36
.
arg
( elementName,
37
mName,
38
typeToString
( mType ),
39
mValue );
40
return
dashMessage;
41
}
42
43
void
QgsDartMeasurement::send
()
const
44
{
45
QTextStream
out( stdout );
46
out <<
toString
() << endl;
47
}
48
49
const
QString
QgsDartMeasurement::typeToString
(
QgsDartMeasurement::Type
type )
50
{
51
QString
str;
52
53
switch
( type )
54
{
55
case
Text
:
56
str =
"text/text"
;
57
break
;
58
59
case
ImagePng
:
60
str =
"image/png"
;
61
break
;
62
63
case
Integer
:
64
str =
"numeric/integer"
;
65
break
;
66
}
67
68
return
str;
69
}
QTextStream
QgsDartMeasurement::toString
const QString toString() const
Definition:
qgsdartmeasurement.cpp:27
QgsDartMeasurement::send
void send() const
Definition:
qgsdartmeasurement.cpp:43
QgsDartMeasurement::ImagePng
Definition:
qgsdartmeasurement.h:30
QString
qgsdartmeasurement.h
QgsDartMeasurement::Integer
Definition:
qgsdartmeasurement.h:31
QgsDartMeasurement::typeToString
static const QString typeToString(Type type)
Definition:
qgsdartmeasurement.cpp:49
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QgsDartMeasurement::Text
Definition:
qgsdartmeasurement.h:29
QgsDartMeasurement::QgsDartMeasurement
QgsDartMeasurement()
Definition:
qgsdartmeasurement.h:34
QgsDartMeasurement::Type
Type
Definition:
qgsdartmeasurement.h:27
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13