FGx  1
Public Member Functions | Static Public Member Functions | List of all members
XSettings Class Reference

The XSettings is an extended QSetttings, but also includes most to the FGx configuration. More...

+ Inheritance diagram for XSettings:

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 ()
 

Detailed Description

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().

Author
: Peter Morgan
: Yves Sablonier

Member Function Documentation

◆ dev_mode()

bool XSettings::dev_mode ( )
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..

Returns
developer mode enabled

◆ restoreWindow()

void XSettings::restoreWindow ( QWidget *  widget)

Restores a window position.

◆ saveWindow()

void XSettings::saveWindow ( QWidget *  widget)

Saves a window size and position.


The documentation for this class was generated from the following files: