mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Utility function to find out if model set is initialized
This commit is contained in:
@@ -142,6 +142,9 @@ namespace BlackCore
|
||||
//! \note might be slow since list can be big
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getModelSet() const = 0;
|
||||
|
||||
//! Simulators which have an initialized model set
|
||||
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const = 0;
|
||||
|
||||
//! Number of installed models in simulator eco system
|
||||
virtual int getModelSetCount() const = 0;
|
||||
|
||||
|
||||
@@ -80,6 +80,13 @@ namespace BlackCore
|
||||
return BlackMisc::Simulation::CAircraftModelList();
|
||||
}
|
||||
|
||||
//! \copydoc IContextSimulator::simulatorsWithInitializedModelSet
|
||||
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Simulation::CSimulatorInfo();
|
||||
}
|
||||
|
||||
//! \copydoc IContextSimulator::getModelSetStrings
|
||||
virtual QStringList getModelSetStrings() const override
|
||||
{
|
||||
|
||||
@@ -157,6 +157,12 @@ namespace BlackCore
|
||||
return m_modelMatcher.getModelSet();
|
||||
}
|
||||
|
||||
CSimulatorInfo CContextSimulator::simulatorsWithInitializedModelSet() const
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
return m_modelSetLoader.simulatorsWithInitializedModelSet();
|
||||
}
|
||||
|
||||
QStringList CContextSimulator::getModelSetStrings() const
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Simulation::CSimulatorInternals getSimulatorInternals() const override;
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getModelSet() const override;
|
||||
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const override;
|
||||
virtual QStringList getModelSetStrings() const override;
|
||||
virtual QStringList getModelSetCompleterStrings(bool sorted) const override;
|
||||
virtual int getModelSetCount() const override;
|
||||
|
||||
@@ -89,6 +89,11 @@ namespace BlackCore
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1Literal("getModelSet"));
|
||||
}
|
||||
|
||||
CSimulatorInfo CContextSimulatorProxy::simulatorsWithInitializedModelSet() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CSimulatorInfo>(QLatin1Literal("simulatorsWithInitializedModelSet"));
|
||||
}
|
||||
|
||||
QStringList CContextSimulatorProxy::getModelSetStrings() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<QStringList>(QLatin1Literal("getModelSetStrings"));
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace BlackCore
|
||||
virtual int getSimulatorStatus() const override;
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getModelSet() const override;
|
||||
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const override;
|
||||
virtual QStringList getModelSetStrings() const override;
|
||||
virtual QStringList getModelSetCompleterStrings(bool sorted) const override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getModelSetModelsStartingWith(const QString modelString) const override;
|
||||
|
||||
Reference in New Issue
Block a user