source: src/clientcommandline/main.cpp@ fb602c6

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

Started to implement c++ command line client running on the weather station

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[fb602c6]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 "testexecuter.h"
21// #include <settings.h>
22
23#include "siweatherclientconfig.h"
24
25#include <ecmdlineargs.h>
26#include <ecmdlineoption.h>
27#include <elibrary.h>
28
29#include <QCoreApplication>
30#include <QTimer>
31
32int main ( int argc, char** argv )
33{
34 ECmdLineArgs *args = new ECmdLineArgs();
35 EngSaS::CmdLineOptions cmdLineOptions;
36 cmdLineOptions << new ECmdLineOption("[register]", "r", QObject::tr("Register new station"));
37
38 foreach(ECmdLineOption *option, cmdLineOptions)
39 args->add(option);
40
41 // if --help or --version is used, init returns false
42 // and outputs the help
43 if(!args->init(argc, argv))
44 return 1;
45
46
47 QCoreApplication app(argc, argv);
48 QString error;
49 ELibrary::setupApplication(QString("SiWeatherStation"), QString(VERSION), error);
50
51 if(args->isSet("register")){
52// StationsRegister *stationsRegister = new StationsRegister();
53 }
54// else if(){
55//
56// }
57
58// TestExecuter test;
59 // allow to start the event loop before executing our code
60// QTimer::singleShot(1, &test, SLOT(load()));
61 return app.exec();
62}
Note: See TracBrowser for help on using the repository browser.