mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Ref T515, context function "isValidationInProgress"
This commit is contained in:
committed by
Mat Sutcliffe
parent
2dd396c0df
commit
0ac6739377
@@ -206,6 +206,9 @@ namespace BlackCore
|
||||
//! \copydoc CAircraftMatcher::getDisabledModelsForMatching
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getDisabledModelsForMatching() const = 0;
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CBackgroundValidation::isValidating
|
||||
virtual bool isValidationInProgress() const = 0;
|
||||
|
||||
//! Trigger model set validation
|
||||
virtual bool triggerModelSetValidation(const BlackMisc::Simulation::CSimulatorInfo &simulator) = 0;
|
||||
|
||||
|
||||
@@ -161,6 +161,13 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::CBackgroundValidation::isValidating
|
||||
virtual bool isValidationInProgress() const override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return false;
|
||||
}
|
||||
|
||||
//! \copydoc IContextSimulator::isKnownModelInSet
|
||||
virtual bool isKnownModelInSet(const QString &modelstring) const override
|
||||
{
|
||||
|
||||
@@ -279,8 +279,16 @@ namespace BlackCore
|
||||
m_aircraftMatcher.restoreDisabledModels();
|
||||
}
|
||||
|
||||
bool CContextSimulator::isValidationInProgress() const
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
if (!m_validator) { return false; }
|
||||
return m_validator->isValidating();
|
||||
}
|
||||
|
||||
bool CContextSimulator::triggerModelSetValidation(const CSimulatorInfo &simulator)
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
if (!m_validator) { return false; }
|
||||
return m_validator->triggerValidation(simulator);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace BlackCore
|
||||
virtual void disableModelsForMatching(const BlackMisc::Simulation::CAircraftModelList &removedModels, bool incremental) override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getDisabledModelsForMatching() const override;
|
||||
virtual void restoreDisabledModels() override;
|
||||
virtual bool isValidationInProgress() const override;
|
||||
virtual bool triggerModelSetValidation(const BlackMisc::Simulation::CSimulatorInfo &simulator) override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getModelSetModelsStartingWith(const QString &modelString) const override;
|
||||
virtual BlackMisc::PhysicalQuantities::CTime getTimeSynchronizationOffset() const override;
|
||||
|
||||
@@ -190,6 +190,11 @@ namespace BlackCore
|
||||
return m_dBusInterface->callDBusRet<bool>(QLatin1String("triggerModelSetValidation"), simulator);
|
||||
}
|
||||
|
||||
bool CContextSimulatorProxy::isValidationInProgress() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<bool>(QLatin1String("isValidationInProgress"));
|
||||
}
|
||||
|
||||
void CContextSimulatorProxy::restoreDisabledModels()
|
||||
{
|
||||
m_dBusInterface->callDBus(QLatin1String("restoreDisabledModels"));
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace BlackCore
|
||||
virtual void disableModelsForMatching(const BlackMisc::Simulation::CAircraftModelList &removedModels, bool incremental) override;
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getDisabledModelsForMatching() const override;
|
||||
virtual bool triggerModelSetValidation(const BlackMisc::Simulation::CSimulatorInfo &simulator) override;
|
||||
virtual bool isValidationInProgress() const override;
|
||||
virtual void restoreDisabledModels() override;
|
||||
virtual bool setTimeSynchronization(bool enable, const BlackMisc::PhysicalQuantities::CTime &offset) override;
|
||||
virtual bool isTimeSynchronized() const override;
|
||||
|
||||
@@ -48,6 +48,10 @@ namespace BlackMisc
|
||||
//! \threadsafe
|
||||
bool wasAlreadyChecked(const CSimulatorInfo &simulator) const;
|
||||
|
||||
//! Validation in progress
|
||||
//! \threadsafe
|
||||
bool isValidating() const { return m_inWork; }
|
||||
|
||||
//! Reset checked for simulator
|
||||
//! \threadsafe
|
||||
void resetAlreadyChecked(const CSimulatorInfo &simulator);
|
||||
|
||||
Reference in New Issue
Block a user