6 #ifndef SWIFT_MISC_SIMULATION_AIRCRAFTMODELLIST_H
7 #define SWIFT_MISC_SIMULATION_AIRCRAFTMODELLIST_H
13 #include <QJsonDocument>
18 #include <QStringList>
45 class CAirlineIcaoCode;
72 bool containsModelString(
const QString &modelString,
83 bool containsCombinedType(
const QString &combinedType)
const;
86 bool containsModelsWithAircraftIcaoDesignator(
const QString &aircraftDesignator)
const;
89 bool containsModelsWithAircraftAndAirlineIcaoDesignator(
const QString &aircraftDesignator,
90 const QString &airlineDesignator)
const;
96 bool containsMatchingSimulator(
const CSimulatorInfo &simulators)
const;
99 bool containsNotMatchingSimulator(
const CSimulatorInfo &simulators)
const;
102 bool containsMilitary()
const;
105 bool containsCivilian()
const;
108 bool containsCivilianAndMilitary()
const;
111 bool containsVtol()
const;
114 bool containsCategory()
const;
117 bool containsCategory(
int firstLevel)
const;
133 findFirstByModelStringAliasOrDefault(
const QString &modelString,
161 const QString &combinedCode)
const;
172 bool onlyIfExistInModel =
true)
const;
235 const QString &manufacturer)
const;
314 bool isLikelyFsFamilyModelList()
const;
317 bool isLikelyFsxFamilyModelList()
const;
320 bool isLikelyXPlaneModelList()
const;
349 int removeIfNotMatchingSimulator(
const CSimulatorInfo &needToMatch);
353 int removeAllWithoutModelString();
357 int removeIfExcluded();
360 int removeXPlaneFlyablePlanes();
364 int removeByDistributor(
const CDistributor &distributor);
378 int removeIfNotFsFamily();
394 QStringList getModelStringList(
bool sort =
true)
const;
421 int countModelsWithColorLivery()
const;
424 int countModelsWithAirlineLivery()
const;
427 int countVtolAircraft()
const;
433 int countMilitaryAircraft()
const;
436 int countCivilianAircraft()
const;
439 int countDifferentAirlines()
const;
442 int countCombinedTypes()
const;
445 int countAliases()
const;
448 void sortByFileName();
451 void updateDistributor(
const CDistributor &distributor);
484 QSet<QString> getAirlineDesignatorsForGroup(
int groupId)
const;
487 QSet<QString> getAirlineVDesignatorsForGroup(
int groupId)
const;
500 QString getCombinedTypesAsString(
const QString &separator =
", ")
const;
503 QSet<QString> getAicraftAndAirlineDesignators(
bool withDbId)
const;
506 QString getAicraftAndAirlineDesignatorsAsString(
bool withDbId,
const QString &separator =
", ")
const;
518 void normalizeFileNamesForDb();
542 bool ignoreEmptyFileNames,
int stopAtFailedFiles,
543 std::atomic_bool &wasStopped,
const QString &simRootDirectory,
544 bool alreadySortedByFn =
false)
const;
550 void convertFromMemoizedJson(
const QJsonObject &json,
bool fallbackToConvertToJson =
false);
569 QString htmlStatistics(
bool aircraftStats,
bool airlineStats)
const;
575 static const QString &invalidModelFileAndPath();
576 static bool hasInvalidModelFile();
581 static void addAsValidOrInvalidModel(
const CAircraftModel &model,
bool valid,
Generic ordered container with value semantics.
Generic sequential container with value semantics.
CSequence()=default
Default constructor.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
List of orderable IOrderable objects.
Value object for aircraft categories.
Value object encapsulating a list of ICAO codes.
Value object for ICAO classification.
Value object encapsulating a list of ICAO codes.
Value object for ICAO classification.
Value object encapsulating a list of ICAO codes.
Value object encapsulating information of a callsign.
Value object encapsulating information about an airpot.
Value object for a list of airports.
List of objects with callsign.
List of objects read from database. Such objects should implement.
Physical unit length (length)
Aircraft model (used by another pilot, my models on disk)
ModelMode
Mode, decides if a model is supposed to be used in the model set for model matching or not....
Value object encapsulating a list of aircraft models.
Count per simulator, small utility class allows to retrieve values as per simulator.
Value object encapsulating information of software distributor.
Value object encapsulating a list of distributors.
Simple hardcoded info about the corresponding simulator.
Free functions in swift::misc.
#define SWIFT_DECLARE_SEQUENCE_MIXINS(Namespace, T, List)
Explicit template declaration of mixins for a CSequence subclass to be placed near the top of the hea...
#define SWIFT_MISC_EXPORT
Export a class or function from the library.