Send distance if own aircraft has been moved

This commit is contained in:
Klaus Basan
2020-04-16 23:46:40 +02:00
committed by Mat Sutcliffe
parent 8278a7d5e6
commit 668659248e
7 changed files with 32 additions and 13 deletions

View File

@@ -57,11 +57,11 @@ namespace BlackGui
ui->tvp_AircraftInRange->setAircraftMode(CSimulatedAircraftListModel::NetworkMode);
ui->tvp_AircraftInRange->configureMenu(true, true, false, true, true, true);
connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::modelDataChangedDigest, this, &CAircraftComponent::onRowCountChanged);
connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::modelDataChangedDigest, this, &CAircraftComponent::onRowCountChanged);
connect(ui->tvp_AircraftInRange, &CSimulatedAircraftView::requestTextMessageWidget, this, &CAircraftComponent::requestTextMessageWidget);
connect(ui->tvp_AirportsInRange, &CSimulatedAircraftView::modelDataChangedDigest, this, &CAircraftComponent::onRowCountChanged);
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CAircraftComponent::onConnectionStatusChanged, Qt::QueuedConnection);
connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::movedAircraft, this, &CAircraftComponent::onOwnAircraftMoved, Qt::QueuedConnection);
connect(ui->tvp_AirportsInRange, &CSimulatedAircraftView::modelDataChangedDigest, this, &CAircraftComponent::onRowCountChanged);
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CAircraftComponent::onConnectionStatusChanged, Qt::QueuedConnection);
connect(sGui->getIContextOwnAircraft(), &IContextOwnAircraft::movedAircraft, this, &CAircraftComponent::onOwnAircraftMoved, Qt::QueuedConnection);
connect(&m_updateTimer, &QTimer::timeout, this, &CAircraftComponent::update);
this->onSettingsChanged();
@@ -187,8 +187,9 @@ namespace BlackGui
m_updateTimer.setInterval(ms);
}
void CAircraftComponent::onOwnAircraftMoved()
void CAircraftComponent::onOwnAircraftMoved(const CLength &distance)
{
Q_UNUSED(distance)
this->updateViews();
}
} // namespace

View File

@@ -92,7 +92,7 @@ namespace BlackGui
void onSettingsChanged();
//! Own aircraft has been moved
void onOwnAircraftMoved();
void onOwnAircraftMoved(const BlackMisc::PhysicalQuantities::CLength &distance);
QScopedPointer<Ui::CAircraftComponent> ui;
BlackMisc::CSettingReadOnly<BlackGui::Settings::TViewUpdateSettings> m_settings { this, &CAircraftComponent::onSettingsChanged }; //!< settings changed