FGx
1
|
The XSettingsModel is an extended QStandardItemModel, and the main "setting and state" for FGx. More...
Public Types | |
enum | COLS { C_OPTION = 0, C_ENABLED = 1, C_VALUE = 2, C_DEFAULT = 3, C_LEVEL = 4, C_DESCRIPTION = 5, C_AREA = 6 } |
Public Slots | |
void | set_option (QString option, bool enabled, QString value) |
void | set_enabled (QString option, bool enabled) |
void | set_value (QString option, QString value) |
QString | profile () |
Path to fgfs executable. | |
void | read_default_ini () |
Read Values from ini. | |
void | load_last_profile (QString profile) |
Opens last used profile. | |
bool | load_profile () |
Opens Profile Dialog for loading a .ini File. | |
bool | save_profile () |
Opens Profile Dialog for loading a .ini File. | |
Signals | |
void | upx (QString option, bool enabled, QString value) |
void | updated (QStringList lines) |
Public Member Functions | |
XSettingsModel (MainObject *mob, QObject *parent=0) | |
void | add_option (QString option, bool enabled, QString value, QString preset, int level, QString description, QString area) |
QModelIndex | get_index (QString option) |
QString | getx (QString option) |
QString | getx (QString option, bool return_default) |
QString | getx (QString option, QString default_string) |
XOpt | get_opt (QString option) |
bool | get_ena (QString option) |
QStringList | get_fgfs_args () |
QStringList | get_fgfs_list () |
QString | get_fgfs_command_string () |
QStringList | get_fgfs_env () |
QString | terrasync_default_path () |
QString | fgfs_path () |
Path to fgfs executable. | |
QString | fgroot () |
QString | fgroot (QString append_path) |
Path to FG_ROOT with appended path. More... | |
bool | fgroot_use_default () |
QString | fgroot_path () |
QString | aircraft_path () |
The path to the /Aircraft directory. More... | |
QString | aircraft_path (QString dir) |
Path to the /Aircraft directory with a dir appended. More... | |
QString | airports_path () |
Return the absolute path to the /Airports directory. More... | |
QString | scenery_path () |
Returns the absolute path to the /Scenery file. More... | |
bool | terrasync_enabled () |
Sert terrasync enabled/disabled. | |
QString | terrasync_exe_path () |
Path to terrasync executable. | |
QString | terrasync_data_path () |
Path to terrasync executable. | |
bool | custom_scenery_enabled () |
QString | custom_scenery_path () |
bool | fgcom_enabled () |
QString | fgcom_exe_path () |
Path to fgcom executable. | |
QString | jsdemo_exe_path () |
bool | paths_sane () |
Checks whether the executablem FG_ROOT paths are sane. More... | |
void | set_row_bg (int row_idx, QColor bgcolor) |
QString | getLastUsed () |
void | setLastUsed (QString previous) |
QStringList | getSceneryDirs () |
Public Attributes | |
MainObject * | mainObject |
bool | _loading |
The XSettingsModel is an extended QStandardItemModel, and the main "setting and state" for FGx.
QString XSettingsModel::aircraft_path | ( | ) |
The path to the /Aircraft directory.
QString XSettingsModel::aircraft_path | ( | QString | dir | ) |
Path to the /Aircraft directory with a dir appended.
QString XSettingsModel::airports_path | ( | ) |
Return the absolute path to the /Airports directory.
QString XSettingsModel::fgroot | ( | ) |
QString XSettingsModel::fgroot | ( | QString | append_path | ) |
Path to FG_ROOT with appended path.
Returns the path to the FG_ROOT. If the default install is selected, then that is returned, otherwise the custom selected fg_data path. The file is appended with the append_path
bool XSettingsModel::paths_sane | ( | ) |
Checks whether the executablem FG_ROOT paths are sane.
QString XSettingsModel::scenery_path | ( | ) |
Returns the absolute path to the /Scenery file.