mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
Prefix ps_ for some private slots
https://dev.vatsim-germany.org/boards/22/topics/1914?r=1920#message-1920
This commit is contained in:
@@ -42,11 +42,11 @@ namespace BlackCore
|
|||||||
// 4. Signal / slots
|
// 4. Signal / slots
|
||||||
connect(this->m_voice, &CVoiceVatlib::micTestFinished, this, &CContextAudio::audioTestCompleted);
|
connect(this->m_voice, &CVoiceVatlib::micTestFinished, this, &CContextAudio::audioTestCompleted);
|
||||||
connect(this->m_voice, &CVoiceVatlib::squelchTestFinished, this, &CContextAudio::audioTestCompleted);
|
connect(this->m_voice, &CVoiceVatlib::squelchTestFinished, this, &CContextAudio::audioTestCompleted);
|
||||||
connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::connectionStatusChanged);
|
connect(this->m_voice, &CVoiceVatlib::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged);
|
||||||
if (this->getIContextApplication()) this->connect(this->m_voice, &IVoice::statusMessage, this->getIContextApplication(), &IContextApplication::sendStatusMessage);
|
if (this->getIContextApplication()) this->connect(this->m_voice, &IVoice::statusMessage, this->getIContextApplication(), &IContextApplication::sendStatusMessage);
|
||||||
|
|
||||||
// 5. load sounds (init), not possible in own thread
|
// 5. load sounds (init), not possible in own thread
|
||||||
QTimer::singleShot(10 * 1000, this, SLOT(initNotificationSounds()));
|
QTimer::singleShot(10 * 1000, this, SLOT(ps_initNotificationSounds()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -299,7 +299,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Notification
|
* Notification
|
||||||
*/
|
*/
|
||||||
void CContextAudio::initNotificationSounds()
|
void CContextAudio::ps_initNotificationSounds()
|
||||||
{
|
{
|
||||||
// not possible in own thread
|
// not possible in own thread
|
||||||
CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds);
|
CSoundGenerator::playNotificationSound(0, CNotificationSounds::NotificationsLoadSounds);
|
||||||
@@ -358,7 +358,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Settings changed
|
* Settings changed
|
||||||
*/
|
*/
|
||||||
void CContextAudio::settingsChanged(uint typeValue)
|
void CContextAudio::ps_settingsChanged(uint typeValue)
|
||||||
{
|
{
|
||||||
if (this->getIContextOwnAircraft()) m_voice->setMyAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
if (this->getIContextOwnAircraft()) m_voice->setMyAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
||||||
if (!this->getIContextSettings()) return;
|
if (!this->getIContextSettings()) return;
|
||||||
@@ -376,7 +376,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Connection status changed
|
* Connection status changed
|
||||||
*/
|
*/
|
||||||
void CContextAudio::connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus)
|
void CContextAudio::ps_connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus)
|
||||||
{
|
{
|
||||||
Q_UNUSED(comUnit);
|
Q_UNUSED(comUnit);
|
||||||
Q_UNUSED(oldStatus);
|
Q_UNUSED(oldStatus);
|
||||||
|
|||||||
@@ -113,14 +113,14 @@ namespace BlackCore
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Settings have been changed
|
//! Settings have been changed
|
||||||
void settingsChanged(uint typeValue);
|
void ps_settingsChanged(uint typeValue);
|
||||||
|
|
||||||
//! \copydoc IVoice::connectionStatusChanged
|
//! \copydoc IVoice::connectionStatusChanged
|
||||||
//! \sa IContextAudio::changedVoiceRooms
|
//! \sa IContextAudio::changedVoiceRooms
|
||||||
void connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus);
|
void ps_connectionStatusChanged(IVoice::ComUnit comUnit, IVoice::ConnectionStatus oldStatus, IVoice::ConnectionStatus newStatus);
|
||||||
|
|
||||||
//! Init notification sounds
|
//! Init notification sounds
|
||||||
void initNotificationSounds();
|
void ps_initNotificationSounds();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Connection in transition
|
//! Connection in transition
|
||||||
|
|||||||
@@ -41,19 +41,19 @@ namespace BlackCore
|
|||||||
|
|
||||||
// 1. Init by "network driver"
|
// 1. Init by "network driver"
|
||||||
this->m_network = new CNetworkVatlib(this);
|
this->m_network = new CNetworkVatlib(this);
|
||||||
this->connect(this->m_network, &INetwork::connectionStatusChanged, this, &CContextNetwork::psFsdConnectionStatusChanged);
|
this->connect(this->m_network, &INetwork::connectionStatusChanged, this, &CContextNetwork::ps_FsdConnectionStatusChanged);
|
||||||
this->connect(this->m_network, &INetwork::textMessagesReceived, this, &CContextNetwork::psFsdTextMessageReceived);
|
this->connect(this->m_network, &INetwork::textMessagesReceived, this, &CContextNetwork::ps_FsdTextMessageReceived);
|
||||||
|
|
||||||
// 2. VATSIM bookings
|
// 2. VATSIM bookings
|
||||||
this->m_vatsimBookingReader = new CVatsimBookingReader(this->getRuntime()->getIContextSettings()->getNetworkSettings().getBookingServiceUrl(), this);
|
this->m_vatsimBookingReader = new CVatsimBookingReader(this->getRuntime()->getIContextSettings()->getNetworkSettings().getBookingServiceUrl(), this);
|
||||||
this->connect(this->m_vatsimBookingReader, &CVatsimBookingReader::dataRead, this, &CContextNetwork::psReceivedBookings);
|
this->connect(this->m_vatsimBookingReader, &CVatsimBookingReader::dataRead, this, &CContextNetwork::ps_ReceivedBookings);
|
||||||
this->m_vatsimBookingReader->read(); // first read
|
this->m_vatsimBookingReader->read(); // first read
|
||||||
this->m_vatsimBookingReader->setInterval(180 * 1000);
|
this->m_vatsimBookingReader->setInterval(180 * 1000);
|
||||||
|
|
||||||
// 3. VATSIM data file
|
// 3. VATSIM data file
|
||||||
const QStringList dataFileUrls = { "http://info.vroute.net/vatsim-data.txt" };
|
const QStringList dataFileUrls = { "http://info.vroute.net/vatsim-data.txt" };
|
||||||
this->m_vatsimDataFileReader = new CVatsimDataFileReader(dataFileUrls, this);
|
this->m_vatsimDataFileReader = new CVatsimDataFileReader(dataFileUrls, this);
|
||||||
this->connect(this->m_vatsimDataFileReader, &CVatsimDataFileReader::dataRead, this, &CContextNetwork::psDataFileRead);
|
this->connect(this->m_vatsimDataFileReader, &CVatsimDataFileReader::dataRead, this, &CContextNetwork::ps_DataFileRead);
|
||||||
this->m_vatsimDataFileReader->read(); // first read
|
this->m_vatsimDataFileReader->read(); // first read
|
||||||
this->m_vatsimDataFileReader->setInterval(90 * 1000);
|
this->m_vatsimDataFileReader->setInterval(90 * 1000);
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Connection status changed
|
* Connection status changed
|
||||||
*/
|
*/
|
||||||
void CContextNetwork::psFsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message)
|
void CContextNetwork::ps_FsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message)
|
||||||
{
|
{
|
||||||
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, { QString::number(from), QString::number(to) });
|
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, { QString::number(from), QString::number(to) });
|
||||||
this->m_currentStatus = to;
|
this->m_currentStatus = to;
|
||||||
@@ -296,7 +296,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Data file (VATSIM) has been read
|
* Data file (VATSIM) has been read
|
||||||
*/
|
*/
|
||||||
void CContextNetwork::psDataFileRead()
|
void CContextNetwork::ps_DataFileRead()
|
||||||
{
|
{
|
||||||
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO);
|
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO);
|
||||||
// TODO (MS) no test for if (this->getIContextApplication()) here?
|
// TODO (MS) no test for if (this->getIContextApplication()) here?
|
||||||
@@ -306,7 +306,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Radio text message received
|
* Radio text message received
|
||||||
*/
|
*/
|
||||||
void CContextNetwork::psFsdTextMessageReceived(const CTextMessageList &messages)
|
void CContextNetwork::ps_FsdTextMessageReceived(const CTextMessageList &messages)
|
||||||
{
|
{
|
||||||
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, messages.toQString());
|
this->getRuntime()->logSlot(c_logContext, Q_FUNC_INFO, messages.toQString());
|
||||||
this->textMessagesReceived(messages); // relay
|
this->textMessagesReceived(messages); // relay
|
||||||
@@ -319,7 +319,7 @@ namespace BlackCore
|
|||||||
return this->getRuntime()->getCContextOwnAircraft()->ownAircraft();
|
return this->getRuntime()->getCContextOwnAircraft()->ownAircraft();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextNetwork::psChangedOwnAircraft(const CAircraft &aircraft, const QString &originator)
|
void CContextNetwork::ps_ChangedOwnAircraft(const CAircraft &aircraft, const QString &originator)
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->m_network);
|
Q_ASSERT(this->m_network);
|
||||||
Q_UNUSED(originator);
|
Q_UNUSED(originator);
|
||||||
@@ -338,7 +338,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Update bookings
|
* Update bookings
|
||||||
*/
|
*/
|
||||||
void CContextNetwork::psReceivedBookings(const CAtcStationList &)
|
void CContextNetwork::ps_ReceivedBookings(const CAtcStationList &)
|
||||||
{
|
{
|
||||||
// TODO (MS) no test for if (this->getIContextApplication()) here?
|
// TODO (MS) no test for if (this->getIContextApplication()) here?
|
||||||
this->getIContextApplication()->sendStatusMessage(CStatusMessage::getInfoMessage("Read bookings from network", CStatusMessage::TypeTrafficNetwork));
|
this->getIContextApplication()->sendStatusMessage(CStatusMessage::getInfoMessage("Read bookings from network", CStatusMessage::TypeTrafficNetwork));
|
||||||
|
|||||||
@@ -160,23 +160,23 @@ namespace BlackCore
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Own aircraft was updated
|
//! Own aircraft was updated
|
||||||
void psChangedOwnAircraft(const BlackMisc::Aviation::CAircraft &aircraft, const QString &originator);
|
void ps_ChangedOwnAircraft(const BlackMisc::Aviation::CAircraft &aircraft, const QString &originator);
|
||||||
|
|
||||||
//! ATC bookings received
|
//! ATC bookings received
|
||||||
void psReceivedBookings(const BlackMisc::Aviation::CAtcStationList &bookedStations);
|
void ps_ReceivedBookings(const BlackMisc::Aviation::CAtcStationList &bookedStations);
|
||||||
|
|
||||||
//! Data file has been read
|
//! Data file has been read
|
||||||
void psDataFileRead();
|
void ps_DataFileRead();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Connection status changed?
|
* \brief Connection status changed?
|
||||||
* \param from old status
|
* \param from old status
|
||||||
* \param to new status
|
* \param to new status
|
||||||
*/
|
*/
|
||||||
void psFsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message);
|
void ps_FsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message);
|
||||||
|
|
||||||
//! Radio text messages received
|
//! Radio text messages received
|
||||||
void psFsdTextMessageReceived(const BlackMisc::Network::CTextMessageList &messages);
|
void ps_FsdTextMessageReceived(const BlackMisc::Network::CTextMessageList &messages);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Tune in / out voice room
|
* Tune in / out voice room
|
||||||
*/
|
*/
|
||||||
void CContextOwnAircraft::changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected)
|
void CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus(const CAtcStation &atcStation, bool connected)
|
||||||
{
|
{
|
||||||
// any of our active frequencies?
|
// any of our active frequencies?
|
||||||
Q_UNUSED(connected);
|
Q_UNUSED(connected);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace BlackCore
|
|||||||
private slots:
|
private slots:
|
||||||
//! Station has been changed, needed to tune in/out voice room
|
//! Station has been changed, needed to tune in/out voice room
|
||||||
//! Set in runtime
|
//! Set in runtime
|
||||||
void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected);
|
void ps_changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &atcStation, bool connected);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BlackMisc::Aviation::CAircraft m_ownAircraft; //!< my aircraft
|
BlackMisc::Aviation::CAircraft m_ownAircraft; //!< my aircraft
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
// only, when both contexts exists and only if settings originate locally
|
// only, when both contexts exists and only if settings originate locally
|
||||||
c = connect(this->m_contextSettings, &IContextSettings::changedSettings,
|
c = connect(this->m_contextSettings, &IContextSettings::changedSettings,
|
||||||
this->getCContextAudio(), &CContextAudio::settingsChanged);
|
this->getCContextAudio(), &CContextAudio::ps_settingsChanged);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,11 +422,11 @@ namespace BlackCore
|
|||||||
if (this->m_contextNetwork && this->m_contextNetwork->usingLocalObjects())
|
if (this->m_contextNetwork && this->m_contextNetwork->usingLocalObjects())
|
||||||
{
|
{
|
||||||
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
|
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
|
||||||
this->getCContextSimulator(), &CContextSimulator::addAircraftSituation);
|
this->getCContextSimulator(), &CContextSimulator::ps_addAircraftSituation);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
|
|
||||||
c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived,
|
c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived,
|
||||||
this->getCContextSimulator(), &CContextSimulator::textMessagesReceived);
|
this->getCContextSimulator(), &CContextSimulator::ps_textMessagesReceived);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ namespace BlackCore
|
|||||||
if (this->m_contextOwnAircraft && this->m_contextOwnAircraft->usingLocalObjects())
|
if (this->m_contextOwnAircraft && this->m_contextOwnAircraft->usingLocalObjects())
|
||||||
{
|
{
|
||||||
c = connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraftCockpit,
|
c = connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraftCockpit,
|
||||||
this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext);
|
this->getCContextSimulator(), &CContextSimulator::ps_updateCockpitFromContext);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,11 +442,11 @@ namespace BlackCore
|
|||||||
if (this->m_contextApplication && this->m_contextApplication->usingLocalObjects())
|
if (this->m_contextApplication && this->m_contextApplication->usingLocalObjects())
|
||||||
{
|
{
|
||||||
c = connect(this->m_contextApplication, &IContextApplication::statusMessage,
|
c = connect(this->m_contextApplication, &IContextApplication::statusMessage,
|
||||||
this->getCContextSimulator(), &CContextSimulator::statusMessageReceived);
|
this->getCContextSimulator(), &CContextSimulator::ps_statusMessageReceived);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
|
|
||||||
c = connect(this->m_contextApplication, &IContextApplication::statusMessages,
|
c = connect(this->m_contextApplication, &IContextApplication::statusMessages,
|
||||||
this->getCContextSimulator(), &CContextSimulator::statusMessagesReceived);
|
this->getCContextSimulator(), &CContextSimulator::ps_statusMessagesReceived);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,12 +466,12 @@ namespace BlackCore
|
|||||||
if (this->m_contextNetwork && this->m_contextOwnAircraft && this->m_contextNetwork->usingLocalObjects() && this->m_contextOwnAircraft->usingLocalObjects())
|
if (this->m_contextNetwork && this->m_contextOwnAircraft && this->m_contextNetwork->usingLocalObjects() && this->m_contextOwnAircraft->usingLocalObjects())
|
||||||
{
|
{
|
||||||
c = this->connect(this->m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus,
|
c = this->connect(this->m_contextNetwork, &IContextNetwork::changedAtcStationOnlineConnectionStatus,
|
||||||
this->getCContextOwnAircraft(), &CContextOwnAircraft::changedAtcStationOnlineConnectionStatus);
|
this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedAtcStationOnlineConnectionStatus);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
|
|
||||||
// inject updated own aircraft to network
|
// inject updated own aircraft to network
|
||||||
c = this->connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraft,
|
c = this->connect(this->m_contextOwnAircraft, &IContextOwnAircraft::changedAircraft,
|
||||||
this->getCContextNetwork(), &CContextNetwork::psChangedOwnAircraft);
|
this->getCContextNetwork(), &CContextNetwork::ps_ChangedOwnAircraft);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
m_updateTimer = new QTimer(this);
|
m_updateTimer = new QTimer(this);
|
||||||
findSimulatorPlugins();
|
findSimulatorPlugins();
|
||||||
connect(m_updateTimer, &QTimer::timeout, this, &CContextSimulator::updateOwnAircraft);
|
connect(m_updateTimer, &QTimer::timeout, this, &CContextSimulator::ps_updateOwnAircraft);
|
||||||
|
|
||||||
// do not load plugin here, as it depends on settings
|
// do not load plugin here, as it depends on settings
|
||||||
// it has to be guaranteed the settings are alredy loaded
|
// it has to be guaranteed the settings are alredy loaded
|
||||||
@@ -148,7 +148,7 @@ namespace BlackCore
|
|||||||
this->unloadSimulatorPlugin(); // old plugin unloaded
|
this->unloadSimulatorPlugin(); // old plugin unloaded
|
||||||
m_simulator = newSimulator;
|
m_simulator = newSimulator;
|
||||||
|
|
||||||
connect(m_simulator, SIGNAL(statusChanged(ISimulator::Status)), this, SLOT(setConnectionStatus(ISimulator::Status)));
|
connect(m_simulator, SIGNAL(statusChanged(ISimulator::Status)), this, SLOT(ps_setConnectionStatus(ISimulator::Status)));
|
||||||
connect(m_simulator, &ISimulator::aircraftModelChanged, this, &IContextSimulator::ownAircraftModelChanged);
|
connect(m_simulator, &ISimulator::aircraftModelChanged, this, &IContextSimulator::ownAircraftModelChanged);
|
||||||
if (this->getIContextApplication() && this->getIContextApplication()->usingLocalObjects())
|
if (this->getIContextApplication() && this->getIContextApplication()->usingLocalObjects())
|
||||||
{
|
{
|
||||||
@@ -206,7 +206,7 @@ namespace BlackCore
|
|||||||
m_simulator = nullptr;
|
m_simulator = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::updateOwnAircraft()
|
void CContextSimulator::ps_updateOwnAircraft()
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->getIContextOwnAircraft());
|
Q_ASSERT(this->getIContextOwnAircraft());
|
||||||
|
|
||||||
@@ -225,14 +225,14 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::addAircraftSituation(const CCallsign &callsign, const CAircraftSituation &initialSituation)
|
void CContextSimulator::ps_addAircraftSituation(const CCallsign &callsign, const CAircraftSituation &initialSituation)
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->m_simulator);
|
Q_ASSERT(this->m_simulator);
|
||||||
if (!this->m_simulator) return;
|
if (!this->m_simulator) return;
|
||||||
this->m_simulator->addAircraftSituation(callsign, initialSituation);
|
this->m_simulator->addAircraftSituation(callsign, initialSituation);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::updateCockpitFromContext(const CAircraft &ownAircraft, const QString &originator)
|
void CContextSimulator::ps_updateCockpitFromContext(const CAircraft &ownAircraft, const QString &originator)
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->m_simulator);
|
Q_ASSERT(this->m_simulator);
|
||||||
if (!this->m_simulator) return;
|
if (!this->m_simulator) return;
|
||||||
@@ -244,7 +244,7 @@ namespace BlackCore
|
|||||||
this->m_simulator->updateOwnSimulatorCockpit(ownAircraft);
|
this->m_simulator->updateOwnSimulatorCockpit(ownAircraft);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::setConnectionStatus(ISimulator::Status status)
|
void CContextSimulator::ps_setConnectionStatus(ISimulator::Status status)
|
||||||
{
|
{
|
||||||
if (status == ISimulator::Connected)
|
if (status == ISimulator::Connected)
|
||||||
{
|
{
|
||||||
@@ -258,21 +258,21 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::statusMessageReceived(const CStatusMessage &statusMessage)
|
void CContextSimulator::ps_statusMessageReceived(const CStatusMessage &statusMessage)
|
||||||
{
|
{
|
||||||
if (statusMessage.getSeverity() != CStatusMessage::SeverityError) return;
|
if (statusMessage.getSeverity() != CStatusMessage::SeverityError) return;
|
||||||
this->m_simulator->displayStatusMessage(statusMessage);
|
this->m_simulator->displayStatusMessage(statusMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::statusMessagesReceived(const CStatusMessageList &statusMessages)
|
void CContextSimulator::ps_statusMessagesReceived(const CStatusMessageList &statusMessages)
|
||||||
{
|
{
|
||||||
foreach(CStatusMessage m, statusMessages)
|
foreach(CStatusMessage m, statusMessages)
|
||||||
{
|
{
|
||||||
this->statusMessageReceived(m);
|
this->ps_statusMessageReceived(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CContextSimulator::textMessagesReceived(const Network::CTextMessageList &textMessages)
|
void CContextSimulator::ps_textMessagesReceived(const Network::CTextMessageList &textMessages)
|
||||||
{
|
{
|
||||||
if (!this->m_simulator) return;
|
if (!this->m_simulator) return;
|
||||||
foreach(CTextMessage tm, textMessages)
|
foreach(CTextMessage tm, textMessages)
|
||||||
|
|||||||
@@ -91,26 +91,26 @@ namespace BlackCore
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Update own aircraft, because simulator has changed something
|
//! Update own aircraft, because simulator has changed something
|
||||||
void updateOwnAircraft();
|
void ps_updateOwnAircraft();
|
||||||
|
|
||||||
//! \copydoc ISimulator::addAircraftSituation
|
//! \copydoc ISimulator::addAircraftSituation
|
||||||
void addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation);
|
void ps_addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation);
|
||||||
|
|
||||||
//! Update cockpit from context, because someone else has changed cockpit (e.g. GUI, 3rd party)
|
//! Update cockpit from context, because someone else has changed cockpit (e.g. GUI, 3rd party)
|
||||||
//! \remarks set by runtime, only locally
|
//! \remarks set by runtime, only locally
|
||||||
void updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
void ps_updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
||||||
|
|
||||||
//! Set new connection status
|
//! Set new connection status
|
||||||
void setConnectionStatus(ISimulator::Status status);
|
void ps_setConnectionStatus(ISimulator::Status status);
|
||||||
|
|
||||||
//! Status message received
|
//! Status message received
|
||||||
void statusMessageReceived(const BlackMisc::CStatusMessage &statusMessage);
|
void ps_statusMessageReceived(const BlackMisc::CStatusMessage &statusMessage);
|
||||||
|
|
||||||
//! Status messages received
|
//! Status messages received
|
||||||
void statusMessagesReceived(const BlackMisc::CStatusMessageList &statusMessages);
|
void ps_statusMessagesReceived(const BlackMisc::CStatusMessageList &statusMessages);
|
||||||
|
|
||||||
//! Text message received
|
//! Text message received
|
||||||
void textMessagesReceived(const BlackMisc::Network::CTextMessageList &textMessages);
|
void ps_textMessagesReceived(const BlackMisc::Network::CTextMessageList &textMessages);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! \brief find and catalog all simulator plugins
|
//! \brief find and catalog all simulator plugins
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace BlackCore
|
|||||||
m_serviceUrl(url), m_networkManager(nullptr)
|
m_serviceUrl(url), m_networkManager(nullptr)
|
||||||
{
|
{
|
||||||
this->m_networkManager = new QNetworkAccessManager(this);
|
this->m_networkManager = new QNetworkAccessManager(this);
|
||||||
this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimBookingReader::loadFinished);
|
this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimBookingReader::ps_loadFinished);
|
||||||
this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimBookingReader::read);
|
this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimBookingReader::read);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Bookings read from XML
|
* Bookings read from XML
|
||||||
*/
|
*/
|
||||||
void CVatsimBookingReader::loadFinished(QNetworkReply *nwReply)
|
void CVatsimBookingReader::ps_loadFinished(QNetworkReply *nwReply)
|
||||||
{
|
{
|
||||||
this->setPendingNetworkReply(nullptr);
|
this->setPendingNetworkReply(nullptr);
|
||||||
if (!this->isStopped())
|
if (!this->isStopped())
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Bookings have been read
|
//! Bookings have been read
|
||||||
void loadFinished(QNetworkReply *nwReply);
|
void ps_loadFinished(QNetworkReply *nwReply);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_serviceUrl; /*!< URL of the service */
|
QString m_serviceUrl; /*!< URL of the service */
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace BlackCore
|
|||||||
m_serviceUrls(urls), m_currentUrlIndex(0), m_networkManager(nullptr)
|
m_serviceUrls(urls), m_currentUrlIndex(0), m_networkManager(nullptr)
|
||||||
{
|
{
|
||||||
this->m_networkManager = new QNetworkAccessManager(this);
|
this->m_networkManager = new QNetworkAccessManager(this);
|
||||||
this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimDataFileReader::loadFinished);
|
this->connect(this->m_networkManager, &QNetworkAccessManager::finished, this, &CVatsimDataFileReader::ps_loadFinished);
|
||||||
this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimDataFileReader::read);
|
this->connect(this->m_updateTimer, &QTimer::timeout, this, &CVatsimDataFileReader::read);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ namespace BlackCore
|
|||||||
/*
|
/*
|
||||||
* Data file read from XML
|
* Data file read from XML
|
||||||
*/
|
*/
|
||||||
void CVatsimDataFileReader::loadFinished(QNetworkReply *nwReply)
|
void CVatsimDataFileReader::ps_loadFinished(QNetworkReply *nwReply)
|
||||||
{
|
{
|
||||||
this->setPendingNetworkReply(nullptr);
|
this->setPendingNetworkReply(nullptr);
|
||||||
if (!this->isStopped())
|
if (!this->isStopped())
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//! Data have been read
|
//! Data have been read
|
||||||
void loadFinished(QNetworkReply *nwReply);
|
void ps_loadFinished(QNetworkReply *nwReply);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStringList m_serviceUrls; /*!< URL of the service */
|
QStringList m_serviceUrls; /*!< URL of the service */
|
||||||
|
|||||||
Reference in New Issue
Block a user