mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Renaming the prefs struct members to be consistent with the QSettings.
-Renaming prefs members for consistency. -Changing references of QSettings to the prefs structure instead. -Removing unused functions in pref.h were left over from an old version. -Changing the data-type of bool members to short for consistency with other members. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4bd4c01108
commit
8380f09619
8 changed files with 80 additions and 97 deletions
|
@ -49,8 +49,8 @@ void PreferencesDialog::setUiFromPrefs()
|
|||
ui.pheThreshold->setValue(prefs.pp_graphs.phe_threshold);
|
||||
ui.po2Threshold->setValue(prefs.pp_graphs.po2_threshold);
|
||||
ui.pn2Threshold->setValue(prefs.pp_graphs.pn2_threshold);
|
||||
ui.maxppo2->setValue(prefs.mod_ppO2);
|
||||
ui.red_ceiling->setChecked(prefs.profile_red_ceiling);
|
||||
ui.maxppo2->setValue(prefs.modppO2);
|
||||
ui.red_ceiling->setChecked(prefs.redceiling);
|
||||
ui.units_group->setEnabled(ui.personalize->isChecked());
|
||||
|
||||
ui.gflow->setValue(prefs.gflow);
|
||||
|
@ -179,7 +179,6 @@ void PreferencesDialog::syncSettings()
|
|||
|
||||
// Graph
|
||||
s.beginGroup("TecDetails");
|
||||
|
||||
s.setValue("phethreshold", ui.pheThreshold->value());
|
||||
s.setValue("po2threshold", ui.po2Threshold->value());
|
||||
s.setValue("pn2threshold", ui.pn2Threshold->value());
|
||||
|
@ -203,6 +202,7 @@ void PreferencesDialog::syncSettings()
|
|||
s.setValue("weight", ui.lbs->isChecked() ? units::LBS : units::KG);
|
||||
s.setValue("vertical_speed_time", ui.vertical_speed_minutes->isChecked() ? units::MINUTES : units::SECONDS);
|
||||
s.endGroup();
|
||||
|
||||
// Defaults
|
||||
s.beginGroup("GeneralSettings");
|
||||
s.setValue("default_filename", ui.defaultfilename->text());
|
||||
|
@ -216,6 +216,7 @@ void PreferencesDialog::syncSettings()
|
|||
s.endGroup();
|
||||
s.sync();
|
||||
|
||||
// Locale
|
||||
QLocale loc;
|
||||
s.beginGroup("Language");
|
||||
bool useSystemLang = s.value("UseSystemLanguage", true).toBool();
|
||||
|
@ -228,8 +229,11 @@ void PreferencesDialog::syncSettings()
|
|||
s.setValue("UiLanguage", ui.languageView->currentIndex().data(Qt::UserRole));
|
||||
s.endGroup();
|
||||
|
||||
// Animation
|
||||
s.beginGroup("Animations");
|
||||
s.setValue("animation_speed",ui.velocitySlider->value());
|
||||
s.endGroup();
|
||||
|
||||
loadSettings();
|
||||
emit settingsChanged();
|
||||
}
|
||||
|
@ -271,15 +275,15 @@ void PreferencesDialog::loadSettings()
|
|||
GET_DOUBLE("pn2threshold", pp_graphs.pn2_threshold);
|
||||
GET_DOUBLE("phethreshold", pp_graphs.phe_threshold);
|
||||
GET_BOOL("mod", mod);
|
||||
GET_DOUBLE("modppO2", mod_ppO2);
|
||||
GET_DOUBLE("modppO2", modppO2);
|
||||
GET_BOOL("ead", ead);
|
||||
GET_BOOL("redceiling", profile_red_ceiling);
|
||||
GET_BOOL("dcceiling", profile_dc_ceiling);
|
||||
GET_BOOL("calcceiling", profile_calc_ceiling);
|
||||
GET_BOOL("calcceiling3m", calc_ceiling_3m_incr);
|
||||
GET_BOOL("calcndltts", calc_ndl_tts);
|
||||
GET_BOOL("calcalltissues", calc_all_tissues);
|
||||
GET_BOOL("hrgraph", heart_rate);
|
||||
GET_BOOL("redceiling", redceiling);
|
||||
GET_BOOL("dcceiling", dcceiling);
|
||||
GET_BOOL("calcceiling", calcceiling);
|
||||
GET_BOOL("calcceiling3m", calcceiling3m);
|
||||
GET_BOOL("calcndltts", calcndltts);
|
||||
GET_BOOL("calcalltissues", calcalltissues);
|
||||
GET_BOOL("hrgraph", hrgraph);
|
||||
GET_INT("gflow", gflow);
|
||||
GET_INT("gfhigh", gfhigh);
|
||||
GET_BOOL("gf_low_at_maxdepth", gf_low_at_maxdepth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue