swift
|
Matcher settings. More...
Public Types | |
enum | MatchingAlgorithm { MatchingScoreBased , MatchingStepwiseReducePlusScoreBased , MatchingStepwiseReduce } |
Matching algorithm. | |
enum | MatchingModeFlag { ByModelString = 1 << 0 , ByIcaoData = 1 << 1 , ByFamily = 1 << 2 , ByLivery = 1 << 3 , ByCombinedType = 1 << 4 , ByManufacturer = 1 << 5 , ByMilitary = 1 << 6 , ByCivilian = 1 << 7 , ByMilOrCivilian = ByCivilian | ByMilitary , ByVtol = 1 << 8 , ByIcaoOrderAircraftFirst = (1 << 9) | ByIcaoData , ByIcaoOrderAirlineFirst = (1 << 10) | ByIcaoData , ByAirlineGroupSameAsAirline = (1 << 11) | ByIcaoData , ByAirlineGroupIfNoAirline = (1 << 12) | ByIcaoData , ExcludeNoDbData = 1 << 13 , ExcludeNoExcluded = 1 << 14 , ExcludeDefault = ExcludeNoExcluded | ExcludeNoDbData , ModelSetRemoveFailedModel = 1 << 15 , ModelVerificationAtStartup = 1 << 16 , ModelFailoverIfNoModelCanBeAdded = 1 << 17 , ModelVerificationOnlyWarnError = 1 << 18 , ByCategoryGlider = 1 << 20 , ByCategoryMilitary = 1 << 21 , ByCategorySmallAircraft = 1 << 22 , ReverseLookupModelString = 1 << 25 , ReverseLookupSwiftLiveryIds = 1 << 26 , ReverseLookupDefault = ReverseLookupModelString | ReverseLookupSwiftLiveryIds , ScoreIgnoreZeros = 1 << 28 , ScorePreferColorLiveries = 1 << 29 , ModeNone = 0 , ModeByFLags = ByMilOrCivilian | ByVtol , ModeDefaultSet = ModelSetRemoveFailedModel | ModelVerificationAtStartup | ModelFailoverIfNoModelCanBeAdded , ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries | ExcludeDefault | ReverseLookupDefault , ModeDefaultReduce , ModeDefaultReducePlusScore } |
Enabled matching mode flags. More... | |
enum | ForceModeFlag { ForceNothing = 0 , ForceType = 1 << 0 , ForceEnginecount = 1 << 1 , ForceEngine = 1 << 2 } |
Force values. | |
enum | PickSimilarStrategy { PickFirst , PickRandom , PickByOrder } |
How to pick among similar candiates. | |
enum | ColumnIndex { IndexMatchingAlgorithm = CPropertyIndexRef::GlobalIndexCAircraftMatcherSetup , IndexMatchingMode , IndexForceMode , IndexPickStrategy , IndexMsNetworkEntryFile , IndexMsMatchingStageFile , IndexMsNetworkEnabled , IndexMsMatchingStageEnabled } |
Properties by index. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
Public Member Functions | |
CAircraftMatcherSetup () | |
Constructor. | |
CAircraftMatcherSetup (MatchingAlgorithm algorithm) | |
Constructor. | |
CAircraftMatcherSetup (MatchingAlgorithm algorithm, MatchingMode mode, PickSimilarStrategy pickStrategy) | |
Constructor. | |
MatchingAlgorithm | getMatchingAlgorithm () const |
Algorithm. | |
const QString & | getMatchingAlgorithmAsString () const |
Algorithm as string. | |
bool | setMatchingAlgorithm (MatchingAlgorithm algorithm, bool reset=true) |
Algorithm. | |
MatchingMode | getMatchingMode () const |
Matching mode. | |
ForceMode | getForceMode () const |
Force mode. | |
void | setForceMode (ForceMode fm) |
Force mode. | |
QString | getForceModeAsString () const |
Force mode as string. | |
bool | isDbDataOnly () const |
DB data? | |
bool | doVerificationAtStartup () const |
Verification at startup? More... | |
bool | onlyShowVerificationWarningsAndErrors () const |
Verification only shown for warning/errors? More... | |
bool | doModelAddFailover () const |
Failover if model cannot be loaded. More... | |
void | setVerificationAtStartup (bool verify) |
Set startup verification. | |
void | setOnlyShowVerificationWarningsAndErrors (bool only) |
Set the "show only errors" mode. | |
QString | getMatchingModeAsString () const |
Matching mode as string. | |
void | setMatchingMode (MatchingMode mode) |
Dynamic offset values? | |
bool | removeFromSetIfFailed () const |
Remove if failed? | |
PickSimilarStrategy | getPickStrategy () const |
Strategy among equally suitable models. | |
const QString & | getPickStrategyAsString () const |
Strategy as string. | |
void | setPickStrategy (PickSimilarStrategy strategy) |
Set the strategy. | |
void | setAirlineGroupBehaviour (bool ifNoAirline, bool sameAsAirline) |
Airline group behaviour. | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
void | reset () |
Reset. | |
void | reset (MatchingAlgorithm algorithm) |
Reset. | |
bool | useCategoryMatching () const |
Use category matching. | |
bool | isReverseLookupModelString () const |
Reverse lookup. | |
bool | isReverseLookupSwiftLiveryIds () const |
Reverse lookup. | |
void | resetReverseLookup () |
Reverse lookup. | |
const QString & | getMsReverseLookupFile () const |
Get matching files. | |
const QString & | getMsMatchingStageFile () const |
Get matching files. | |
void | setMsReverseLookupFile (const QString &file) |
Set matching files. | |
void | setMsMatchingStageFile (const QString &file) |
Set matching files. | |
bool | isMsReverseLookupEnabled () const |
Is matching script enabled. | |
bool | isMsMatchingStageEnabled () const |
Is matching script enabled. | |
bool | doRunMsReverseLookupScript () const |
Run the scripts. | |
bool | doRunMsMatchingStageScript () const |
Run the scripts. | |
void | setMsReverseLookupEnabled (bool enabled) |
Is matching script enabled. | |
void | setMsMatchingStageEnabled (bool enabled) |
Is matching script enabled. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
void | marshallToDbus (QDBusArgument &arg, Tags...) const |
Marshall without begin/endStructure, for when composed within another object. | |
void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
Unmarshall without begin/endStructure, for when composed within another object. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
QJsonObject | toJson () const |
Cast to JSON object. | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
Static Public Member Functions | |
static const QString & | algorithmToString (MatchingAlgorithm algorithm) |
Algorithm to string. | |
static const QString & | modeFlagToString (MatchingModeFlag modeFlag) |
Enumeration as string. | |
static QString | modeToString (MatchingMode mode) |
Enumeration as string. | |
static const QString & | forceFlagToString (ForceModeFlag forceFlag) |
Force flag to string. | |
static QString | forceToString (ForceMode force) |
Force to string. | |
static const QString & | strategyToString (PickSimilarStrategy strategy) |
Strategy to string. | |
static MatchingMode | matchingMode (bool revModelString, bool revLiveryIds, bool byModelString, bool byIcaoDataAircraft1st, bool byIcaoDataAirline1st, bool byFamily, bool byLivery, bool byCombinedType, bool byForceMilitary, bool byForceCivilian, bool byVtol, bool byGliderCategory, bool byMilitaryCategory, bool bySmallAircraftCategory, bool scoreIgnoreZeros, bool scorePreferColorLiveries, bool excludeNoDbData, bool excludeNoExcluded, bool modelVerification, bool modelVerificationWarnError, bool modelSetRemoveFailedModel, bool modelFailover) |
Mode by flags. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Get object from JSON string. | |
Additional Inherited Members | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
CEmpty ()=default | |
Protected default constructor. | |
CEmpty (const CEmpty &)=default | |
Protected copy constructor. | |
CEmpty & | operator= (const CEmpty &)=default |
Protected copy assignment operator. | |
~CEmpty ()=default | |
Non-virtual protected destructor. | |
Matcher settings.
Definition at line 17 of file aircraftmatchersetup.h.
Enabled matching mode flags.
Definition at line 29 of file aircraftmatchersetup.h.
QString swift::misc::simulation::CAircraftMatcherSetup::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 88 of file aircraftmatchersetup.cpp.
|
inline |
Failover if model cannot be loaded.
Definition at line 203 of file aircraftmatchersetup.h.
|
inline |
Verification at startup?
Definition at line 192 of file aircraftmatchersetup.h.
|
inline |
Verification only shown for warning/errors?
Definition at line 196 of file aircraftmatchersetup.h.
QVariant swift::misc::simulation::CAircraftMatcherSetup::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 96 of file aircraftmatchersetup.cpp.
void swift::misc::simulation::CAircraftMatcherSetup::setPropertyByIndex | ( | CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 115 of file aircraftmatchersetup.cpp.