QGIS API Documentation
2.14.0-Essen
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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 <QDebug>
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
qDebug() <<
toString
() +
'\n'
;
46
}
47
48
const
QString
QgsDartMeasurement::typeToString
(
QgsDartMeasurement::Type
type )
49
{
50
QString
str;
51
52
switch
( type )
53
{
54
case
Text
:
55
str =
"text/text"
;
56
break
;
57
58
case
ImagePng
:
59
str =
"image/png"
;
60
break
;
61
62
case
Integer
:
63
str =
"numeric/integer"
;
64
break
;
65
}
66
67
return
str;
68
}
QgsDartMeasurement::send
void send() const
Definition:
qgsdartmeasurement.cpp:43
QgsDartMeasurement::ImagePng
Definition:
qgsdartmeasurement.h:27
QgsDartMeasurement::toString
const QString toString() const
Definition:
qgsdartmeasurement.cpp:27
QString
qgsdartmeasurement.h
QgsDartMeasurement::Integer
Definition:
qgsdartmeasurement.h:28
QgsDartMeasurement::typeToString
static const QString typeToString(Type type)
Definition:
qgsdartmeasurement.cpp:48
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QgsDartMeasurement::Text
Definition:
qgsdartmeasurement.h:26
QgsDartMeasurement::QgsDartMeasurement
QgsDartMeasurement()
Definition:
qgsdartmeasurement.h:31
QgsDartMeasurement::Type
Type
Definition:
qgsdartmeasurement.h:24
Generated on Sat Feb 27 2016 18:33:25 for QGIS API Documentation by
1.8.11