mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:30:05 +00:00
Load radar data asynchronously
This commit is contained in:
parent
803a25e884
commit
3625515b8a
6 changed files with 71 additions and 13 deletions
|
|
@ -77,11 +77,6 @@ MapWidget::MapWidget(const QMapboxGLSettings& settings) :
|
|||
setFocusPolicy(Qt::StrongFocus);
|
||||
|
||||
p->radarProductManager_->Initialize();
|
||||
QString ar2vFile = qgetenv("AR2V_FILE");
|
||||
if (!ar2vFile.isEmpty())
|
||||
{
|
||||
p->radarProductManager_->LoadLevel2Data(ar2vFile.toUtf8().constData());
|
||||
}
|
||||
|
||||
SelectRadarProduct(common::Level2Product::Reflectivity);
|
||||
}
|
||||
|
|
@ -110,6 +105,19 @@ void MapWidget::SelectRadarProduct(common::Level2Product product)
|
|||
p->radarProductView_->LoadColorTable(colorTable);
|
||||
}
|
||||
|
||||
connect(
|
||||
p->radarProductView_.get(),
|
||||
&view::RadarProductView::ColorTableUpdated,
|
||||
this,
|
||||
[&]() { update(); },
|
||||
Qt::QueuedConnection);
|
||||
connect(
|
||||
p->radarProductView_.get(),
|
||||
&view::RadarProductView::SweepComputed,
|
||||
this,
|
||||
[&]() { update(); },
|
||||
Qt::QueuedConnection);
|
||||
|
||||
if (p->map_ != nullptr)
|
||||
{
|
||||
AddLayers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue