diff --git a/src/blackcore/simulatorcommon.cpp b/src/blackcore/simulatorcommon.cpp index 9fb081b44..00d6e7de4 100644 --- a/src/blackcore/simulatorcommon.cpp +++ b/src/blackcore/simulatorcommon.cpp @@ -59,10 +59,10 @@ namespace BlackCore m_remoteAircraftProviderConnections.append( m_remoteAircraftProvider->connectRemoteAircraftProviderSignals( this, // receiver must match object in bind - std::bind(&CSimulatorCommon::onRemoteProviderAddedAircraftSituation, this, std::placeholders::_1), - std::bind(&CSimulatorCommon::onRemoteProviderAddedAircraftParts, this, std::placeholders::_1, std::placeholders::_2), - std::bind(&CSimulatorCommon::onRemoteProviderRemovedAircraft, this, std::placeholders::_1), - std::bind(&CSimulatorCommon::onRecalculatedRenderedAircraft, this, std::placeholders::_1)) + std::bind(&CSimulatorCommon::rapOnRemoteProviderAddedAircraftSituation, this, std::placeholders::_1), + std::bind(&CSimulatorCommon::rapOnRemoteProviderAddedAircraftParts, this, std::placeholders::_1, std::placeholders::_2), + std::bind(&CSimulatorCommon::rapOnRemoteProviderRemovedAircraft, this, std::placeholders::_1), + std::bind(&CSimulatorCommon::rapOnRecalculatedRenderedAircraft, this, std::placeholders::_1)) ); // timer @@ -560,4 +560,28 @@ namespace BlackCore if (!sApp->hasWebDataServices()) { return CAirport(); } 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 diff --git a/src/blackcore/simulatorcommon.h b/src/blackcore/simulatorcommon.h index b215e18c9..fcbb9a68b 100644 --- a/src/blackcore/simulatorcommon.h +++ b/src/blackcore/simulatorcommon.h @@ -219,6 +219,12 @@ namespace BlackCore static BlackMisc::Simulation::CAircraftModel reverseLookupModel(const BlackMisc::Simulation::CAircraftModel &model); 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 qint64 m_highlightEndTimeMsEpoch = 0; //!< end highlighting int m_timerCounter = 0; //!< allows to calculate n seconds