mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #257, hooking up simulator and application/network context to display
* text messages * status messages
This commit is contained in:
@@ -439,6 +439,10 @@ namespace BlackCore
|
|||||||
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
|
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
|
||||||
this->getCContextSimulator(), &CContextSimulator::addAircraftSituation);
|
this->getCContextSimulator(), &CContextSimulator::addAircraftSituation);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
|
|
||||||
|
c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived,
|
||||||
|
this->getCContextSimulator(), &CContextSimulator::textMessagesReceived);
|
||||||
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
// only if own aircraft running locally
|
// only if own aircraft running locally
|
||||||
@@ -448,6 +452,18 @@ namespace BlackCore
|
|||||||
this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext);
|
this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext);
|
||||||
Q_ASSERT(c);
|
Q_ASSERT(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only if own aircraft running locally
|
||||||
|
if (this->m_contextApplication && this->m_contextApplication->usingLocalObjects())
|
||||||
|
{
|
||||||
|
c = connect(this->m_contextApplication, &IContextApplication::statusMessage,
|
||||||
|
this->getCContextSimulator(), &CContextSimulator::statusMessageReceived);
|
||||||
|
Q_ASSERT(c);
|
||||||
|
|
||||||
|
c = connect(this->m_contextApplication, &IContextApplication::statusMessages,
|
||||||
|
this->getCContextSimulator(), &CContextSimulator::statusMessagesReceived);
|
||||||
|
Q_ASSERT(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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())
|
||||||
|
|||||||
Reference in New Issue
Block a user