mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:10:06 +00:00
Synchronize map movements
This commit is contained in:
parent
372848c25f
commit
dd452a0e2c
3 changed files with 108 additions and 4 deletions
|
|
@ -54,6 +54,13 @@ public:
|
|||
std::vector<float> elevationCuts_;
|
||||
|
||||
bool resizeElevationButtons_;
|
||||
|
||||
public slots:
|
||||
void UpdateMapParameters(double latitude,
|
||||
double longitude,
|
||||
double zoom,
|
||||
double bearing,
|
||||
double pitch);
|
||||
};
|
||||
|
||||
MainWindow::MainWindow(QWidget* parent) :
|
||||
|
|
@ -203,6 +210,11 @@ void MainWindowImpl::ConfigureMapLayout()
|
|||
if (maps_.at(mapIndex) == nullptr)
|
||||
{
|
||||
maps_[mapIndex] = new map::MapWidget(settings_);
|
||||
|
||||
connect(maps_[mapIndex],
|
||||
&map::MapWidget::MapParametersChanged,
|
||||
this,
|
||||
&MainWindowImpl::UpdateMapParameters);
|
||||
}
|
||||
|
||||
hs->addWidget(maps_[mapIndex]);
|
||||
|
|
@ -278,6 +290,15 @@ void MainWindowImpl::UpdateElevationSelection(float elevation)
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindowImpl::UpdateMapParameters(
|
||||
double latitude, double longitude, double zoom, double bearing, double pitch)
|
||||
{
|
||||
for (map::MapWidget* map : maps_)
|
||||
{
|
||||
map->SetMapParameters(latitude, longitude, zoom, bearing, pitch);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindowImpl::UpdateRadarProductSettings(map::MapWidget* mapWidget)
|
||||
{
|
||||
float currentElevation = mapWidget->GetElevation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue