65f08899af401e9e219ce1a4d64c4cf0139406fc
[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
31 class StationView;
32 class StationListView;
33 class StationListModel;
34
35 class App : public QObject
36 {
37     Q_OBJECT
38 public:
39     explicit App(QObject *parent = 0);
40     ~App();
41
42     static QString dataDir(void);
43
44 signals:
45
46 public slots:
47     void queryStation(const QString &station);
48     void downloadFinished(void);
49     void showAboutDialog(void);
50     void showSettingsDialog(void);
51     void showStationSelectView(void);
52 public:
53     void saveSettings(void);
54     void readSettings(void);
55 private:
56     QNetworkAccessManager *accessManager;
57     QNetworkReply *stationQueryReply;
58     StationView *stationView;
59     StationListModel *stationListModel;
60     StationListView *stationListView;
61     QString queryBaseUrl;
62     QString stationName;
63     QStringList recentStations;
64     int checkingInterval;
65     bool stationViewPreferred;
66 };
67
68 #endif // APPLICATION_H