mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +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:
@@ -85,27 +85,6 @@ namespace BlackSimPlugin
|
||||
}
|
||||
}
|
||||
|
||||
CAircraftModel CSimulatorFsCommon::getClosestMatch(const CSimulatedAircraft &remoteAircraft)
|
||||
{
|
||||
return m_modelMatcher.getClosestMatch(remoteAircraft);
|
||||
}
|
||||
|
||||
CAircraftModelList CSimulatorFsCommon::getInstalledModels() const
|
||||
{
|
||||
return m_modelMatcher.getModelSet();
|
||||
}
|
||||
|
||||
CPixmap CSimulatorFsCommon::iconForModel(const QString &modelString) const
|
||||
{
|
||||
const CAircraftModel model(this->m_modelSetLoader.getModelForModelString(modelString));
|
||||
|
||||
// load from file
|
||||
CStatusMessage msg;
|
||||
const CPixmap pm(model.loadIcon(msg));
|
||||
if (!msg.isEmpty()) { CLogMessage::preformatted(msg);}
|
||||
return pm;
|
||||
}
|
||||
|
||||
bool CSimulatorFsCommon::changeRemoteAircraftModel(const CSimulatedAircraft &aircraft)
|
||||
{
|
||||
// remove upfront, and then enable / disable again
|
||||
|
||||
@@ -36,9 +36,6 @@ namespace BlackSimPlugin
|
||||
//! FSUIPC connected?
|
||||
bool isFsuipcConnected() const;
|
||||
|
||||
//! Experimental model matching
|
||||
BlackMisc::Simulation::CAircraftModel getClosestMatch(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft);
|
||||
|
||||
//! \copydoc BlackCore::ISimulator::isPaused
|
||||
virtual bool isPaused() const override { return m_simPaused; }
|
||||
|
||||
@@ -54,12 +51,6 @@ namespace BlackSimPlugin
|
||||
//! \copydoc BlackCore::ISimulator::getAirportsInRange
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulator::getInstalledModels
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModels() const override;
|
||||
|
||||
//! \copydoc BlackCore::Context::IContextSimulator::iconForModel
|
||||
virtual BlackMisc::CPixmap iconForModel(const QString &modelString) const override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulator::changeRemoteAircraftModel
|
||||
virtual bool changeRemoteAircraftModel(const BlackMisc::Simulation::CSimulatedAircraft &aircraft) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user