mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:10:05 +00:00 
			
		
		
		
	Allow radar product manager to be updated in a view
This commit is contained in:
		
							parent
							
								
									c9936a5ea4
								
							
						
					
					
						commit
						5dd1a327c8
					
				
					 11 changed files with 87 additions and 53 deletions
				
			
		|  | @ -67,12 +67,15 @@ class RadarProductManagerImpl | ||||||
| public: | public: | ||||||
|    struct ProviderManager |    struct ProviderManager | ||||||
|    { |    { | ||||||
|       explicit ProviderManager(common::RadarProductGroup group) : |       explicit ProviderManager(const std::string&        radarId, | ||||||
|           ProviderManager(group, "???") |                                common::RadarProductGroup group) : | ||||||
|  |           ProviderManager(radarId, group, "???") | ||||||
|       { |       { | ||||||
|       } |       } | ||||||
|       explicit ProviderManager(common::RadarProductGroup group, |       explicit ProviderManager(const std::string&        radarId, | ||||||
|  |                                common::RadarProductGroup group, | ||||||
|                                const std::string&        product) : |                                const std::string&        product) : | ||||||
|  |           radarId_ {radarId}, | ||||||
|           group_ {group}, |           group_ {group}, | ||||||
|           product_ {product}, |           product_ {product}, | ||||||
|           refreshEnabled_ {false}, |           refreshEnabled_ {false}, | ||||||
|  | @ -87,6 +90,7 @@ public: | ||||||
| 
 | 
 | ||||||
|       void Disable(); |       void Disable(); | ||||||
| 
 | 
 | ||||||
|  |       const std::string                             radarId_; | ||||||
|       const common::RadarProductGroup               group_; |       const common::RadarProductGroup               group_; | ||||||
|       const std::string                             product_; |       const std::string                             product_; | ||||||
|       bool                                          refreshEnabled_; |       bool                                          refreshEnabled_; | ||||||
|  | @ -108,8 +112,8 @@ public: | ||||||
|        level3ProductRecordsMap_ {}, |        level3ProductRecordsMap_ {}, | ||||||
|        level2ProductRecordMutex_ {}, |        level2ProductRecordMutex_ {}, | ||||||
|        level3ProductRecordMutex_ {}, |        level3ProductRecordMutex_ {}, | ||||||
|        level2ProviderManager_ { |        level2ProviderManager_ {std::make_shared<ProviderManager>( | ||||||
|           std::make_shared<ProviderManager>(common::RadarProductGroup::Level2)}, |           radarId_, common::RadarProductGroup::Level2)}, | ||||||
|        level3ProviderManagerMap_ {}, |        level3ProviderManagerMap_ {}, | ||||||
|        level3ProviderManagerMutex_ {}, |        level3ProviderManagerMutex_ {}, | ||||||
|        initializeMutex_ {}, |        initializeMutex_ {}, | ||||||
|  | @ -173,7 +177,7 @@ public: | ||||||
|                   std::shared_ptr<request::NexradFileRequest> request, |                   std::shared_ptr<request::NexradFileRequest> request, | ||||||
|                   std::mutex&                                 mutex); |                   std::mutex&                                 mutex); | ||||||
| 
 | 
 | ||||||
|    std::string radarId_; |    const std::string radarId_; | ||||||
|    bool              initialized_; |    bool              initialized_; | ||||||
|    bool              level3ProductsInitialized_; |    bool              level3ProductsInitialized_; | ||||||
| 
 | 
 | ||||||
|  | @ -215,12 +219,15 @@ std::string RadarProductManagerImpl::ProviderManager::name() const | ||||||
| 
 | 
 | ||||||
|    if (group_ == common::RadarProductGroup::Level3) |    if (group_ == common::RadarProductGroup::Level3) | ||||||
|    { |    { | ||||||
|       name = std::format( |       name = std::format("{}, {}, {}", | ||||||
|          "{}, {}", common::GetRadarProductGroupName(group_), product_); |                          radarId_, | ||||||
|  |                          common::GetRadarProductGroupName(group_), | ||||||
|  |                          product_); | ||||||
|    } |    } | ||||||
|    else |    else | ||||||
|    { |    { | ||||||
|       name = common::GetRadarProductGroupName(group_); |       name = std::format( | ||||||
|  |          "{}, {}", radarId_, common::GetRadarProductGroupName(group_)); | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    return name; |    return name; | ||||||
|  | @ -380,7 +387,7 @@ RadarProductManagerImpl::GetLevel3ProviderManager(const std::string& product) | ||||||
|          std::forward_as_tuple(product), |          std::forward_as_tuple(product), | ||||||
|          std::forward_as_tuple( |          std::forward_as_tuple( | ||||||
|             std::make_shared<RadarProductManagerImpl::ProviderManager>( |             std::make_shared<RadarProductManagerImpl::ProviderManager>( | ||||||
|                common::RadarProductGroup::Level3, product))); |                radarId_, common::RadarProductGroup::Level3, product))); | ||||||
|       level3ProviderManagerMap_.at(product)->provider_ = |       level3ProviderManagerMap_.at(product)->provider_ = | ||||||
|          provider::NexradDataProviderFactory::CreateLevel3DataProvider(radarId_, |          provider::NexradDataProviderFactory::CreateLevel3DataProvider(radarId_, | ||||||
|                                                                        product); |                                                                        product); | ||||||
|  |  | ||||||
|  | @ -41,11 +41,8 @@ static const std::unordered_map<common::Level2Product, | ||||||
| class Level2ProductViewImpl | class Level2ProductViewImpl | ||||||
| { | { | ||||||
| public: | public: | ||||||
|    explicit Level2ProductViewImpl( |    explicit Level2ProductViewImpl(common::Level2Product product) : | ||||||
|       common::Level2Product                         product, |  | ||||||
|       std::shared_ptr<manager::RadarProductManager> radarProductManager) : |  | ||||||
|        product_ {product}, |        product_ {product}, | ||||||
|        radarProductManager_ {radarProductManager}, |  | ||||||
|        selectedElevation_ {0.0f}, |        selectedElevation_ {0.0f}, | ||||||
|        selectedTime_ {}, |        selectedTime_ {}, | ||||||
|        elevationScan_ {nullptr}, |        elevationScan_ {nullptr}, | ||||||
|  | @ -74,7 +71,6 @@ public: | ||||||
| 
 | 
 | ||||||
|    common::Level2Product      product_; |    common::Level2Product      product_; | ||||||
|    wsr88d::rda::DataBlockType dataBlockType_; |    wsr88d::rda::DataBlockType dataBlockType_; | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager_; |  | ||||||
| 
 | 
 | ||||||
|    float                                 selectedElevation_; |    float                                 selectedElevation_; | ||||||
|    std::chrono::system_clock::time_point selectedTime_; |    std::chrono::system_clock::time_point selectedTime_; | ||||||
|  | @ -109,7 +105,8 @@ public: | ||||||
| Level2ProductView::Level2ProductView( | Level2ProductView::Level2ProductView( | ||||||
|    common::Level2Product                         product, |    common::Level2Product                         product, | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) : |    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|     p(std::make_unique<Level2ProductViewImpl>(product, radarProductManager)) |     RadarProductView(radarProductManager), | ||||||
|  |     p(std::make_unique<Level2ProductViewImpl>(product)) | ||||||
| { | { | ||||||
| } | } | ||||||
| Level2ProductView::~Level2ProductView() = default; | Level2ProductView::~Level2ProductView() = default; | ||||||
|  | @ -375,9 +372,12 @@ void Level2ProductView::ComputeSweep() | ||||||
| 
 | 
 | ||||||
|    std::scoped_lock sweepLock(sweep_mutex()); |    std::scoped_lock sweepLock(sweep_mutex()); | ||||||
| 
 | 
 | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager = | ||||||
|  |       radar_product_manager(); | ||||||
|  | 
 | ||||||
|    std::shared_ptr<wsr88d::rda::ElevationScan> radarData; |    std::shared_ptr<wsr88d::rda::ElevationScan> radarData; | ||||||
|    std::tie(radarData, p->elevationCut_, p->elevationCuts_) = |    std::tie(radarData, p->elevationCut_, p->elevationCuts_) = | ||||||
|       p->radarProductManager_->GetLevel2Data( |       radarProductManager->GetLevel2Data( | ||||||
|          p->dataBlockType_, p->selectedElevation_, p->selectedTime_); |          p->dataBlockType_, p->selectedElevation_, p->selectedTime_); | ||||||
|    if (radarData == nullptr || radarData == p->elevationScan_) |    if (radarData == nullptr || radarData == p->elevationScan_) | ||||||
|    { |    { | ||||||
|  | @ -390,7 +390,7 @@ void Level2ProductView::ComputeSweep() | ||||||
|          common::RadialSize::_0_5Degree : |          common::RadialSize::_0_5Degree : | ||||||
|          common::RadialSize::_1Degree; |          common::RadialSize::_1Degree; | ||||||
|    const std::vector<float>& coordinates = |    const std::vector<float>& coordinates = | ||||||
|       p->radarProductManager_->coordinates(radialSize); |       radarProductManager->coordinates(radialSize); | ||||||
| 
 | 
 | ||||||
|    auto radarData0      = (*radarData)[0]; |    auto radarData0      = (*radarData)[0]; | ||||||
|    auto momentData0     = radarData0->moment_data_block(p->dataBlockType_); |    auto momentData0     = radarData0->moment_data_block(p->dataBlockType_); | ||||||
|  | @ -492,7 +492,7 @@ void Level2ProductView::ComputeSweep() | ||||||
| 
 | 
 | ||||||
|       // Compute gate size (number of base 250m gates per bin)
 |       // Compute gate size (number of base 250m gates per bin)
 | ||||||
|       const uint16_t gateSizeMeters = |       const uint16_t gateSizeMeters = | ||||||
|          static_cast<uint16_t>(p->radarProductManager_->gate_size()); |          static_cast<uint16_t>(radarProductManager->gate_size()); | ||||||
|       const uint16_t gateSize = |       const uint16_t gateSize = | ||||||
|          std::max<uint16_t>(1, dataMomentInterval / gateSizeMeters); |          std::max<uint16_t>(1, dataMomentInterval / gateSizeMeters); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
| 
 | 
 | ||||||
| #include <scwx/common/color_table.hpp> | #include <scwx/common/color_table.hpp> | ||||||
| #include <scwx/common/products.hpp> | #include <scwx/common/products.hpp> | ||||||
| #include <scwx/qt/manager/radar_product_manager.hpp> |  | ||||||
| #include <scwx/qt/view/radar_product_view.hpp> | #include <scwx/qt/view/radar_product_view.hpp> | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
|  |  | ||||||
|  | @ -53,7 +53,10 @@ public: | ||||||
|    float                               savedOffset_; |    float                               savedOffset_; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| Level3ProductView::Level3ProductView(const std::string& product) : | Level3ProductView::Level3ProductView( | ||||||
|  |    const std::string&                            product, | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|  |     RadarProductView(radarProductManager), | ||||||
|     p(std::make_unique<Level3ProductViewImpl>(product)) |     p(std::make_unique<Level3ProductViewImpl>(product)) | ||||||
| { | { | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -22,7 +22,9 @@ class Level3ProductView : public RadarProductView | ||||||
|    Q_OBJECT |    Q_OBJECT | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|    explicit Level3ProductView(const std::string& product); |    explicit Level3ProductView( | ||||||
|  |       const std::string&                            product, | ||||||
|  |       std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||||
|    virtual ~Level3ProductView(); |    virtual ~Level3ProductView(); | ||||||
| 
 | 
 | ||||||
|    const std::vector<boost::gil::rgba8_pixel_t>& color_table() const override; |    const std::vector<boost::gil::rgba8_pixel_t>& color_table() const override; | ||||||
|  |  | ||||||
|  | @ -26,9 +26,7 @@ static constexpr uint32_t VALUES_PER_VERTEX = 2u; | ||||||
| class Level3RadialViewImpl | class Level3RadialViewImpl | ||||||
| { | { | ||||||
| public: | public: | ||||||
|    explicit Level3RadialViewImpl( |    explicit Level3RadialViewImpl() : | ||||||
|       std::shared_ptr<manager::RadarProductManager> radarProductManager) : |  | ||||||
|        radarProductManager_ {radarProductManager}, |  | ||||||
|        selectedTime_ {}, |        selectedTime_ {}, | ||||||
|        latitude_ {}, |        latitude_ {}, | ||||||
|        longitude_ {}, |        longitude_ {}, | ||||||
|  | @ -39,8 +37,6 @@ public: | ||||||
|    } |    } | ||||||
|    ~Level3RadialViewImpl() = default; |    ~Level3RadialViewImpl() = default; | ||||||
| 
 | 
 | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager_; |  | ||||||
| 
 |  | ||||||
|    std::chrono::system_clock::time_point selectedTime_; |    std::chrono::system_clock::time_point selectedTime_; | ||||||
| 
 | 
 | ||||||
|    std::vector<float>   vertices_; |    std::vector<float>   vertices_; | ||||||
|  | @ -57,8 +53,8 @@ public: | ||||||
| Level3RadialView::Level3RadialView( | Level3RadialView::Level3RadialView( | ||||||
|    const std::string&                            product, |    const std::string&                            product, | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) : |    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|     Level3ProductView(product), |     Level3ProductView(product, radarProductManager), | ||||||
|     p(std::make_unique<Level3RadialViewImpl>(radarProductManager)) |     p(std::make_unique<Level3RadialViewImpl>()) | ||||||
| { | { | ||||||
| } | } | ||||||
| Level3RadialView::~Level3RadialView() = default; | Level3RadialView::~Level3RadialView() = default; | ||||||
|  | @ -109,9 +105,12 @@ void Level3RadialView::ComputeSweep() | ||||||
| 
 | 
 | ||||||
|    std::scoped_lock sweepLock(sweep_mutex()); |    std::scoped_lock sweepLock(sweep_mutex()); | ||||||
| 
 | 
 | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager = | ||||||
|  |       radar_product_manager(); | ||||||
|  | 
 | ||||||
|    // Retrieve message from Radar Product Manager
 |    // Retrieve message from Radar Product Manager
 | ||||||
|    std::shared_ptr<wsr88d::rpg::Level3Message> message = |    std::shared_ptr<wsr88d::rpg::Level3Message> message = | ||||||
|       p->radarProductManager_->GetLevel3Data(GetRadarProductName(), |       radarProductManager->GetLevel3Data(GetRadarProductName(), | ||||||
|                                          p->selectedTime_); |                                          p->selectedTime_); | ||||||
|    if (message == nullptr) |    if (message == nullptr) | ||||||
|    { |    { | ||||||
|  | @ -218,7 +217,7 @@ void Level3RadialView::ComputeSweep() | ||||||
|          common::RadialSize::_0_5Degree : |          common::RadialSize::_0_5Degree : | ||||||
|          common::RadialSize::_1Degree; |          common::RadialSize::_1Degree; | ||||||
|    const std::vector<float>& coordinates = |    const std::vector<float>& coordinates = | ||||||
|       p->radarProductManager_->coordinates(radialSize); |       radarProductManager->coordinates(radialSize); | ||||||
| 
 | 
 | ||||||
|    // There should be a positive number of range bins in radial data
 |    // There should be a positive number of range bins in radial data
 | ||||||
|    const uint16_t gates = radialData->number_of_range_bins(); |    const uint16_t gates = radialData->number_of_range_bins(); | ||||||
|  | @ -270,7 +269,7 @@ void Level3RadialView::ComputeSweep() | ||||||
|       const uint16_t gateSize = std::max<uint16_t>( |       const uint16_t gateSize = std::max<uint16_t>( | ||||||
|          1, |          1, | ||||||
|          dataMomentInterval / |          dataMomentInterval / | ||||||
|             static_cast<uint16_t>(p->radarProductManager_->gate_size())); |             static_cast<uint16_t>(radarProductManager->gate_size())); | ||||||
| 
 | 
 | ||||||
|       // Compute gate range [startGate, endGate)
 |       // Compute gate range [startGate, endGate)
 | ||||||
|       const uint16_t startGate = 0; |       const uint16_t startGate = 0; | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <scwx/qt/view/level3_product_view.hpp> | #include <scwx/qt/view/level3_product_view.hpp> | ||||||
| #include <scwx/qt/manager/radar_product_manager.hpp> |  | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
| #include <memory> | #include <memory> | ||||||
|  |  | ||||||
|  | @ -26,9 +26,7 @@ static constexpr uint32_t VALUES_PER_VERTEX = 2u; | ||||||
| class Level3RasterViewImpl | class Level3RasterViewImpl | ||||||
| { | { | ||||||
| public: | public: | ||||||
|    explicit Level3RasterViewImpl( |    explicit Level3RasterViewImpl() : | ||||||
|       std::shared_ptr<manager::RadarProductManager> radarProductManager) : |  | ||||||
|        radarProductManager_ {radarProductManager}, |  | ||||||
|        selectedTime_ {}, |        selectedTime_ {}, | ||||||
|        latitude_ {}, |        latitude_ {}, | ||||||
|        longitude_ {}, |        longitude_ {}, | ||||||
|  | @ -39,8 +37,6 @@ public: | ||||||
|    } |    } | ||||||
|    ~Level3RasterViewImpl() = default; |    ~Level3RasterViewImpl() = default; | ||||||
| 
 | 
 | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager_; |  | ||||||
| 
 |  | ||||||
|    std::chrono::system_clock::time_point selectedTime_; |    std::chrono::system_clock::time_point selectedTime_; | ||||||
| 
 | 
 | ||||||
|    std::vector<float>   vertices_; |    std::vector<float>   vertices_; | ||||||
|  | @ -57,8 +53,8 @@ public: | ||||||
| Level3RasterView::Level3RasterView( | Level3RasterView::Level3RasterView( | ||||||
|    const std::string&                            product, |    const std::string&                            product, | ||||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) : |    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|     Level3ProductView(product), |     Level3ProductView(product, radarProductManager), | ||||||
|     p(std::make_unique<Level3RasterViewImpl>(radarProductManager)) |     p(std::make_unique<Level3RasterViewImpl>()) | ||||||
| { | { | ||||||
| } | } | ||||||
| Level3RasterView::~Level3RasterView() = default; | Level3RasterView::~Level3RasterView() = default; | ||||||
|  | @ -109,9 +105,12 @@ void Level3RasterView::ComputeSweep() | ||||||
| 
 | 
 | ||||||
|    std::scoped_lock sweepLock(sweep_mutex()); |    std::scoped_lock sweepLock(sweep_mutex()); | ||||||
| 
 | 
 | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager = | ||||||
|  |       radar_product_manager(); | ||||||
|  | 
 | ||||||
|    // Retrieve message from Radar Product Manager
 |    // Retrieve message from Radar Product Manager
 | ||||||
|    std::shared_ptr<wsr88d::rpg::Level3Message> message = |    std::shared_ptr<wsr88d::rpg::Level3Message> message = | ||||||
|       p->radarProductManager_->GetLevel3Data(GetRadarProductName(), |       radarProductManager->GetLevel3Data(GetRadarProductName(), | ||||||
|                                          p->selectedTime_); |                                          p->selectedTime_); | ||||||
|    if (message == nullptr) |    if (message == nullptr) | ||||||
|    { |    { | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <scwx/qt/view/level3_product_view.hpp> | #include <scwx/qt/view/level3_product_view.hpp> | ||||||
| #include <scwx/qt/manager/radar_product_manager.hpp> |  | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
| #include <memory> | #include <memory> | ||||||
|  |  | ||||||
|  | @ -26,15 +26,24 @@ static const uint16_t DEFAULT_COLOR_TABLE_MAX = 255u; | ||||||
| class RadarProductViewImpl | class RadarProductViewImpl | ||||||
| { | { | ||||||
| public: | public: | ||||||
|    explicit RadarProductViewImpl() : initialized_ {false}, sweepMutex_ {} {} |    explicit RadarProductViewImpl( | ||||||
|  |       std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|  |        initialized_ {false}, | ||||||
|  |        sweepMutex_ {}, | ||||||
|  |        radarProductManager_ {radarProductManager} | ||||||
|  |    { | ||||||
|  |    } | ||||||
|    ~RadarProductViewImpl() = default; |    ~RadarProductViewImpl() = default; | ||||||
| 
 | 
 | ||||||
|    bool       initialized_; |    bool       initialized_; | ||||||
|    std::mutex sweepMutex_; |    std::mutex sweepMutex_; | ||||||
|  | 
 | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager_; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| RadarProductView::RadarProductView() : | RadarProductView::RadarProductView( | ||||||
|     p(std::make_unique<RadarProductViewImpl>()) {}; |    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||||
|  |     p(std::make_unique<RadarProductViewImpl>(radarProductManager)) {}; | ||||||
| RadarProductView::~RadarProductView() = default; | RadarProductView::~RadarProductView() = default; | ||||||
| 
 | 
 | ||||||
| const std::vector<boost::gil::rgba8_pixel_t>& | const std::vector<boost::gil::rgba8_pixel_t>& | ||||||
|  | @ -58,6 +67,12 @@ float RadarProductView::elevation() const | ||||||
|    return 0.0f; |    return 0.0f; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | std::shared_ptr<manager::RadarProductManager> | ||||||
|  | RadarProductView::radar_product_manager() const | ||||||
|  | { | ||||||
|  |    return p->radarProductManager_; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| float RadarProductView::range() const | float RadarProductView::range() const | ||||||
| { | { | ||||||
|    return 0.0f; |    return 0.0f; | ||||||
|  | @ -73,6 +88,12 @@ std::mutex& RadarProductView::sweep_mutex() | ||||||
|    return p->sweepMutex_; |    return p->sweepMutex_; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void RadarProductView::set_radar_product_manager( | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radarProductManager) | ||||||
|  | { | ||||||
|  |    p->radarProductManager_ = radarProductManager; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void RadarProductView::Initialize() | void RadarProductView::Initialize() | ||||||
| { | { | ||||||
|    ComputeSweep(); |    ComputeSweep(); | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <scwx/common/color_table.hpp> | #include <scwx/common/color_table.hpp> | ||||||
| #include <scwx/common/products.hpp> | #include <scwx/common/products.hpp> | ||||||
|  | #include <scwx/qt/manager/radar_product_manager.hpp> | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
| #include <memory> | #include <memory> | ||||||
|  | @ -24,7 +25,8 @@ class RadarProductView : public QObject | ||||||
|    Q_OBJECT |    Q_OBJECT | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|    explicit RadarProductView(); |    explicit RadarProductView( | ||||||
|  |       std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||||
|    virtual ~RadarProductView(); |    virtual ~RadarProductView(); | ||||||
| 
 | 
 | ||||||
|    virtual const std::vector<boost::gil::rgba8_pixel_t>& color_table() const; |    virtual const std::vector<boost::gil::rgba8_pixel_t>& color_table() const; | ||||||
|  | @ -36,8 +38,12 @@ public: | ||||||
|    virtual uint16_t                              vcp() const      = 0; |    virtual uint16_t                              vcp() const      = 0; | ||||||
|    virtual const std::vector<float>&             vertices() const = 0; |    virtual const std::vector<float>&             vertices() const = 0; | ||||||
| 
 | 
 | ||||||
|  |    std::shared_ptr<manager::RadarProductManager> radar_product_manager() const; | ||||||
|    std::mutex&                                   sweep_mutex(); |    std::mutex&                                   sweep_mutex(); | ||||||
| 
 | 
 | ||||||
|  |    void set_radar_product_manager( | ||||||
|  |       std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||||
|  | 
 | ||||||
|    void Initialize(); |    void Initialize(); | ||||||
|    virtual void |    virtual void | ||||||
|    LoadColorTable(std::shared_ptr<common::ColorTable> colorTable) = 0; |    LoadColorTable(std::shared_ptr<common::ColorTable> colorTable) = 0; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat