refs #257, hooking up simulator and application/network context to display

* text messages
* status messages
This commit is contained in:
Klaus Basan
2014-06-05 13:46:24 +02:00
parent db08e409e0
commit 76c2f0a5c4

View File

@@ -439,6 +439,10 @@ namespace BlackCore
c = connect(this->m_contextNetwork, &IContextNetwork::changedAircraftSituation,
this->getCContextSimulator(), &CContextSimulator::addAircraftSituation);
Q_ASSERT(c);
c = connect(this->m_contextNetwork, &IContextNetwork::textMessagesReceived,
this->getCContextSimulator(), &CContextSimulator::textMessagesReceived);
Q_ASSERT(c);
}
// only if own aircraft running locally
@@ -448,6 +452,18 @@ namespace BlackCore
this->getCContextSimulator(), &CContextSimulator::updateCockpitFromContext);
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())