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