13 namespace swift::misc::simulation
24 if (distributor.matchesKeyOrAlias(keyOrAlias)) {
return distributor; }
37 if (model.
getDescription().startsWith(
"Project AI ", Qt::CaseInsensitive))
56 const QString key(distributor.
getDbKey());
79 if (distributor.matchesKeyOrAlias(keyOrAlias)) {
return true; }
86 if (this->
isEmpty()) {
return QStringList(); }
95 if (
sort) { sl.sort(); }
105 if (distributor.matchesSimulator(simulator)) { distributors.
push_back(distributor); }
bool contains(const T &object) const
Return true if there is an element equal to given object. Uses the most efficient implementation avai...
int removeIf(Predicate p)
Remove elements for which a given predicate returns true.
void push_back(const T &value)
Appends an element at the end of the sequence.
bool isEmpty() const
Synonym for empty.
void sort(Predicate p)
In-place sort by a given comparator predicate.
CDistributor findByKey(QString key, const CDistributor ¬Found=CDistributor()) const
Object with key, notFound otherwise.
CDistributorList findByKeys(const QSet< QString > &keys) const
Object with key, notFound otherwise.
bool isLoadedFromDb() const
Loaded from DB.
bool hasValidDbKey() const
Has valid DB key.
const QString & getDbKey() const
Get DB key.
Aircraft model (used by another pilot, my models on disk)
const QString & getModelString() const
Model key, either queried or loaded from simulator model.
const QString & getDescription() const
Descriptive text.
const CDistributor & getDistributor() const
Get distributor.
Value object encapsulating information of software distributor.
bool hasAlias1() const
Alias 1?
static const QSet< QString > & standardAllFsFamily()
Hardcoded keys for standard models.
bool hasAlias2() const
Alias 2?
bool hasCompleteData() const
Complete data?
const QString & getAlias2() const
Get alias2.
const QString & getAlias1() const
Get alias1.
Value object encapsulating a list of distributors.
CDistributor findByModelData(const CAircraftModel &model) const
Find by model string.
CDistributorList matchesSimulator(const CSimulatorInfo &simulator) const
Find for given simulator.
CDistributor findByKeyOrAlias(const QString &keyOrAlias) const
Find by id or alias.
bool isCompletelyFromDb() const
All data from DB?
QStringList getDbKeysAndAliases(bool sort) const
All DB keys and aliases.
int removeIfNotLoadedFromDb()
Remove distributors not from DB.
CDistributor smartDistributorSelector(const CDistributor &distributorPattern) const
Best match by given pattern.
CDistributorList()
Default constructor.
CDistributorList matchesAnyFsFamily() const
Find all for all FS simulators.
bool matchesAnyKeyOrAlias(const QString &keyOrAlias) const
At least is matching key or alias.
CDistributorList findFsFamilyStandard() const
Find the FS family standard distributors.
Simple hardcoded info about the corresponding simulator.
#define SWIFT_DEFINE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template definition of mixins for a CSequence subclass.