mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #452, adjusted aircraft/aviation classes
* support for loading from datastore * improved timestamp handling * new color and country classes * new attributes * updates for missing parts in CUser
This commit is contained in:
committed by
Mathew Sutcliffe
parent
c5f7179588
commit
ae24700299
@@ -23,11 +23,32 @@ namespace BlackMisc
|
||||
CSequence<CLivery>(other)
|
||||
{ }
|
||||
|
||||
CLiveryList CLiveryList::findByCombinedCode(const QString &combinedCode) const
|
||||
CLiveryList CLiveryList::findByAirlineIcaoDesignator(const QString &icao) const
|
||||
{
|
||||
QString cc(combinedCode.trimmed().toUpper());
|
||||
if (cc.isEmpty()) { return CLiveryList();}
|
||||
return this->findBy(&CLivery::getCombinedCode, cc);
|
||||
QString i(icao.trimmed().toUpper());
|
||||
if (i.isEmpty()) { return CLiveryList(); }
|
||||
return this->findBy(&CLivery::getAirlineIcaoCodeDesignator, i);
|
||||
}
|
||||
|
||||
CLivery CLiveryList::findByAirlineIcaoDesignatorStdLivery(const QString &icao) const
|
||||
{
|
||||
QString i(icao.trimmed().toUpper());
|
||||
if (i.isEmpty()) { return CLivery(); }
|
||||
return this->findFirstByOrDefault([&](const CLivery & livery)
|
||||
{
|
||||
return livery.getAirlineIcaoCodeDesignator() == icao &&
|
||||
livery.isAirlineStandardLivery();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
CLivery CLiveryList::findByCombinedCode(const QString &combinedCode) const
|
||||
{
|
||||
if (!CLivery::isValidCombinedCode(combinedCode)) { return CLivery(); }
|
||||
return this->findFirstByOrDefault([&](const CLivery & livery)
|
||||
{
|
||||
return livery.matchesCombinedCode(combinedCode);
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user