diff --git a/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp b/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp index c4680a62..2036769f 100644 --- a/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings/alert_palette_settings_widget.cpp @@ -178,7 +178,8 @@ QWidget* AlertPaletteSettingsWidget::Impl::CreateStackedWidgetPage( QGridLayout* gridLayout = new QGridLayout(self_); page->setLayout(gridLayout); - const auto& phenomenonInfo = awips::GetPhenomenonInfo(phenomenon); + const auto& impactBasedWarningInfo = + awips::GetImpactBasedWarningInfo(phenomenon); int row = 0; @@ -187,17 +188,17 @@ QWidget* AlertPaletteSettingsWidget::Impl::CreateStackedWidgetPage( AddPhenomenonLine("Active", gridLayout, row++); - if (phenomenonInfo.hasObservedTag_) + if (impactBasedWarningInfo.hasObservedTag_) { AddPhenomenonLine("Observed", gridLayout, row++); } - if (phenomenonInfo.hasTornadoPossibleTag_) + if (impactBasedWarningInfo.hasTornadoPossibleTag_) { AddPhenomenonLine("Tornado Possible", gridLayout, row++); } - for (auto& category : phenomenonInfo.threatCategories_) + for (auto& category : impactBasedWarningInfo.threatCategories_) { if (category == awips::ThreatCategory::Base) { diff --git a/wxdata/include/scwx/awips/impact_based_warnings.hpp b/wxdata/include/scwx/awips/impact_based_warnings.hpp index 7bb07f5a..d45ffb8f 100644 --- a/wxdata/include/scwx/awips/impact_based_warnings.hpp +++ b/wxdata/include/scwx/awips/impact_based_warnings.hpp @@ -20,14 +20,14 @@ enum class ThreatCategory : int Unknown }; -struct PhenomenonInfo +struct ImpactBasedWarningInfo { bool hasObservedTag_ {false}; bool hasTornadoPossibleTag_ {false}; std::vector threatCategories_ {ThreatCategory::Base}; }; -const PhenomenonInfo& GetPhenomenonInfo(Phenomenon phenomenon); +const ImpactBasedWarningInfo& GetImpactBasedWarningInfo(Phenomenon phenomenon); ThreatCategory GetThreatCategory(const std::string& name); const std::string& GetThreatCategoryName(ThreatCategory threatCategory); diff --git a/wxdata/source/scwx/awips/impact_based_warnings.cpp b/wxdata/source/scwx/awips/impact_based_warnings.cpp index 1bf5e321..ca26fa7b 100644 --- a/wxdata/source/scwx/awips/impact_based_warnings.cpp +++ b/wxdata/source/scwx/awips/impact_based_warnings.cpp @@ -13,25 +13,29 @@ namespace awips static const std::string logPrefix_ = "scwx::awips::impact_based_warnings"; -static const boost::unordered_flat_map - phenomenaInfo_ { - {Phenomenon::Marine, PhenomenonInfo {.hasTornadoPossibleTag_ {true}}}, +static const boost::unordered_flat_map + impactBasedWarningInfo_ { + {Phenomenon::Marine, + ImpactBasedWarningInfo {.hasTornadoPossibleTag_ {true}}}, {Phenomenon::FlashFlood, - PhenomenonInfo {.threatCategories_ {ThreatCategory::Base, - ThreatCategory::Considerable, - ThreatCategory::Catastrophic}}}, + ImpactBasedWarningInfo { + .threatCategories_ {ThreatCategory::Base, + ThreatCategory::Considerable, + ThreatCategory::Catastrophic}}}, {Phenomenon::SevereThunderstorm, - PhenomenonInfo {.hasTornadoPossibleTag_ {true}, - .threatCategories_ {ThreatCategory::Base, - ThreatCategory::Considerable, - ThreatCategory::Destructive}}}, - {Phenomenon::SnowSquall, PhenomenonInfo {}}, + ImpactBasedWarningInfo { + .hasTornadoPossibleTag_ {true}, + .threatCategories_ {ThreatCategory::Base, + ThreatCategory::Considerable, + ThreatCategory::Destructive}}}, + {Phenomenon::SnowSquall, ImpactBasedWarningInfo {}}, {Phenomenon::Tornado, - PhenomenonInfo {.hasObservedTag_ {true}, - .threatCategories_ {ThreatCategory::Base, - ThreatCategory::Considerable, - ThreatCategory::Catastrophic}}}, - {Phenomenon::Unknown, PhenomenonInfo {}}}; + ImpactBasedWarningInfo { + .hasObservedTag_ {true}, + .threatCategories_ {ThreatCategory::Base, + ThreatCategory::Considerable, + ThreatCategory::Catastrophic}}}, + {Phenomenon::Unknown, ImpactBasedWarningInfo {}}}; static const std::unordered_map threatCategoryName_ {{ThreatCategory::Base, "Base"}, @@ -41,14 +45,14 @@ static const std::unordered_map {ThreatCategory::Catastrophic, "Catastrophic"}, {ThreatCategory::Unknown, "?"}}; -const PhenomenonInfo& GetPhenomenonInfo(Phenomenon phenomenon) +const ImpactBasedWarningInfo& GetImpactBasedWarningInfo(Phenomenon phenomenon) { - auto it = phenomenaInfo_.find(phenomenon); - if (it != phenomenaInfo_.cend()) + auto it = impactBasedWarningInfo_.find(phenomenon); + if (it != impactBasedWarningInfo_.cend()) { return it->second; } - return phenomenaInfo_.at(Phenomenon::Unknown); + return impactBasedWarningInfo_.at(Phenomenon::Unknown); } SCWX_GET_ENUM(ThreatCategory, GetThreatCategory, threatCategoryName_)