mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Ref T171, Ref T136, check remote aircraft provider calls for connection
This commit is contained in:
@@ -59,10 +59,10 @@ namespace BlackCore
|
|||||||
m_remoteAircraftProviderConnections.append(
|
m_remoteAircraftProviderConnections.append(
|
||||||
m_remoteAircraftProvider->connectRemoteAircraftProviderSignals(
|
m_remoteAircraftProvider->connectRemoteAircraftProviderSignals(
|
||||||
this, // receiver must match object in bind
|
this, // receiver must match object in bind
|
||||||
std::bind(&CSimulatorCommon::onRemoteProviderAddedAircraftSituation, this, std::placeholders::_1),
|
std::bind(&CSimulatorCommon::rapOnRemoteProviderAddedAircraftSituation, this, std::placeholders::_1),
|
||||||
std::bind(&CSimulatorCommon::onRemoteProviderAddedAircraftParts, this, std::placeholders::_1, std::placeholders::_2),
|
std::bind(&CSimulatorCommon::rapOnRemoteProviderAddedAircraftParts, this, std::placeholders::_1, std::placeholders::_2),
|
||||||
std::bind(&CSimulatorCommon::onRemoteProviderRemovedAircraft, this, std::placeholders::_1),
|
std::bind(&CSimulatorCommon::rapOnRemoteProviderRemovedAircraft, this, std::placeholders::_1),
|
||||||
std::bind(&CSimulatorCommon::onRecalculatedRenderedAircraft, this, std::placeholders::_1))
|
std::bind(&CSimulatorCommon::rapOnRecalculatedRenderedAircraft, this, std::placeholders::_1))
|
||||||
);
|
);
|
||||||
|
|
||||||
// timer
|
// timer
|
||||||
@@ -560,4 +560,28 @@ namespace BlackCore
|
|||||||
if (!sApp->hasWebDataServices()) { return CAirport(); }
|
if (!sApp->hasWebDataServices()) { return CAirport(); }
|
||||||
return sApp->getWebDataServices()->getAirports().findFirstByIcao(icao);
|
return sApp->getWebDataServices()->getAirports().findFirstByIcao(icao);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSimulatorCommon::rapOnRecalculatedRenderedAircraft(const CAirspaceAircraftSnapshot &snapshot)
|
||||||
|
{
|
||||||
|
if (!this->isConnected()) return;
|
||||||
|
this->onRecalculatedRenderedAircraft(snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimulatorCommon::rapOnRemoteProviderAddedAircraftSituation(const CAircraftSituation &situation)
|
||||||
|
{
|
||||||
|
if (!this->isConnected()) return;
|
||||||
|
this->onRemoteProviderAddedAircraftSituation(situation);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimulatorCommon::rapOnRemoteProviderAddedAircraftParts(const CCallsign &callsign, const CAircraftParts &parts)
|
||||||
|
{
|
||||||
|
if (!this->isConnected()) return;
|
||||||
|
this->onRemoteProviderAddedAircraftParts(callsign, parts);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimulatorCommon::rapOnRemoteProviderRemovedAircraft(const CCallsign &callsign)
|
||||||
|
{
|
||||||
|
if (!this->isConnected()) return;
|
||||||
|
this->onRemoteProviderRemovedAircraft(callsign);
|
||||||
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -219,6 +219,12 @@ namespace BlackCore
|
|||||||
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// remote aircraft provider ("rap") bound
|
||||||
|
void rapOnRecalculatedRenderedAircraft(const BlackMisc::Simulation::CAirspaceAircraftSnapshot &snapshot);
|
||||||
|
void rapOnRemoteProviderAddedAircraftSituation(const BlackMisc::Aviation::CAircraftSituation &situation);
|
||||||
|
void rapOnRemoteProviderAddedAircraftParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftParts &parts);
|
||||||
|
void rapOnRemoteProviderRemovedAircraft(const BlackMisc::Aviation::CCallsign &callsign);
|
||||||
|
|
||||||
bool m_blinkCycle = false; //!< used for highlighting
|
bool m_blinkCycle = false; //!< used for highlighting
|
||||||
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting
|
||||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||||
|
|||||||
Reference in New Issue
Block a user