2014-12-26 15:20:51 +03:00
|
|
|
|
|
|
|
#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);
|
2014-12-26 15:20:51 +03:00
|
|
|
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];
|
|
|
|
};
|