mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
refs #575, livery completer
* utility functions in value object * completer class
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Aviation
|
||||
@@ -57,6 +58,22 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
QStringList CLiveryList::getCombinedCodes(bool sort) const
|
||||
{
|
||||
if (this->isEmpty()) { return QStringList(); }
|
||||
QStringList codes = this->transform(Predicates::MemberTransform(&CLivery::getCombinedCode));
|
||||
if (sort) { codes.sort(); }
|
||||
return codes;
|
||||
}
|
||||
|
||||
QStringList CLiveryList::getCombinedCodesPlusInfo(bool sort) const
|
||||
{
|
||||
if (this->isEmpty()) { return QStringList(); }
|
||||
QStringList codes = this->transform(Predicates::MemberTransform(&CLivery::getCombinedCodePlusInfo));
|
||||
if (sort) { codes.sort(); }
|
||||
return codes;
|
||||
}
|
||||
|
||||
CLivery CLiveryList::smartLiverySelector(const CLivery &liveryPattern) const
|
||||
{
|
||||
// first try on id, that would be perfect
|
||||
|
||||
Reference in New Issue
Block a user