source: src/clientcommandline/stationsregister.h@ 17ef75d

Last change on this file since 17ef75d was 17ef75d, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago

command line client is now able to register stations. All entered data could be reviewed by the user and edited again, before sending it

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[93ea008]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#ifndef STATIONSREGISTER_H
21#define STATIONSREGISTER_H
22
23class InputOutputHandler;
24
25#include <siwebserviceclient.h>
[17ef75d]26#include <siweatherstation.h>
[93ea008]27
28#include <QPointer>
29
30class StationsRegister : public QObject
31{
32 Q_OBJECT
33 public:
34 StationsRegister(QObject *parent = NULL);
35
36 public slots:
37 void registerStation();
38
39 private slots:
40 void webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString &message);
41 void webserviceFinished(bool result, const QUuid &stationUuid, const QString &message);
42
43 private:
[17ef75d]44 void registerStation(SiWeather::Library::SiWeatherStation station);
45 QString getValue(const QString &label, const QString &defaultValue = QString());
46 QString getCoordinate(const QString &type, double defaultValue);
47 QString coordinateToString(double coordinate) const;
[93ea008]48
49 QPointer<InputOutputHandler> _ioHandler;
[17ef75d]50 SiWeather::Library::SiWeatherStation _lastStation;
[93ea008]51};
52
53#endif //STATIONSREGISTER_H
Note: See TracBrowser for help on using the repository browser.