mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:00:04 +00:00
Update radar product and elevation selection when active map changes
This commit is contained in:
parent
b78011a2d3
commit
337296ac3c
8 changed files with 159 additions and 31 deletions
|
|
@ -116,17 +116,59 @@ MapWidget::~MapWidget()
|
|||
|
||||
float MapWidget::GetElevation() const
|
||||
{
|
||||
return p->context_->radarProductView_->elevation();
|
||||
if (p->context_->radarProductView_ != nullptr)
|
||||
{
|
||||
return p->context_->radarProductView_->elevation();
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<float> MapWidget::GetElevationCuts() const
|
||||
{
|
||||
return p->context_->radarProductView_->GetElevationCuts();
|
||||
if (p->context_->radarProductView_ != nullptr)
|
||||
{
|
||||
return p->context_->radarProductView_->GetElevationCuts();
|
||||
}
|
||||
else
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
common::RadarProductGroup MapWidget::GetRadarProductGroup() const
|
||||
{
|
||||
if (p->context_->radarProductView_ != nullptr)
|
||||
{
|
||||
return p->context_->radarProductView_->GetRadarProductGroup();
|
||||
}
|
||||
else
|
||||
{
|
||||
return common::RadarProductGroup::Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
std::string MapWidget::GetRadarProductName() const
|
||||
{
|
||||
|
||||
if (p->context_->radarProductView_ != nullptr)
|
||||
{
|
||||
return p->context_->radarProductView_->GetRadarProductName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
void MapWidget::SelectElevation(float elevation)
|
||||
{
|
||||
p->context_->radarProductView_->SelectElevation(elevation);
|
||||
if (p->context_->radarProductView_ != nullptr)
|
||||
{
|
||||
p->context_->radarProductView_->SelectElevation(elevation);
|
||||
}
|
||||
}
|
||||
|
||||
void MapWidget::SelectRadarProduct(common::Level2Product product)
|
||||
|
|
|
|||
|
|
@ -31,16 +31,19 @@ public:
|
|||
explicit MapWidget(const QMapboxGLSettings&);
|
||||
~MapWidget();
|
||||
|
||||
float GetElevation() const;
|
||||
std::vector<float> GetElevationCuts() const;
|
||||
void SelectElevation(float elevation);
|
||||
void SelectRadarProduct(common::Level2Product product);
|
||||
void SetActive(bool isActive);
|
||||
void SetMapParameters(double latitude,
|
||||
double longitude,
|
||||
double zoom,
|
||||
double bearing,
|
||||
double pitch);
|
||||
float GetElevation() const;
|
||||
std::vector<float> GetElevationCuts() const;
|
||||
common::RadarProductGroup GetRadarProductGroup() const;
|
||||
std::string GetRadarProductName() const;
|
||||
|
||||
void SelectElevation(float elevation);
|
||||
void SelectRadarProduct(common::Level2Product product);
|
||||
void SetActive(bool isActive);
|
||||
void SetMapParameters(double latitude,
|
||||
double longitude,
|
||||
double zoom,
|
||||
double bearing,
|
||||
double pitch);
|
||||
|
||||
private:
|
||||
void changeStyle();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue