Ref T455, preselect simulator in wizard if there are models

This commit is contained in:
Klaus Basan
2018-12-08 20:11:50 +01:00
parent eacb554053
commit 8d3d5743d3
3 changed files with 22 additions and 8 deletions

View File

@@ -162,6 +162,19 @@ namespace BlackMisc
return withInitializedCache;
}
CSimulatorInfo IMultiSimulatorModelCaches::simulatorsWithModels() const
{
CSimulatorInfo withModels;
for (const CSimulatorInfo &simInfo : CSimulatorInfo::allSimulators().asSingleSimulatorSet())
{
if (this->getCachedModelsCount(simInfo) > 0)
{
withModels.add(simInfo);
}
}
return withModels;
}
CModelCaches::CModelCaches(bool synchronizeCache, QObject *parent) : IMultiSimulatorModelCaches(parent)
{
const CSimulatorInfo sim = BlackMisc::Simulation::CSimulatorInfo::guessDefaultSimulator();

View File

@@ -220,6 +220,10 @@ namespace BlackMisc
//! \threadsafe
CSimulatorInfo simulatorsWithInitializedCache() const;
//! Simulators which have models
//! \threadsafe
CSimulatorInfo simulatorsWithModels() const;
//! Timestamp
//! \threadsafe
QDateTime getSynchronizedTimestamp(const CSimulatorInfo &simulator);