Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
coresettingswidget.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // coresettingswidget.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-2012
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef CORESETTINGSWIDGET_H
10 #define CORESETTINGSWIDGET_H
11 
12 #include <QWidget>
13 #include <QComboBox>
14 #include <QCheckBox>
15 #include <QLineEdit>
16 #include <QGroupBox>
17 #include <QButtonGroup>
18 #include <QRadioButton>
19 #include <QToolButton>
20 
21 #include "xobjects/mainobject.h"
22 #include "xwidgets/xgroupboxes.h"
23 #include "xwidgets/xmessagelabel.h"
24 
25 class MainObject;
26 
28 {
29 Q_OBJECT
30 public:
31  explicit CoreSettingsWidget(MainObject *mOb, QWidget *parent = 0);
32 
34 
36 
38 
39  //* Images
40  //QLabel *imageLabel;
41 
42 
43  //* Callsign
44  QLineEdit *txtCallSign;
45 
46  //* Screen
47  QComboBox *comboScreenSize;
50 
51  QHBoxLayout *screenSizeBox;
52  QLineEdit *lineEditScreenSizeW;
53  QLineEdit *lineEditScreenSizeH;
54  //QLabel *lineEditScreenSizeWLabel;
55  //QLabel *lineEditScreenSizeHLabel;
56 
57 
58 
59  //* MpMap
60  QCheckBox *checkBoxShowMpMap;
61  QComboBox *comboMpMapServer;
62 
63 
64  //** Paths
65  QButtonGroup *buttonGroupPaths;
68 
69  QLineEdit *lineEditFgFsPath;
70  QComboBox *comboFgFsPath;
71  QLineEdit *lineEditFgRootPath;
72  QToolButton *buttonSetFgfsPath;
73  QToolButton *buttonSetFgRootPath;
76 
79 
85 
88 
91 
97 
100 
101  //* Controls
103 
104  //* Functions
105  void initialize();
106  QString validate();
107 
108 
109 signals:
110  void setx(QString option, bool enabled, QString value);
111 
112 
113 public slots:
114 
115  void on_callsign_changed(QString);
116 
117  void on_show_mp_map();
118 
119  void on_fgfs_path(QString);
120  void on_fgroot_path(QString);
121  void on_terrasync_path(QString);
122  void on_terrasync_data_path(QString);
123  void on_terrasync_enabled();
126  void on_custom_scenery_path(QString);
128 
129  void load_joysticks();
130 
131  void on_upx(QString option, bool enabled, QString value);
132 
133  // Path checks
134  void fgfs_check_path();
135  void fgroot_check_path();
139 
140  // "Set" buttons
141  void on_select_fgfsbutton();
142  void on_select_fgrootbutton();
146 
147  void reload_lists();
148 
149  // Emit settings when changed
150  void fgfs_set_path();
151  void fgroot_set_path();
152  void terrasyncexe_set_path();
153  void terrasyncdata_set_path();
154  void customscenery_set_path();
155 
156  int randInt(int low, int high);
157 
158  QString which_fgfs();
159  void add_fgfs_paths();
160 
161 };
162 
163 #endif // CORESETTINGSWIDGET_H
QCheckBox * checkBoxShowMpMap
void on_terrasync_data_path(QString)
void setx(QString option, bool enabled, QString value)
QLineEdit * lineEditFgFsPath
QCheckBox * checkBoxFullScreenStartup
QToolButton * buttonSetCustomSceneryPath
void on_callsign_changed(QString)
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
QLineEdit * lineEditScreenSizeW
QToolButton * buttonSetTerrasyncDataPath
QHBoxLayout * screenSizeBox
void add_fgfs_paths()
Detects possible paths for fgfs.
QComboBox * comboMpMapServer
void on_terrasync_path(QString)
XGroupHBox * groupBoxFgRoot
QString which_fgfs()
detects runs "which fgms" and returns result on nix
QLineEdit * lineEditCustomScenePath
QCheckBox * checkBoxDisableSplashScreen
A QGroupBox with a QHBoxLyout layout.
Definition: xgroupboxes.h:39
XGroupHBox * groupBoxFgFs
QLineEdit * lineEditFGComExePath
CoreSettingsWidget(MainObject *mOb, QWidget *parent=0)
int randInt(int low, int high)
QToolButton * buttonSetFgfsPath
QButtonGroup * buttonGroupPaths
XMessageLabel * messageLabel
QToolButton * buttonSetTerrasyncExePath
QComboBox * comboScreenSize
QLabel * labelTerrasyncDataCheck
QToolButton * buttonSetFgRootPath
QLineEdit * lineEditScreenSizeH
void on_fgroot_path(QString)
void on_custom_scenery_path(QString)
void on_upx(QString option, bool enabled, QString value)
QLineEdit * lineEditTerraSyncExePath
QLineEdit * lineEditTerraSyncDataPath
QCheckBox * checkBoxUseCustomScenery
QLineEdit * lineEditFgRootPath
QCheckBox * checkBoxUseTerrasync