1
0
Fork 0
flightgear/src/GUI/QtLauncher.hxx

80 lines
1.6 KiB
C++
Raw Normal View History

#include <QDialog>
#include <QScopedPointer>
#include <QStringList>
#include <QModelIndex>
#include <Airports/airport.hxx>
namespace Ui
{
class Launcher;
}
class AirportSearchModel;
class QModelIndex;
class AircraftProxyModel;
class QCheckBox;
class QtLauncher : public QDialog
{
Q_OBJECT
public:
QtLauncher();
virtual ~QtLauncher();
static bool runLauncherDialog();
private slots:
void onRun();
void onQuit();
void onSearchAirports();
void onAirportChanged();
void onAirportChoiceSelected(const QModelIndex& index);
void onAircraftSelected(const QModelIndex& index);
void onPopupAirportHistory();
void onPopupAircraftHistory();
void onOpenCustomAircraftDir();
void onEditRatingsFilter();
void updateAirportDescription();
void updateSettingsSummary();
void onAirportSearchComplete();
void onAddSceneryPath();
void onRemoveSceneryPath();
2015-01-07 11:30:44 +00:00
void onRembrandtToggled(bool b);
private:
void setAirport(FGAirportRef ref);
void updateSelectedAircraft();
void restoreSettings();
void saveSettings();
QModelIndex proxyIndexForAircraftPath(QString path) const;
QModelIndex sourceIndexForAircraftPath(QString path) const;
void setEnableDisableOptionFromCheckbox(QCheckBox* cbox, QString name) const;
QScopedPointer<Ui::Launcher> m_ui;
AirportSearchModel* m_airportsModel;
AircraftProxyModel* m_aircraftProxy;
FGAirportRef m_selectedAirport;
QString m_selectedAircraft;
QStringList m_recentAircraft,
m_recentAirports;
QString m_customAircraftDir;
int m_ratingFilters[4];
};