mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T524, filter by combined type/manufacturer
This commit is contained in:
committed by
Mat Sutcliffe
parent
df19d74b39
commit
509a60d06f
@@ -311,6 +311,21 @@ namespace BlackMisc
|
||||
return this->findByCombinedTypeAndWtc(combinedType, wtc).findColorLiveries();
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findByCombinedAndManufacturer(const CAircraftIcaoCode &icao) const
|
||||
{
|
||||
return this->findByCombinedAndManufacturer(icao.getCombinedType(), icao.getManufacturer());
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findByCombinedAndManufacturer(const QString &combinedType, const QString &manufacturer) const
|
||||
{
|
||||
if (manufacturer.isEmpty()) { return this->findByCombinedType(combinedType); }
|
||||
if (combinedType.isEmpty()) { return this->findByManufacturer(manufacturer); }
|
||||
return this->findBy([ & ](const CAircraftModel & model)
|
||||
{
|
||||
return model.getAircraftIcaoCode().matchesCombinedTypeAndManufacturer(combinedType, manufacturer);
|
||||
});
|
||||
}
|
||||
|
||||
CAircraftModelList CAircraftModelList::findColorLiveries() const
|
||||
{
|
||||
return this->findBy([ = ](const CAircraftModel & model)
|
||||
|
||||
@@ -181,12 +181,20 @@ namespace BlackMisc
|
||||
//! Find by combined code and WTC, wildcards for combined code possible, e.g. L*P, *2J
|
||||
CAircraftModelList findByCombinedTypeAndWtc(const QString &combinedType, const QString &wtc) const;
|
||||
|
||||
//! \copydoc findByCombinedType
|
||||
//! Combined type and color livery
|
||||
CAircraftModelList findByCombinedTypeWithColorLivery(const QString &combinedType) const;
|
||||
|
||||
//! \copydoc findByCombinedTypeAndWtc
|
||||
//! Combined WTC/livery
|
||||
CAircraftModelList findByCombinedTypeAndWtcWithColorLivery(const QString &combinedType, const QString &wtc) const;
|
||||
|
||||
//! Combined type and manufacturer
|
||||
//! \remark kind of pseudo family, as in most cases the same combined type of a manufacturer means similar aircraft
|
||||
CAircraftModelList findByCombinedAndManufacturer(const Aviation::CAircraftIcaoCode &icao) const;
|
||||
|
||||
//! Combined typeand manufacturer
|
||||
//! \remark kind of pseudo family, as in most cases the same combined type of a manufacturer means similar aircraft
|
||||
CAircraftModelList findByCombinedAndManufacturer(const QString &combinedType, const QString &manufacturer) const;
|
||||
|
||||
//! Find models with color liveries
|
||||
CAircraftModelList findColorLiveries() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user