diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.cpp b/scwx-qt/source/scwx/qt/settings/general_settings.cpp index 86544a1e..1a670b9f 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.cpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.cpp @@ -58,6 +58,7 @@ public: mapboxApiKey_.SetDefault("?"); maptilerApiKey_.SetDefault("?"); showMapAttribution_.SetDefault(true); + showMapCenter_.SetDefault(false); showMapLogo_.SetDefault(true); theme_.SetDefault(defaultThemeValue); trackLocation_.SetDefault(false); @@ -122,6 +123,7 @@ public: SettingsVariable mapboxApiKey_ {"mapbox_api_key"}; SettingsVariable maptilerApiKey_ {"maptiler_api_key"}; SettingsVariable showMapAttribution_ {"show_map_attribution"}; + SettingsVariable showMapCenter_ {"show_map_center"}; SettingsVariable showMapLogo_ {"show_map_logo"}; SettingsVariable theme_ {"theme"}; SettingsVariable trackLocation_ {"track_location"}; @@ -147,6 +149,7 @@ GeneralSettings::GeneralSettings() : &p->mapboxApiKey_, &p->maptilerApiKey_, &p->showMapAttribution_, + &p->showMapCenter_, &p->showMapLogo_, &p->theme_, &p->trackLocation_, @@ -240,6 +243,11 @@ SettingsVariable& GeneralSettings::show_map_attribution() const return p->showMapAttribution_; } +SettingsVariable& GeneralSettings::show_map_center() const +{ + return p->showMapCenter_; +} + SettingsVariable& GeneralSettings::show_map_logo() const { return p->showMapLogo_; @@ -297,6 +305,7 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs) lhs.p->mapboxApiKey_ == rhs.p->mapboxApiKey_ && lhs.p->maptilerApiKey_ == rhs.p->maptilerApiKey_ && lhs.p->showMapAttribution_ == rhs.p->showMapAttribution_ && + lhs.p->showMapCenter_ == rhs.p->showMapCenter_ && lhs.p->showMapLogo_ == rhs.p->showMapLogo_ && lhs.p->theme_ == rhs.p->theme_ && lhs.p->trackLocation_ == rhs.p->trackLocation_ && diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.hpp b/scwx-qt/source/scwx/qt/settings/general_settings.hpp index e11597c7..73d2963e 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.hpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.hpp @@ -41,6 +41,7 @@ public: SettingsVariable& mapbox_api_key() const; SettingsVariable& maptiler_api_key() const; SettingsVariable& show_map_attribution() const; + SettingsVariable& show_map_center() const; SettingsVariable& show_map_logo() const; SettingsVariable& theme() const; SettingsVariable& track_location() const; diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp index 04d9331a..30cd4bcb 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp @@ -135,6 +135,7 @@ public: &defaultTimeZone_, &antiAliasingEnabled_, &showMapAttribution_, + &showMapCenter_, &showMapLogo_, &updateNotificationsEnabled_, &debugEnabled_, @@ -233,6 +234,7 @@ public: settings::SettingsInterface theme_ {}; settings::SettingsInterface antiAliasingEnabled_ {}; settings::SettingsInterface showMapAttribution_ {}; + settings::SettingsInterface showMapCenter_ {}; settings::SettingsInterface showMapLogo_ {}; settings::SettingsInterface updateNotificationsEnabled_ {}; settings::SettingsInterface debugEnabled_ {}; @@ -666,6 +668,9 @@ void SettingsDialogImpl::SetupGeneralTab() generalSettings.show_map_attribution()); showMapAttribution_.SetEditWidget(self_->ui->showMapAttributionCheckBox); + showMapCenter_.SetSettingsVariable(generalSettings.show_map_center()); + showMapCenter_.SetEditWidget(self_->ui->showMapCenterCheckBox); + showMapLogo_.SetSettingsVariable(generalSettings.show_map_logo()); showMapLogo_.SetEditWidget(self_->ui->showMapLogoCheckBox); diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui index 6790b659..a6cf6804 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.ui +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.ui @@ -118,302 +118,325 @@ - - - QFrame::StyledPanel + + + true - - QFrame::Raised - - - - 0 + + + + 0 + 0 + 513 + 454 + - - 0 - - - 0 - - - 0 - - - - - Default Alert Action - - - - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - - - - QLineEdit::Password - - - - - - - Default Time Zone - - - - - - - Grid Width - - - - - - - Theme - - - - - - - Map Provider - - - - - - - MapTiler API Key - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - Clock Format - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - - - - Default Radar Site - - - - - - - Mapbox API Key - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - Grid Height - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - - - - ... - - - - - - - QLineEdit::Password - - - - - - - - - - ... - - - - :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg - - - - + + + + + QFrame::NoFrame + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Default Radar Site + + + + + + + Default Time Zone + + + + + + + Map Provider + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + + + + Mapbox API Key + + + + + + + Grid Width + + + + + + + MapTiler API Key + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + QLineEdit::Password + + + + + + + Theme + + + + + + + + + + + + + ... + + + + + + + QLineEdit::Password + + + + + + + Default Alert Action + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + ... + + + + :/res/icons/font-awesome-6/rotate-left-solid.svg:/res/icons/font-awesome-6/rotate-left-solid.svg + + + + + + + + + + + + + Clock Format + + + + + + + Grid Height + + + + + + + + + + Anti-Aliasing Enabled + + + + + + + Show Map Attribution + + + + + + + Show Map Center + + + + + + + Show Map Logo + + + + + + + Update Notifications Enabled + + + + + + + Debug Enabled + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + - - - - Anti-Aliasing Enabled - - - - - - - Show Map Attribution - - - - - - - Show Map Logo - - - - - - - Update Notifications Enabled - - - - - - - Debug Enabled - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - @@ -438,8 +461,8 @@ 0 0 - 498 - 383 + 63 + 18 diff --git a/test/data b/test/data index 260b3400..ab32df5b 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 260b340030487b01ce9aa37135d949008c972f27 +Subproject commit ab32df5b0731d70aa5b977453c9aa4786eb0bd3f