mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-02 06:20:05 +00:00
parent
721e3a163e
commit
35f29a794b
3 changed files with 89 additions and 37 deletions
|
|
@ -31,28 +31,38 @@ public:
|
|||
{
|
||||
auto& productSettings = settings::ProductSettings::Instance();
|
||||
|
||||
productSettings.sti_forecast_enabled().RegisterValueStagedCallback(
|
||||
[=, this](const bool& value)
|
||||
{
|
||||
stiForecastEnabled_ = value;
|
||||
stiNeedsUpdate_ = true;
|
||||
stiForecastEnabledCallbackUuid_ =
|
||||
productSettings.sti_forecast_enabled().RegisterValueStagedCallback(
|
||||
[=, this](const bool& value)
|
||||
{
|
||||
stiForecastEnabled_ = value;
|
||||
stiNeedsUpdate_ = true;
|
||||
|
||||
Q_EMIT self_->NeedsRendering();
|
||||
});
|
||||
productSettings.sti_past_enabled().RegisterValueStagedCallback(
|
||||
[=, this](const bool& value)
|
||||
{
|
||||
stiPastEnabled_ = value;
|
||||
stiNeedsUpdate_ = true;
|
||||
Q_EMIT self_->NeedsRendering();
|
||||
});
|
||||
stiPastEnabledCallbackUuid_ =
|
||||
productSettings.sti_past_enabled().RegisterValueStagedCallback(
|
||||
[=, this](const bool& value)
|
||||
{
|
||||
stiPastEnabled_ = value;
|
||||
stiNeedsUpdate_ = true;
|
||||
|
||||
Q_EMIT self_->NeedsRendering();
|
||||
});
|
||||
Q_EMIT self_->NeedsRendering();
|
||||
});
|
||||
|
||||
stiForecastEnabled_ =
|
||||
productSettings.sti_forecast_enabled().GetStagedOrValue();
|
||||
stiPastEnabled_ = productSettings.sti_past_enabled().GetStagedOrValue();
|
||||
}
|
||||
~Impl() = default;
|
||||
~Impl()
|
||||
{
|
||||
auto& productSettings = settings::ProductSettings::Instance();
|
||||
|
||||
productSettings.sti_forecast_enabled().UnregisterValueStagedCallback(
|
||||
stiForecastEnabledCallbackUuid_);
|
||||
productSettings.sti_past_enabled().UnregisterValueStagedCallback(
|
||||
stiPastEnabledCallbackUuid_);
|
||||
}
|
||||
|
||||
void UpdateStormTrackingInformation();
|
||||
|
||||
|
|
@ -87,6 +97,9 @@ public:
|
|||
|
||||
OverlayProductLayer* self_;
|
||||
|
||||
boost::uuids::uuid stiForecastEnabledCallbackUuid_;
|
||||
boost::uuids::uuid stiPastEnabledCallbackUuid_;
|
||||
|
||||
bool stiForecastEnabled_ {true};
|
||||
bool stiPastEnabled_ {true};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue