]> git.mxchange.org Git - flightgear.git/blob - src/GUI/QtLauncher.hxx
Arrow icons for variant selection.
[flightgear.git] / src / GUI / QtLauncher.hxx
1
2 #include <QDialog>
3 #include <QScopedPointer>
4 #include <QStringList>
5 #include <QModelIndex>
6
7 #include <Airports/airport.hxx>
8
9 namespace Ui
10 {
11     class Launcher;
12 }
13
14 class AirportSearchModel;
15 class QModelIndex;
16 class AircraftProxyModel;
17 class QCheckBox;
18
19 class QtLauncher : public QDialog
20 {
21     Q_OBJECT
22 public:
23     QtLauncher();
24     virtual ~QtLauncher();
25     
26     static bool runLauncherDialog();
27
28 private slots:
29     void onRun();
30     void onQuit();
31
32     void onSearchAirports();
33
34     void onAirportChanged();
35
36     void onAirportChoiceSelected(const QModelIndex& index);
37     void onAircraftSelected(const QModelIndex& index);
38
39     void onPopupAirportHistory();
40     void onPopupAircraftHistory();
41
42     void onOpenCustomAircraftDir();
43
44     void onEditRatingsFilter();
45
46     void updateAirportDescription();
47     void updateSettingsSummary();
48
49     void onAirportSearchComplete();
50
51     void onAddSceneryPath();
52     void onRemoveSceneryPath();
53
54     void onRembrandtToggled(bool b);
55 private:
56     void setAirport(FGAirportRef ref);
57     void updateSelectedAircraft();
58
59     void restoreSettings();
60     void saveSettings();
61     
62     QModelIndex proxyIndexForAircraftPath(QString path) const;
63     QModelIndex sourceIndexForAircraftPath(QString path) const;
64
65     void setEnableDisableOptionFromCheckbox(QCheckBox* cbox, QString name) const;
66
67     QScopedPointer<Ui::Launcher> m_ui;
68     AirportSearchModel* m_airportsModel;
69     AircraftProxyModel* m_aircraftProxy;
70
71     FGAirportRef m_selectedAirport;
72
73     QString m_selectedAircraft;
74     QStringList m_recentAircraft,
75         m_recentAirports;
76     QString m_customAircraftDir;
77
78     int m_ratingFilters[4];
79 };