mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user