Bump version to 0.9.0
[quandoparte] / application / stationview.h
1 #ifndef STATIONVIEW_H
2 #define STATIONVIEW_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 <QMainWindow>
26 #include <QUrl>
27
28 class QAction;
29 class QActionGroup;
30 class QWebView;
31
32 class StationView : public QMainWindow
33 {
34     Q_OBJECT
35 public:
36     explicit StationView(QWidget *parent = 0);
37
38     void setStation(const QString &station);
39     void setBaseUrl(const QUrl &theBaseUrl);
40
41 signals:
42     void aboutTriggered(void);
43     void settingsChangeRequested(void);
44     void stationListSelectTriggered(void);
45
46 public slots:
47     void updateView(const QByteArray &page);
48
49 private slots:
50     void changeView(void);
51     void viewSelectionGroupTriggered(QAction *);
52
53 private:
54     void updateCss(void);
55
56 private:
57     QString theStation;
58     QUrl theBaseUrl;
59     QAction *showArrivalsAction;
60     QAction *showDeparturesAction;
61     QAction *showSettingsAction;
62     QAction *showStationListSelectAction;
63     QAction *showAboutAction;
64     QActionGroup *viewSelectionGroup;
65     QMenuBar *menuBar;
66     QMenu *menu;
67     QWebView *view;
68 };
69
70 #endif // STATIONVIEW_H