93e501860811a2caa8aeae39bf46be3552984760
[quandoparte] / application / app.h
1 #ifndef APPLICATION_H
2 #define APPLICATION_H
3
4 /*
5
6 Copyright (C) 2011 Luciano Montanaro <mikelima@cirulla.net>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING.  If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22
23 */
24
25 #include <QApplication>
26 #include <QStringList>
27
28 class QNetworkAccessManager;
29 class QNetworkReply;
30 class QTimer;
31
32 class StationView;
33 class StationListView;
34 class StationListModel;
35
36 class App : public QObject
37 {
38     Q_OBJECT
39 public:
40     explicit App(QObject *parent = 0);
41     ~App();
42
43     static QString dataDir(void);
44
45 signals:
46
47 public slots:
48     void queryStation(const QString &station);
49     void updateStation();
50     void downloadFinished(void);
51     void showAboutDialog(void);
52     void showSettingsDialog(void);
53     void showStationSelectView(void);
54 public:
55     void saveSettings(void);
56     void readSettings(void);
57 private:
58     QNetworkAccessManager *accessManager;
59     QNetworkReply *stationQueryReply;
60     QTimer *checkingTimer;
61     StationView *stationView;
62     StationListModel *stationListModel;
63     StationListView *stationListView;
64 };
65
66 #endif // APPLICATION_H