mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
refs #829, utility function
This commit is contained in:
@@ -228,6 +228,14 @@ namespace BlackMisc
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CAircraftModelList CAircraftModelList::getAllIncludedModels() const
|
||||||
|
{
|
||||||
|
return this->findBy([](const CAircraftModel & model)
|
||||||
|
{
|
||||||
|
return model.getModelMode() == CAircraftModel::Include;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
QString CAircraftModelList::findModelIconPathByModelString(const QString &modelString) const
|
QString CAircraftModelList::findModelIconPathByModelString(const QString &modelString) const
|
||||||
{
|
{
|
||||||
if (modelString.isEmpty()) { return ""; }
|
if (modelString.isEmpty()) { return ""; }
|
||||||
|
|||||||
@@ -132,15 +132,18 @@ namespace BlackMisc
|
|||||||
//! Find by military flag
|
//! Find by military flag
|
||||||
CAircraftModelList findByMilitaryFlag(bool military) const;
|
CAircraftModelList findByMilitaryFlag(bool military) const;
|
||||||
|
|
||||||
//! All models of the FS (FSX, P3D, FS9) family
|
|
||||||
CAircraftModelList getAllFsFamilyModels() const;
|
|
||||||
|
|
||||||
//! Model icon path
|
//! Model icon path
|
||||||
QString findModelIconPathByModelString(const QString &modelString) const;
|
QString findModelIconPathByModelString(const QString &modelString) const;
|
||||||
|
|
||||||
//! Model icon path
|
//! Model icon path
|
||||||
QString findModelIconPathByCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
QString findModelIconPathByCallsign(const BlackMisc::Aviation::CCallsign &callsign) const;
|
||||||
|
|
||||||
|
//! All models of the FS (FSX, P3D, FS9) family
|
||||||
|
CAircraftModelList getAllFsFamilyModels() const;
|
||||||
|
|
||||||
|
//! All included models
|
||||||
|
CAircraftModelList getAllIncludedModels() const;
|
||||||
|
|
||||||
//! Take a designator and find its family
|
//! Take a designator and find its family
|
||||||
QString designatorToFamily(const BlackMisc::Aviation::CAircraftIcaoCode &aircraftIcaoCode) const;
|
QString designatorToFamily(const BlackMisc::Aviation::CAircraftIcaoCode &aircraftIcaoCode) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user