From 77e02b76b1abb3b8cb91545a55cbe5d9f681e7b3 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 14 Dec 2024 22:48:04 -0600 Subject: [PATCH] Toggle for smoothed range folding in settings dialog --- scwx-qt/source/scwx/qt/ui/settings_dialog.cpp | 33 ++++++++++++------- scwx-qt/source/scwx/qt/ui/settings_dialog.ui | 33 +++++++++++-------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp index 69c3a387..59bc8881 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -136,6 +137,7 @@ public: &showMapAttribution_, &showMapCenter_, &showMapLogo_, + &showSmoothedRangeFolding_, &updateNotificationsEnabled_, &cursorIconAlwaysOn_, &debugEnabled_, @@ -251,6 +253,7 @@ public: settings::SettingsInterface showMapAttribution_ {}; settings::SettingsInterface showMapCenter_ {}; settings::SettingsInterface showMapLogo_ {}; + settings::SettingsInterface showSmoothedRangeFolding_ {}; settings::SettingsInterface updateNotificationsEnabled_ {}; settings::SettingsInterface cursorIconAlwaysOn_ {}; settings::SettingsInterface debugEnabled_ {}; @@ -527,21 +530,22 @@ void SettingsDialogImpl::SetupGeneralTab() { settings::GeneralSettings& generalSettings = settings::GeneralSettings::Instance(); - + settings::ProductSettings& productSettings = + settings::ProductSettings::Instance(); QObject::connect( - self_->ui->themeComboBox, - &QComboBox::currentTextChanged, - self_, - [this](const QString& text) - { - types::UiStyle style = types::GetUiStyle(text.toStdString()); - bool themeFileEnabled = style == types::UiStyle::FusionCustom; + self_->ui->themeComboBox, + &QComboBox::currentTextChanged, + self_, + [this](const QString& text) + { + types::UiStyle style = types::GetUiStyle(text.toStdString()); + bool themeFileEnabled = style == types::UiStyle::FusionCustom; - self_->ui->themeFileLineEdit->setEnabled(themeFileEnabled); - self_->ui->themeFileSelectButton->setEnabled(themeFileEnabled); - self_->ui->resetThemeFileButton->setEnabled(themeFileEnabled); - }); + self_->ui->themeFileLineEdit->setEnabled(themeFileEnabled); + self_->ui->themeFileSelectButton->setEnabled(themeFileEnabled); + self_->ui->resetThemeFileButton->setEnabled(themeFileEnabled); + }); theme_.SetSettingsVariable(generalSettings.theme()); SCWX_SETTINGS_COMBO_BOX(theme_, @@ -759,6 +763,11 @@ void SettingsDialogImpl::SetupGeneralTab() showMapLogo_.SetSettingsVariable(generalSettings.show_map_logo()); showMapLogo_.SetEditWidget(self_->ui->showMapLogoCheckBox); + showSmoothedRangeFolding_.SetSettingsVariable( + productSettings.show_smoothed_range_folding()); + showSmoothedRangeFolding_.SetEditWidget( + self_->ui->showSmoothedRangeFoldingCheckBox); + updateNotificationsEnabled_.SetSettingsVariable( generalSettings.update_notifications_enabled()); updateNotificationsEnabled_.SetEditWidget( diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui index 12bcbc0e..ec400682 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui @@ -135,9 +135,9 @@ 0 - -246 - 511 - 703 + -272 + 513 + 702 @@ -562,6 +562,19 @@ + + + + false + + + + + + Multi-Pane Cursor Marker Always On + + + @@ -584,22 +597,16 @@ - + - Update Notifications Enabled + Show Range Folding when Smoothing Radar Data - - - false - - - - + - Multi-Pane Cursor Marker Always On + Update Notifications Enabled