mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 03:35:38 +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
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "aircrafticaocode.h"
|
||||
#include "blackmisc/blackmiscexport.h"
|
||||
#include "blackmisc/datastoreobjectlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include <initializer_list>
|
||||
@@ -25,6 +26,7 @@ namespace BlackMisc
|
||||
//! Value object encapsulating a list of ICAO codes.
|
||||
class BLACKMISC_EXPORT CAircraftIcaoCodeList :
|
||||
public CSequence<CAircraftIcaoCode>,
|
||||
public BlackMisc::IDatastoreObjectListWithIntegerKey<CAircraftIcaoCode, CAircraftIcaoCodeList>,
|
||||
public BlackMisc::Mixin::MetaType<CAircraftIcaoCodeList>
|
||||
{
|
||||
public:
|
||||
@@ -36,6 +38,24 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAircraftIcaoCodeList(const CSequence<CAircraftIcaoCode> &other);
|
||||
|
||||
//! Find by designator
|
||||
CAircraftIcaoCodeList findByDesignator(const QString &designator);
|
||||
|
||||
//! Find by manufacturer
|
||||
CAircraftIcaoCodeList findByManufacturer(const QString &manufacturer);
|
||||
|
||||
//! Find by model description
|
||||
CAircraftIcaoCodeList findByDescription(const QString &description);
|
||||
|
||||
//! Find by designator, then best match by rank
|
||||
CAircraftIcaoCode findFirstByDesignatorAndRank(const QString &designator);
|
||||
|
||||
//! Sort by rank
|
||||
void sortByRank();
|
||||
|
||||
//! For selection completion
|
||||
QStringList toCompleterStrings() const;
|
||||
|
||||
//! From our database JSON format
|
||||
static CAircraftIcaoCodeList fromDatabaseJson(const QJsonArray &array, bool ignoreIncomplete = true);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user