diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_defaults.cpp | 20 | ||||
-rw-r--r-- | desktop-widgets/preferences/preferences_graph.cpp | 10 |
2 files changed, 15 insertions, 15 deletions
diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp index 4d8aef610..748817e02 100644 --- a/desktop-widgets/preferences/preferences_defaults.cpp +++ b/desktop-widgets/preferences/preferences_defaults.cpp @@ -101,19 +101,19 @@ void PreferencesDefaults::refreshSettings() void PreferencesDefaults::syncSettings() { - auto general = SettingsObjectWrapper::instance()->general_settings; - general->setDefaultFilename(ui->defaultfilename->text()); - general->setDefaultCylinder(ui->default_cylinder->currentText()); - general->setUseDefaultFile(ui->btnUseDefaultFile->isChecked()); + auto general = qPrefGeneral::instance(); + general->set_default_filename(ui->defaultfilename->text()); + general->set_default_cylinder(ui->default_cylinder->currentText()); + general->set_use_default_file(ui->btnUseDefaultFile->isChecked()); if (ui->noDefaultFile->isChecked()) - general->setDefaultFileBehavior(NO_DEFAULT_FILE); + general->set_default_file_behavior(NO_DEFAULT_FILE); else if (ui->localDefaultFile->isChecked()) - general->setDefaultFileBehavior(LOCAL_DEFAULT_FILE); + general->set_default_file_behavior(LOCAL_DEFAULT_FILE); else if (ui->cloudDefaultFile->isChecked()) - general->setDefaultFileBehavior(CLOUD_DEFAULT_FILE); - general->setExtractVideoThumbnails(ui->extractVideoThumbnails->isChecked()); - general->setExtractVideoThumbnailsPosition(ui->videoThumbnailPosition->value()); - general->setFfmpegExecutable(ui->ffmpegExecutable->text()); + general->set_default_file_behavior(CLOUD_DEFAULT_FILE); + general->set_extract_video_thumbnails(ui->extractVideoThumbnails->isChecked()); + general->set_extract_video_thumbnails_position(ui->videoThumbnailPosition->value()); + general->set_ffmpeg_executable(ui->ffmpegExecutable->text()); auto display = qPrefDisplay::instance(); display->set_divelist_font(ui->font->currentFont().toString()); diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp index a25f818c7..cbb2b2c39 100644 --- a/desktop-widgets/preferences/preferences_graph.cpp +++ b/desktop-widgets/preferences/preferences_graph.cpp @@ -52,11 +52,11 @@ void PreferencesGraph::refreshSettings() void PreferencesGraph::syncSettings() { - auto general = SettingsObjectWrapper::instance()->general_settings; - general->setDefaultSetPoint(lrint(ui->defaultSetpoint->value() * 1000.0)); - general->setO2Consumption(lrint(ui->psro2rate->value() *1000.0)); - general->setPscrRatio(lrint(1000.0 / ui->pscrfactor->value())); - general->setAutoRecalculateThumbnails(ui->auto_recalculate_thumbnails->isChecked()); + auto general = qPrefGeneral::instance(); + general->set_defaultsetpoint(lrint(ui->defaultSetpoint->value() * 1000.0)); + general->set_o2consumption(lrint(ui->psro2rate->value() *1000.0)); + general->set_pscr_ratio(lrint(1000.0 / ui->pscrfactor->value())); + general->set_auto_recalculate_thumbnails(ui->auto_recalculate_thumbnails->isChecked()); auto pp_gas = qPrefPartialPressureGas::instance(); pp_gas->set_phe_threshold(ui->pheThreshold->value()); |