1 // LauncherMainWindow.hxx - GUI launcher dialog using Qt5
2 //
3 // Written by James Turner, started October 2015.
4 //
5 // Copyright (C) 2018 James Turner <james@flightgear.org>
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 
21 #ifndef LAUNCHER_MAIN_WINDOW_HXX
22 #define LAUNCHER_MAIN_WINDOW_HXX
23 
24 #include <QScopedPointer>
25 #include <QStringList>
26 #include <QModelIndex>
27 #include <QTimer>
28 #include <QUrl>
29 #include <QQuickView>
30 
31 
32 class QModelIndex;
33 class QQmlEngine;
34 class LaunchConfig;
35 class ViewCommandLinePage;
36 class QQuickItem;
37 class LauncherController;
38 
39 class LauncherMainWindow : public QQuickView
40 {
41     Q_OBJECT
42 public:
43     LauncherMainWindow(bool inSimMode);
44     virtual ~LauncherMainWindow();
45 
46     bool execInApp();
47 
48     bool wasRejected();
49 
50     bool event(QEvent *event) override;
51 
52 private slots:
53     void onQuickStatusChanged(QQuickView::Status status);
54     void renderTheadSceneGraphInitialized();
55 
56 private:
57     LauncherController* m_controller;
58 
59     bool checkQQC2Availability();
60 };
61 
62 #endif // of LAUNCHER_MAIN_WINDOW_HXX
63