mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user