mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-10 22:15:34 +08:00
refs #394, LED to display when mapper is ready
* function in context for models count * adjusted status bar component * in same step: menu to toggle "window on top"
This commit is contained in:
@@ -123,6 +123,9 @@ namespace BlackCore
|
||||
//! Installed models in simulator eco system
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModels() const = 0;
|
||||
|
||||
//! Number of installed models in simulator eco system
|
||||
virtual int getInstalledModelsCount() const = 0;
|
||||
|
||||
//! Model for model string
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModelsStartingWith(const QString modelString) const = 0;
|
||||
|
||||
|
||||
@@ -116,6 +116,14 @@ namespace BlackCore
|
||||
return this->m_simulator->getInstalledModels();
|
||||
}
|
||||
|
||||
int CContextSimulator::getInstalledModelsCount() const
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
if (!m_simulator) { return 0; }
|
||||
|
||||
return this->m_simulator->getInstalledModels().size();
|
||||
}
|
||||
|
||||
CAircraftModelList CContextSimulator::getInstalledModelsStartingWith(const QString modelString) const
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << modelString; }
|
||||
|
||||
@@ -74,6 +74,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextSimulator::getInstalledModels
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModels() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModelsCount
|
||||
virtual int getInstalledModelsCount() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModelsStartingWith
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModelsStartingWith(const QString modelString) const override;
|
||||
|
||||
|
||||
@@ -99,6 +99,11 @@ namespace BlackCore
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::Simulation::CAircraftModelList>(QLatin1Literal("getInstalledModelsStartingWith"), modelString);
|
||||
}
|
||||
|
||||
int CContextSimulatorProxy::getInstalledModelsCount() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<int>(QLatin1Literal("getInstalledModelsCount"));
|
||||
}
|
||||
|
||||
void CContextSimulatorProxy::reloadInstalledModels()
|
||||
{
|
||||
m_dBusInterface->callDBus(QLatin1Literal("reloadInstalledModels"));
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace BlackCore
|
||||
//! \copydoc IContextSimulator::getInstalledModelsStartingWith
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModelsStartingWith(const QString modelString) const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModelsCount
|
||||
virtual int getInstalledModelsCount() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::reloadInstalledModels
|
||||
virtual void reloadInstalledModels() override;
|
||||
|
||||
|
||||
@@ -45,4 +45,9 @@ namespace BlackCore
|
||||
Q_UNUSED(interpolator);
|
||||
}
|
||||
|
||||
int CSimulatorCommon::getInstalledModelsCount() const
|
||||
{
|
||||
return getInstalledModels().size();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -109,6 +109,9 @@ namespace BlackCore
|
||||
//! Aircraft models for available remote aircrafts
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModels() const = 0;
|
||||
|
||||
//! Count of aircraft models for available remote aircrafts
|
||||
virtual int getInstalledModelsCount() const = 0;
|
||||
|
||||
//! Reload the installed models
|
||||
virtual void reloadInstalledModels() = 0;
|
||||
|
||||
@@ -213,6 +216,9 @@ namespace BlackCore
|
||||
//! \copydoc ISimulator::enableDebuggingMessages
|
||||
virtual void enableDebugMessages(bool driver, bool interpolator) override;
|
||||
|
||||
//! \copydoc ISimulator::getInstalledModelsCount
|
||||
virtual int getInstalledModelsCount() const override;
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CSimulatorCommon(
|
||||
|
||||
Reference in New Issue
Block a user