mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:40:05 +00:00
Fix radar product manager to view signals on manager change
This commit is contained in:
parent
f1a5d4a744
commit
6c7a02ff85
6 changed files with 39 additions and 5 deletions
|
|
@ -106,7 +106,13 @@ Level2ProductView::Level2ProductView(
|
|||
RadarProductView(radarProductManager),
|
||||
p(std::make_unique<Level2ProductViewImpl>(product))
|
||||
{
|
||||
connect(radarProductManager.get(),
|
||||
ConnectRadarProductManager();
|
||||
}
|
||||
Level2ProductView::~Level2ProductView() = default;
|
||||
|
||||
void Level2ProductView::ConnectRadarProductManager()
|
||||
{
|
||||
connect(radar_product_manager().get(),
|
||||
&manager::RadarProductManager::DataReloaded,
|
||||
this,
|
||||
[this](std::shared_ptr<types::RadarProductRecord> record)
|
||||
|
|
@ -121,7 +127,14 @@ Level2ProductView::Level2ProductView(
|
|||
}
|
||||
});
|
||||
}
|
||||
Level2ProductView::~Level2ProductView() = default;
|
||||
|
||||
void Level2ProductView::DisconnectRadarProductManager()
|
||||
{
|
||||
disconnect(radar_product_manager().get(),
|
||||
&manager::RadarProductManager::DataReloaded,
|
||||
this,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
Level2ProductView::color_table() const
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ public:
|
|||
std::shared_ptr<manager::RadarProductManager> radarProductManager);
|
||||
|
||||
protected:
|
||||
void ConnectRadarProductManager() override;
|
||||
void DisconnectRadarProductManager() override;
|
||||
void UpdateColorTable() override;
|
||||
|
||||
protected slots:
|
||||
|
|
|
|||
|
|
@ -59,7 +59,13 @@ Level3ProductView::Level3ProductView(
|
|||
RadarProductView(radarProductManager),
|
||||
p(std::make_unique<Level3ProductViewImpl>(product))
|
||||
{
|
||||
connect(radarProductManager.get(),
|
||||
ConnectRadarProductManager();
|
||||
}
|
||||
Level3ProductView::~Level3ProductView() = default;
|
||||
|
||||
void Level3ProductView::ConnectRadarProductManager()
|
||||
{
|
||||
connect(radar_product_manager().get(),
|
||||
&manager::RadarProductManager::DataReloaded,
|
||||
this,
|
||||
[this](std::shared_ptr<types::RadarProductRecord> record)
|
||||
|
|
@ -75,7 +81,14 @@ Level3ProductView::Level3ProductView(
|
|||
}
|
||||
});
|
||||
}
|
||||
Level3ProductView::~Level3ProductView() = default;
|
||||
|
||||
void Level3ProductView::DisconnectRadarProductManager()
|
||||
{
|
||||
disconnect(radar_product_manager().get(),
|
||||
&manager::RadarProductManager::DataReloaded,
|
||||
this,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
Level3ProductView::color_table() const
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ protected:
|
|||
void set_graphic_product_message(
|
||||
std::shared_ptr<wsr88d::rpg::GraphicProductMessage> gpm);
|
||||
|
||||
void ConnectRadarProductManager() override;
|
||||
void DisconnectRadarProductManager() override;
|
||||
void UpdateColorTable() override;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -99,7 +99,9 @@ std::mutex& RadarProductView::sweep_mutex()
|
|||
void RadarProductView::set_radar_product_manager(
|
||||
std::shared_ptr<manager::RadarProductManager> radarProductManager)
|
||||
{
|
||||
DisconnectRadarProductManager();
|
||||
p->radarProductManager_ = radarProductManager;
|
||||
ConnectRadarProductManager();
|
||||
}
|
||||
|
||||
void RadarProductView::Initialize()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ public:
|
|||
GetCfpMomentData() const;
|
||||
|
||||
protected:
|
||||
virtual void UpdateColorTable() = 0;
|
||||
virtual void ConnectRadarProductManager() = 0;
|
||||
virtual void DisconnectRadarProductManager() = 0;
|
||||
virtual void UpdateColorTable() = 0;
|
||||
|
||||
protected slots:
|
||||
virtual void ComputeSweep();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue