Move aircraft matching out of simulator plugins

All model matching will be done simulator independent in
CContextSimulator. The simulator specific part is kept in the model
set.
This also caused the signal modelMatchingCompleted to be renamed to
aircraftRenderingChanged, since the name wasn't accurate anymore.
Both getInstalledModels(), getInstalledModelsCount() and iconForModel()
were removed from the ISimulator interface.

refs #765
This commit is contained in:
Roland Winklmeier
2016-09-11 20:18:26 +02:00
parent 079c790aa7
commit fb3df51013
14 changed files with 98 additions and 128 deletions

View File

@@ -61,11 +61,6 @@ namespace BlackCore
connect(&m_oneSecondTimer, &QTimer::timeout, this, &CSimulatorCommon::ps_oneSecondTimer);
this->m_oneSecondTimer.start(1000);
// init mapper
const CSimulatorInfo sim(info.getIdentifier());
this->m_modelSetLoader.changeSimulator(sim);
this->m_modelMatcher.setModelSet(this->m_modelSetLoader.getAircraftModels());
// info
CLogMessage(this).info("Initialized simulator driver %1") << m_simulatorPluginInfo.toQString();
}
@@ -167,6 +162,11 @@ namespace BlackCore
}
}
CAircraftModel CSimulatorCommon::getDefaultModel() const
{
return m_defaultModel;
}
int CSimulatorCommon::getMaxRenderedAircraft() const
{
return (m_maxRenderedAircraft <= MaxAircraftInfinite) ? m_maxRenderedAircraft : MaxAircraftInfinite;
@@ -267,11 +267,6 @@ namespace BlackCore
Q_UNUSED(interpolatorMessages);
}
int CSimulatorCommon::getInstalledModelsCount() const
{
return getInstalledModels().size();
}
void CSimulatorCommon::highlightAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const BlackMisc::PhysicalQuantities::CTime &displayTime)
{
CCallsign cs(aircraftToHighlight.getCallsign());