The XSettings is an extended QSetttings, but also includes most to the FGx configuration. More...
Public Member Functions | |
XSettings (QObject *parent=0) | |
QString | fgx_path () |
void | saveWindow (QWidget *widget) |
Saves a window size and position. More... | |
void | restoreWindow (QWidget *widget) |
Restores a window position. More... | |
QString | fgcom_exe_path () |
QString | fgcom_port () |
QString | fgcom_no () |
QString | default_fgcom_no () |
QString | default_fgcom_port () |
QString | style_current () |
return the currently selected style or the default | |
QString | style_default () |
Static Public Member Functions | |
static bool | dev_mode () |
The "Special Developer Flag". More... | |
static QString | cache_dir () |
static QString | fgx_current_dir () |
static QString | log_file_path () |
The XSettings is an extended QSetttings, but also includes most to the FGx configuration.
The general idea of the class is to provide one central place to access settings. It is for this reason that methods are created to hide some of the completities, such as aircraft_path().
|
static |
The "Special Developer Flag".
This is one of those magic workaround functions to detect if in development mode. The functions detects if the file "DEV_MODE.txt" exists in the current directory. eg in fgx/src/DEV_MODE.txt The precense of this file make a few things happen.. such as redirecting login to shell Reading stuff from files in stead of resources etc..
void XSettings::restoreWindow | ( | QWidget * | widget | ) |
Restores a window position.
void XSettings::saveWindow | ( | QWidget * | widget | ) |
Saves a window size and position.