diff --git a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp index 779e6084..099e3fac 100644 --- a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp @@ -339,6 +339,53 @@ void Level3ProductView::UpdateColorTableLut() Q_EMIT ColorTableLutUpdated(); } +std::optional +Level3ProductView::GetDataLevelCode(std::uint16_t level) const +{ + if (level > std::numeric_limits::max()) + { + return std::nullopt; + } + + auto gpm = graphic_product_message(); + if (gpm == nullptr) + { + return std::nullopt; + } + + std::shared_ptr descriptionBlock = + gpm->description_block(); + if (descriptionBlock == nullptr) + { + return std::nullopt; + } + + return descriptionBlock->data_level_code(static_cast(level)); +} + +std::optional Level3ProductView::GetDataValue(std::uint16_t level) const +{ + if (level > std::numeric_limits::max()) + { + return std::nullopt; + } + + auto gpm = graphic_product_message(); + if (gpm == nullptr) + { + return std::nullopt; + } + + std::shared_ptr descriptionBlock = + gpm->description_block(); + if (descriptionBlock == nullptr) + { + return std::nullopt; + } + + return descriptionBlock->data_value(static_cast(level)); +} + } // namespace view } // namespace qt } // namespace scwx diff --git a/scwx-qt/source/scwx/qt/view/level3_product_view.hpp b/scwx-qt/source/scwx/qt/view/level3_product_view.hpp index 2c2b58de..12313a80 100644 --- a/scwx-qt/source/scwx/qt/view/level3_product_view.hpp +++ b/scwx-qt/source/scwx/qt/view/level3_product_view.hpp @@ -36,6 +36,10 @@ class Level3ProductView : public RadarProductView common::RadarProductGroup GetRadarProductGroup() const override; std::string GetRadarProductName() const override; + std::optional + GetDataLevelCode(std::uint16_t level) const override; + std::optional GetDataValue(std::uint16_t level) const override; + void SelectProduct(const std::string& productName) override; std::vector> diff --git a/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp b/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp index 1c0d5912..5611fdf5 100644 --- a/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp @@ -605,53 +605,6 @@ Level3RadialView::GetBinLevel(const common::Coordinate& coordinate) const return level; } -std::optional -Level3RadialView::GetDataLevelCode(std::uint16_t level) const -{ - if (level > std::numeric_limits::max()) - { - return std::nullopt; - } - - auto gpm = graphic_product_message(); - if (gpm == nullptr) - { - return std::nullopt; - } - - std::shared_ptr descriptionBlock = - gpm->description_block(); - if (descriptionBlock == nullptr) - { - return std::nullopt; - } - - return descriptionBlock->data_level_code(static_cast(level)); -} - -std::optional Level3RadialView::GetDataValue(std::uint16_t level) const -{ - if (level > std::numeric_limits::max()) - { - return std::nullopt; - } - - auto gpm = graphic_product_message(); - if (gpm == nullptr) - { - return std::nullopt; - } - - std::shared_ptr descriptionBlock = - gpm->description_block(); - if (descriptionBlock == nullptr) - { - return std::nullopt; - } - - return descriptionBlock->data_value(static_cast(level)); -} - std::shared_ptr Level3RadialView::Create( const std::string& product, std::shared_ptr radarProductManager) diff --git a/scwx-qt/source/scwx/qt/view/level3_radial_view.hpp b/scwx-qt/source/scwx/qt/view/level3_radial_view.hpp index b7b8e4d1..f99f4e63 100644 --- a/scwx-qt/source/scwx/qt/view/level3_radial_view.hpp +++ b/scwx-qt/source/scwx/qt/view/level3_radial_view.hpp @@ -33,9 +33,6 @@ class Level3RadialView : public Level3ProductView std::optional GetBinLevel(const common::Coordinate& coordinate) const override; - std::optional - GetDataLevelCode(std::uint16_t level) const override; - std::optional GetDataValue(std::uint16_t level) const override; static std::shared_ptr Create(const std::string& product, diff --git a/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp b/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp index 77d431a8..d098cd3d 100644 --- a/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp @@ -360,21 +360,6 @@ Level3RasterView::GetBinLevel(const common::Coordinate& coordinate) const return std::nullopt; } -std::optional -Level3RasterView::GetDataLevelCode(std::uint16_t level) const -{ - // TODO - Q_UNUSED(level); - return std::nullopt; -} - -std::optional Level3RasterView::GetDataValue(std::uint16_t level) const -{ - // TODO - Q_UNUSED(level); - return std::nullopt; -} - std::shared_ptr Level3RasterView::Create( const std::string& product, std::shared_ptr radarProductManager) diff --git a/scwx-qt/source/scwx/qt/view/level3_raster_view.hpp b/scwx-qt/source/scwx/qt/view/level3_raster_view.hpp index 7bb062ed..869b7958 100644 --- a/scwx-qt/source/scwx/qt/view/level3_raster_view.hpp +++ b/scwx-qt/source/scwx/qt/view/level3_raster_view.hpp @@ -35,9 +35,6 @@ class Level3RasterView : public Level3ProductView std::optional GetBinLevel(const common::Coordinate& coordinate) const override; - std::optional - GetDataLevelCode(std::uint16_t level) const override; - std::optional GetDataValue(std::uint16_t level) const override; static std::shared_ptr Create(const std::string& product,