refs #643, moved aircraft model icon loading to model class

* removed iconForModel from interface and aircraft config parser
* CPixmap support for loading pixmap from file
* Access to model of model set loader by model string
* icon path as member of CAircraftModel
This commit is contained in:
Klaus Basan
2016-04-15 18:49:55 +02:00
parent a3a3380008
commit ddc7347927
20 changed files with 143 additions and 67 deletions

View File

@@ -66,6 +66,18 @@ namespace BlackMisc
return this->m_caches.getCachedModels(this->m_simulatorInfo);
}
CAircraftModelList CAircraftModelSetLoader::getAircraftModels(const CSimulatorInfo &simulator) const
{
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
return this->m_caches.getCachedModels(simulator);
}
CAircraftModel CAircraftModelSetLoader::getModelForModelString(const QString &modelString) const
{
if (modelString.isEmpty()) { return CAircraftModel(); }
return this->getAircraftModels().findFirstByModelStringOrDefault(modelString);
}
QDateTime CAircraftModelSetLoader::getCacheTimestamp() const
{
return this->m_caches.getCacheTimestamp(this->m_simulatorInfo);