Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
xsettings.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // xsettings.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 XSETTINGS_H
10 #define XSETTINGS_H
11 
12 #include <QSettings>
13 #include <QSplitter>
14 
15 class XSettings : public QSettings
16 {
17 Q_OBJECT
18 public:
19 
20  explicit XSettings(QObject *parent = 0);
21 
22  static bool dev_mode();
23 
24  static QString cache_dir();
25 
26  QString fgx_path();
27  static QString fgx_current_dir();
28 
29 
30  void saveWindow(QWidget *widget);
31  void restoreWindow(QWidget *widget);
32 
33  void saveSplitter(QSplitter *splitter);
34  void restoreSplitter(QSplitter *splitter);
35 
36  QString fgcom_exe_path();
37  QString fgcom_port();
38  QString fgcom_no();
39  QString default_fgcom_no();
40  QString default_fgcom_port();
41 
42 
43  static QString log_file_path();
44 
45  QString style_current();
46  QString style_default();
47 
48 private:
49  QString _windowName(QWidget *widget);
50 
51 signals:
52 
53 public slots:
54 
55 };
56 
57 #endif // XSETTINGS_H
static bool dev_mode()
The "Special Developer Flag".
Definition: xsettings.cpp:138
static QString fgx_current_dir()
this should be used, yves ?
Definition: xsettings.cpp:145
QString style_current()
return the currently selected style or the default
Definition: xsettings.cpp:39
QString default_fgcom_port()
The XSettings is an extended QSetttings, but also includes most to the FGx configuration.
Definition: xsettings.h:15
QString fgcom_port()
QString default_fgcom_no()
QString _windowName(QWidget *widget)
Extracts the settings_namespace property.
Definition: xsettings.cpp:121
void saveWindow(QWidget *widget)
Saves a window's size and position.
Definition: xsettings.cpp:90
void saveSplitter(QSplitter *splitter)
Saves a splitters dimensions.
Definition: xsettings.cpp:65
QString style_default()
Definition: xsettings.cpp:43
void restoreWindow(QWidget *widget)
Restores a size window position.
Definition: xsettings.cpp:101
XSettings(QObject *parent=0)
Definition: xsettings.cpp:29
void restoreSplitter(QSplitter *splitter)
Restores a splitters dimensions.
Definition: xsettings.cpp:76
QString fgcom_exe_path()
QString fgx_path()
Definition: xsettings.cpp:51
static QString cache_dir()
shortcut to cache directory
Definition: xsettings.cpp:152
static QString log_file_path()
QString fgcom_no()