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

@@ -99,6 +99,7 @@ namespace BlackGui
connect(sGui->getIContextSimulator(), &IContextSimulator::installedAircraftModelsChanged, this, &CMappingComponent::ps_onAircraftModelsLoaded);
connect(sGui->getIContextSimulator(), &IContextSimulator::modelMatchingCompleted, this, &CMappingComponent::ps_onModelMatchingCompleted);
connect(sGui->getIContextSimulator(), &IContextSimulator::aircraftRenderingChanged, this, &CMappingComponent::ps_onAircraftRenderingChanged);
connect(sGui->getIContextSimulator(), &IContextSimulator::airspaceSnapshotHandled, this, &CMappingComponent::ps_onAirspaceSnapshotHandled);
connect(sGui->getIContextNetwork(), &IContextNetwork::changedRemoteAircraftModel, this, &CMappingComponent::ps_onRemoteAircraftModelChanged);
connect(sGui->getIContextNetwork(), &IContextNetwork::changedRemoteAircraftEnabled, this, &CMappingComponent::ps_onChangedAircraftEnabled);
@@ -151,6 +152,12 @@ namespace BlackGui
this->ps_onSimulatedAircraftUpdateRequested();
}
void CMappingComponent::ps_onAircraftRenderingChanged(const BlackMisc::Simulation::CSimulatedAircraft &aircraft)
{
Q_UNUSED(aircraft);
this->ps_onSimulatedAircraftUpdateRequested();
}
void CMappingComponent::ps_onRowCountChanged(int count, bool withFilter)
{
Q_UNUSED(count);

View File

@@ -81,6 +81,9 @@ namespace BlackGui
//! Model matched
void ps_onModelMatchingCompleted(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
//! Model matched
void ps_onAircraftRenderingChanged(const BlackMisc::Simulation::CSimulatedAircraft &aircraft);
//! Changed count
void ps_onRowCountChanged(int count, bool withFilter);