diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.cpp b/scwx-qt/source/scwx/qt/settings/general_settings.cpp index fe73a7d5..e6d49a4b 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.cpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.cpp @@ -93,6 +93,11 @@ public: nmeaBaudRate_.SetMinimum(1); nmeaBaudRate_.SetMaximum(999999999); + customStyleDrawLayer_.SetTransform([](const std::string& value) + { return boost::trim_copy(value); }); + customStyleUrl_.SetTransform([](const std::string& value) + { return boost::trim_copy(value); }); + clockFormat_.SetValidator( SCWX_SETTINGS_ENUM_VALIDATOR(scwx::util::ClockFormat, scwx::util::ClockFormatIterator(), @@ -130,6 +135,9 @@ public: SettingsVariable antiAliasingEnabled_ {"anti_aliasing_enabled"}; SettingsVariable clockFormat_ {"clock_format"}; + SettingsVariable customStyleDrawLayer_ { + "custom_style_draw_layer"}; + SettingsVariable customStyleUrl_ {"custom_style_url"}; SettingsVariable debugEnabled_ {"debug_enabled"}; SettingsVariable defaultAlertAction_ {"default_alert_action"}; SettingsVariable defaultRadarSite_ {"default_radar_site"}; @@ -158,8 +166,10 @@ public: GeneralSettings::GeneralSettings() : SettingsCategory("general"), p(std::make_unique()) { - RegisterVariables({&p->antiAliasingEnabled_, // + RegisterVariables({&p->antiAliasingEnabled_, &p->clockFormat_, + &p->customStyleDrawLayer_, + &p->customStyleUrl_, &p->debugEnabled_, &p->defaultAlertAction_, &p->defaultRadarSite_, @@ -201,6 +211,16 @@ SettingsVariable& GeneralSettings::clock_format() const return p->clockFormat_; } +SettingsVariable& GeneralSettings::custom_style_draw_layer() const +{ + return p->customStyleDrawLayer_; +} + +SettingsVariable& GeneralSettings::custom_style_url() const +{ + return p->customStyleUrl_; +} + SettingsVariable& GeneralSettings::debug_enabled() const { return p->debugEnabled_; @@ -340,6 +360,8 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs) { return (lhs.p->antiAliasingEnabled_ == rhs.p->antiAliasingEnabled_ && lhs.p->clockFormat_ == rhs.p->clockFormat_ && + lhs.p->customStyleDrawLayer_ == rhs.p->customStyleDrawLayer_ && + lhs.p->customStyleUrl_ == rhs.p->customStyleUrl_ && lhs.p->debugEnabled_ == rhs.p->debugEnabled_ && lhs.p->defaultAlertAction_ == rhs.p->defaultAlertAction_ && lhs.p->defaultRadarSite_ == rhs.p->defaultRadarSite_ && diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.hpp b/scwx-qt/source/scwx/qt/settings/general_settings.hpp index 4c162616..2628aef1 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.hpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.hpp @@ -25,12 +25,14 @@ public: GeneralSettings(GeneralSettings&&) noexcept; GeneralSettings& operator=(GeneralSettings&&) noexcept; - SettingsVariable& anti_aliasing_enabled() const; - SettingsVariable& clock_format() const; - SettingsVariable& debug_enabled() const; - SettingsVariable& default_alert_action() const; - SettingsVariable& default_radar_site() const; - SettingsVariable& default_time_zone() const; + SettingsVariable& anti_aliasing_enabled() const; + SettingsVariable& clock_format() const; + SettingsVariable& custom_style_draw_layer() const; + SettingsVariable& custom_style_url() const; + SettingsVariable& debug_enabled() const; + SettingsVariable& default_alert_action() const; + SettingsVariable& default_radar_site() const; + SettingsVariable& default_time_zone() const; SettingsContainer>& font_sizes() const; SettingsVariable& grid_height() const; SettingsVariable& grid_width() const; diff --git a/test/data b/test/data index 6fe42c4f..f631a9ff 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 6fe42c4f776ced46f0f808109d0d773ffc2255e3 +Subproject commit f631a9ffa16353d8560ecec7ee16f4e2ae20b310