source: src/lib/siweatherstation.cpp@ e498070

Last change on this file since e498070 was d83a844, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago
  • Added type and typeUrl to the stations data, to allow the user to get an idea of the used weather station
    • Started to implement c++ client, which runs on the weather station
  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[d83a844]1/*
2 Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 MA 02110-1301 USA.
18*/
19
20#include "siweatherstation.h"
21
22using namespace SiWeather::Library;
23
24SiWeatherStation::SiWeatherStation()
25{
26 init();
27}
28
29SiWeatherStation::SiWeatherStation(const QString &uuid, const QString &name)
30{
31 init();
32 setUuid(uuid);
33 setName(name);
34}
35
36void SiWeatherStation::setUuid(const QString &uuid)
37{
38 _uuid = QUuid(uuid);
39}
40
41QUuid SiWeatherStation::uuid() const
42{
43 return _uuid;
44}
45
46void SiWeatherStation::setName(const QString &name)
47{
48 _name = name;
49}
50
51QString SiWeatherStation::name() const
52{
53 return _name;
54}
55
56void SiWeatherStation::setCity(const QString &city)
57{
58 _city = city;
59}
60
61QString SiWeatherStation::city() const
62{
63 return _city;
64}
65
66void SiWeatherStation::setLongitude(double longitude)
67{
68 _longitude = longitude;
69}
70
71double SiWeatherStation::longitude() const
72{
73 return _longitude;
74}
75
76void SiWeatherStation::setLatitude(double latitude)
77{
78 _latitude = latitude;
79}
80
81double SiWeatherStation::latitude() const
82{
83 return _latitude;
84}
85
86void SiWeatherStation::setType(const QString &type)
87{
88 _type = type;
89}
90
91QString SiWeatherStation::type() const
92{
93 return _type;
94}
95
96void SiWeatherStation::setTypeUrl(const QString &typeUrl)
97{
98 _typeUrl = QUrl(typeUrl);
99}
100
101QUrl SiWeatherStation::typeUrl() const
102{
103 return _typeUrl;
104}
105
106void SiWeatherStation::setEMail(const QString &address)
107{
108 _eMail = address;
109}
110
111QString SiWeatherStation::eMail() const
112{
113 return _eMail;
114}
115
116void SiWeatherStation::init()
117{
118 _longitude = 0;
119 _latitude = 0;
120}
Note: See TracBrowser for help on using the repository browser.