Work in progress on QML
[quandoparte] / application / view.h
1 #ifndef QP_VIEW_H
2 #define QP_VIEW_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 <QtGlobal>
26 #include <QFuture>
27 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
28 #include <QtQuick/QQuickView>
29 #else
30 #include <QDeclarativeView>
31 #endif
32
33 class StationListModel;
34 class StationListProxyModel;
35
36 class View :
37 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
38         public QQuickView
39 #else
40         public QDeclarativeView
41 #endif
42 {
43     Q_OBJECT
44 public:
45 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
46     explicit View(QWindow *parent = 0);
47 #else
48     explicit View(QWidget *parent = 0);
49 #endif
50
51     ~View();
52
53 signals:
54
55 public slots:
56
57 private:
58     QFuture<void> future;
59     StationListModel *stationListModel;
60     StationListProxyModel *stationListProxyModel;
61 };
62
63 #endif // QP_VIEW_H