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:
Klaus Basan
2015-03-21 02:42:46 +01:00
parent 3c077ef579
commit 66da4d7353
13 changed files with 83 additions and 16 deletions

View File

@@ -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;

View File

@@ -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; }

View File

@@ -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;

View File

@@ -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"));

View File

@@ -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;

View File

@@ -45,4 +45,9 @@ namespace BlackCore
Q_UNUSED(interpolator);
}
int CSimulatorCommon::getInstalledModelsCount() const
{
return getInstalledModels().size();
}
} // namespace

View File

@@ -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(