mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
Ref T515, settings for matching (run validation)
This commit is contained in:
committed by
Mat Sutcliffe
parent
e46b7f5494
commit
da92f3885c
@@ -28,7 +28,6 @@ namespace BlackGui
|
|||||||
connect(ui->rb_Reduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
connect(ui->rb_Reduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
||||||
connect(ui->rb_ScoreAndReduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
connect(ui->rb_ScoreAndReduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
||||||
connect(ui->rb_ScoreOnly, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
connect(ui->rb_ScoreOnly, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
||||||
|
|
||||||
connect(ui->pb_Reset, &QPushButton::released, this, &CMatchingForm::clear, Qt::QueuedConnection);
|
connect(ui->pb_Reset, &QPushButton::released, this, &CMatchingForm::clear, Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +46,8 @@ namespace BlackGui
|
|||||||
CGuiUtility::checkBoxReadOnly(ui->cb_ScoreIgnoreZeros, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_ScoreIgnoreZeros, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_ScorePreferColorLiveries, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_ScorePreferColorLiveries, readonly);
|
||||||
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetRemoveFailed, readonly);
|
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetRemoveFailed, readonly);
|
||||||
|
CGuiUtility::checkBoxReadOnly(ui->cb_ModelFailedFailover, readonly);
|
||||||
|
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetVerification, readonly);
|
||||||
|
|
||||||
const bool enabled = !readonly;
|
const bool enabled = !readonly;
|
||||||
ui->rb_Reduction->setEnabled(enabled);
|
ui->rb_Reduction->setEnabled(enabled);
|
||||||
@@ -82,6 +83,8 @@ namespace BlackGui
|
|||||||
ui->cb_ExclNoExcludedModels->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoExcluded));
|
ui->cb_ExclNoExcludedModels->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoExcluded));
|
||||||
ui->cb_ExclNoDbData->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoDbData));
|
ui->cb_ExclNoDbData->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoDbData));
|
||||||
ui->cb_ModelSetRemoveFailed->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelSetRemoveFailedModel));
|
ui->cb_ModelSetRemoveFailed->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelSetRemoveFailedModel));
|
||||||
|
ui->cb_ModelFailedFailover->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelFailoverWhenNoModelCanBeLoaded));
|
||||||
|
ui->cb_ModelSetVerification->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelVerificationAtStartup));
|
||||||
|
|
||||||
this->setMatchingAlgorithm(setup);
|
this->setMatchingAlgorithm(setup);
|
||||||
this->setPickStrategy(setup);
|
this->setPickStrategy(setup);
|
||||||
@@ -118,7 +121,8 @@ namespace BlackGui
|
|||||||
ui->cb_ByVtol->isChecked(),
|
ui->cb_ByVtol->isChecked(),
|
||||||
ui->cb_ScoreIgnoreZeros->isChecked(), ui->cb_ScorePreferColorLiveries->isChecked(),
|
ui->cb_ScoreIgnoreZeros->isChecked(), ui->cb_ScorePreferColorLiveries->isChecked(),
|
||||||
ui->cb_ExclNoDbData->isChecked(), ui->cb_ExclNoExcludedModels->isChecked(),
|
ui->cb_ExclNoDbData->isChecked(), ui->cb_ExclNoExcludedModels->isChecked(),
|
||||||
ui->cb_ModelSetRemoveFailed->isChecked()
|
ui->cb_ModelSetVerification->isChecked(), ui->cb_ModelSetRemoveFailed->isChecked(),
|
||||||
|
ui->cb_ModelFailedFailover->isChecked()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>293</width>
|
<width>293</width>
|
||||||
<height>453</height>
|
<height>465</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -190,13 +190,30 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_FailureHandling">
|
<widget class="QGroupBox" name="gb_FailureHandling">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Failure handling</string>
|
<string>Failure handling and verification</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="hFailureHandling">
|
<layout class="QGridLayout" name="gl_FailureHandling">
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="cb_ModelSetRemoveFailed">
|
<widget class="QCheckBox" name="cb_ModelSetRemoveFailed">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>temp.remove failed from model set</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>removed failed from set</string>
|
<string>temp.remove failed</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="cb_ModelSetVerification">
|
||||||
|
<property name="text">
|
||||||
|
<string>verify set on startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="cb_ModelFailedFailover">
|
||||||
|
<property name="text">
|
||||||
|
<string>use other model if failed</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -215,7 +232,7 @@
|
|||||||
<string>models marked as excluded are ignored</string>
|
<string>models marked as excluded are ignored</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Excluded models</string>
|
<string>excluded models</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -225,7 +242,7 @@
|
|||||||
<string>models without DB data are ignored</string>
|
<string>models without DB data are ignored</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Exclude if no DB data</string>
|
<string>exclude if no DB data</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -274,7 +291,9 @@
|
|||||||
<tabstop>cb_ByVtol</tabstop>
|
<tabstop>cb_ByVtol</tabstop>
|
||||||
<tabstop>cb_ByForceMilitary</tabstop>
|
<tabstop>cb_ByForceMilitary</tabstop>
|
||||||
<tabstop>cb_ByForceCivilian</tabstop>
|
<tabstop>cb_ByForceCivilian</tabstop>
|
||||||
|
<tabstop>cb_ModelSetVerification</tabstop>
|
||||||
<tabstop>cb_ModelSetRemoveFailed</tabstop>
|
<tabstop>cb_ModelSetRemoveFailed</tabstop>
|
||||||
|
<tabstop>cb_ModelFailedFailover</tabstop>
|
||||||
<tabstop>cb_ExclNoExcludedModels</tabstop>
|
<tabstop>cb_ExclNoExcludedModels</tabstop>
|
||||||
<tabstop>cb_ExclNoDbData</tabstop>
|
<tabstop>cb_ExclNoDbData</tabstop>
|
||||||
<tabstop>cb_ScorePreferColorLiveries</tabstop>
|
<tabstop>cb_ScorePreferColorLiveries</tabstop>
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ namespace BlackMisc
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAircraftMatcherSetup::setVerificationAtStartup(bool verify)
|
||||||
|
{
|
||||||
|
MatchingMode m = this->getMatchingMode();
|
||||||
|
m.setFlag(ModelVerificationAtStartup, verify);
|
||||||
|
this->setMatchingMode(m);
|
||||||
|
}
|
||||||
|
|
||||||
QString CAircraftMatcherSetup::convertToQString(bool i18n) const
|
QString CAircraftMatcherSetup::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n);
|
||||||
@@ -61,8 +68,8 @@ namespace BlackMisc
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexMatchingAlgorithm: return CVariant::fromValue(m_algorithm);
|
case IndexMatchingAlgorithm: return CVariant::fromValue(m_algorithm);
|
||||||
case IndexMatchingMode: return CVariant::fromValue(m_mode);
|
case IndexMatchingMode: return CVariant::fromValue(m_mode);
|
||||||
case IndexPickStrategy: return CVariant::fromValue(m_strategy);
|
case IndexPickStrategy: return CVariant::fromValue(m_strategy);
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
return CValueObject::propertyByIndex(index);
|
return CValueObject::propertyByIndex(index);
|
||||||
@@ -75,8 +82,8 @@ namespace BlackMisc
|
|||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexMatchingAlgorithm: m_algorithm = variant.toInt(); break;
|
case IndexMatchingAlgorithm: m_algorithm = variant.toInt(); break;
|
||||||
case IndexMatchingMode: m_mode = variant.toInt(); break;
|
case IndexMatchingMode: m_mode = variant.toInt(); break;
|
||||||
case IndexPickStrategy: m_strategy = variant.toInt(); break;
|
case IndexPickStrategy: m_strategy = variant.toInt(); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
CValueObject::setPropertyByIndex(index, variant);
|
CValueObject::setPropertyByIndex(index, variant);
|
||||||
@@ -88,12 +95,8 @@ namespace BlackMisc
|
|||||||
MatchingMode mode = ModeNone;
|
MatchingMode mode = ModeNone;
|
||||||
switch (algorithm)
|
switch (algorithm)
|
||||||
{
|
{
|
||||||
case MatchingStepwiseReduce:
|
case MatchingStepwiseReduce: mode = ModeDefaultReduce; break;
|
||||||
mode = ModeDefaultReduce;
|
case MatchingScoreBased: mode = ModeDefaultScore; break;
|
||||||
break;
|
|
||||||
case MatchingScoreBased:
|
|
||||||
mode = ModeDefaultScore;
|
|
||||||
break;
|
|
||||||
case MatchingStepwiseReducePlusScoreBased:
|
case MatchingStepwiseReducePlusScoreBased:
|
||||||
default:
|
default:
|
||||||
mode = ModeDefaultReducePlusScore;
|
mode = ModeDefaultReducePlusScore;
|
||||||
@@ -134,25 +137,29 @@ namespace BlackMisc
|
|||||||
static const QString preferColorLiveries("scoring, prefer color liveries");
|
static const QString preferColorLiveries("scoring, prefer color liveries");
|
||||||
static const QString exNoDb("excl.without DB data");
|
static const QString exNoDb("excl.without DB data");
|
||||||
static const QString exExcl("excl.excluded");
|
static const QString exExcl("excl.excluded");
|
||||||
static const QString remModelSet("rem.from model set");
|
static const QString removeFromModelSet("rem.from model set");
|
||||||
|
static const QString verification("Verify models at startup");
|
||||||
|
static const QString modelFailedLoad("Replace models failed to load");
|
||||||
|
|
||||||
switch (modeFlag)
|
switch (modeFlag)
|
||||||
{
|
{
|
||||||
case ByModelString: return ms;
|
case ByModelString: return ms;
|
||||||
case ByIcaoData: return icao;
|
case ByIcaoData: return icao;
|
||||||
case ByFamily: return family;
|
case ByFamily: return family;
|
||||||
case ByLivery: return livery;
|
case ByLivery: return livery;
|
||||||
case ByCombinedType: return combined;
|
case ByCombinedType: return combined;
|
||||||
case ByIcaoOrderAircraftFirst: return icaoAircraft;
|
case ByIcaoOrderAircraftFirst: return icaoAircraft;
|
||||||
case ByIcaoOrderAirlineFirst: return icaoAirline;
|
case ByIcaoOrderAirlineFirst: return icaoAirline;
|
||||||
case ByForceCivilian: return forceCiv;
|
case ByForceCivilian: return forceCiv;
|
||||||
case ByForceMilitary: return forceMil;
|
case ByForceMilitary: return forceMil;
|
||||||
case ByVtol: return vtol;
|
case ByVtol: return vtol;
|
||||||
case ScoreIgnoreZeros: return noZeros;
|
case ScoreIgnoreZeros: return noZeros;
|
||||||
case ScorePreferColorLiveries: return preferColorLiveries;
|
case ScorePreferColorLiveries: return preferColorLiveries;
|
||||||
case ExcludeNoDbData: return exNoDb;
|
case ExcludeNoDbData: return exNoDb;
|
||||||
case ExcludeNoExcluded: return exExcl;
|
case ExcludeNoExcluded: return exExcl;
|
||||||
case ModelSetRemoveFailedModel: return remModelSet;
|
case ModelSetRemoveFailedModel: return removeFromModelSet;
|
||||||
|
case ModelVerificationAtStartup: return verification;
|
||||||
|
case ModelFailoverWhenNoModelCanBeLoaded: return modelFailedLoad;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,19 +170,22 @@ namespace BlackMisc
|
|||||||
QString CAircraftMatcherSetup::modeToString(MatchingMode mode)
|
QString CAircraftMatcherSetup::modeToString(MatchingMode mode)
|
||||||
{
|
{
|
||||||
QStringList modes;
|
QStringList modes;
|
||||||
if (mode.testFlag(ByModelString)) { modes << modeFlagToString(ByModelString); }
|
if (mode.testFlag(ByModelString)) { modes << modeFlagToString(ByModelString); }
|
||||||
if (mode.testFlag(ByIcaoData)) { modes << modeFlagToString(ByIcaoData); }
|
if (mode.testFlag(ByIcaoData)) { modes << modeFlagToString(ByIcaoData); }
|
||||||
if (mode.testFlag(ByIcaoOrderAircraftFirst)) { modes << modeFlagToString(ByIcaoOrderAircraftFirst); }
|
if (mode.testFlag(ByIcaoOrderAircraftFirst)) { modes << modeFlagToString(ByIcaoOrderAircraftFirst); }
|
||||||
if (mode.testFlag(ByIcaoOrderAirlineFirst)) { modes << modeFlagToString(ByIcaoOrderAirlineFirst); }
|
if (mode.testFlag(ByIcaoOrderAirlineFirst)) { modes << modeFlagToString(ByIcaoOrderAirlineFirst); }
|
||||||
if (mode.testFlag(ByFamily)) { modes << modeFlagToString(ByFamily); }
|
if (mode.testFlag(ByFamily)) { modes << modeFlagToString(ByFamily); }
|
||||||
if (mode.testFlag(ByLivery)) { modes << modeFlagToString(ByLivery); }
|
if (mode.testFlag(ByLivery)) { modes << modeFlagToString(ByLivery); }
|
||||||
if (mode.testFlag(ByCombinedType)) { modes << modeFlagToString(ByCombinedType); }
|
if (mode.testFlag(ByCombinedType)) { modes << modeFlagToString(ByCombinedType); }
|
||||||
if (mode.testFlag(ByForceCivilian)) { modes << modeFlagToString(ByForceCivilian); }
|
if (mode.testFlag(ByForceCivilian)) { modes << modeFlagToString(ByForceCivilian); }
|
||||||
if (mode.testFlag(ByForceMilitary)) { modes << modeFlagToString(ByForceMilitary); }
|
if (mode.testFlag(ByForceMilitary)) { modes << modeFlagToString(ByForceMilitary); }
|
||||||
if (mode.testFlag(ByVtol)) { modes << modeFlagToString(ByVtol); }
|
if (mode.testFlag(ByVtol)) { modes << modeFlagToString(ByVtol); }
|
||||||
if (mode.testFlag(ScoreIgnoreZeros)) { modes << modeFlagToString(ScoreIgnoreZeros); }
|
if (mode.testFlag(ScoreIgnoreZeros)) { modes << modeFlagToString(ScoreIgnoreZeros); }
|
||||||
if (mode.testFlag(ScorePreferColorLiveries)) { modes << modeFlagToString(ScorePreferColorLiveries); }
|
if (mode.testFlag(ScorePreferColorLiveries)) { modes << modeFlagToString(ScorePreferColorLiveries); }
|
||||||
if (mode.testFlag(ModelSetRemoveFailedModel)) { modes << modeFlagToString(ModelSetRemoveFailedModel); }
|
if (mode.testFlag(ModelSetRemoveFailedModel)) { modes << modeFlagToString(ModelSetRemoveFailedModel); }
|
||||||
|
if (mode.testFlag(ModelVerificationAtStartup)) { modes << modeFlagToString(ModelVerificationAtStartup); }
|
||||||
|
if (mode.testFlag(ModelFailoverWhenNoModelCanBeLoaded)) { modes << modeFlagToString(ModelFailoverWhenNoModelCanBeLoaded); }
|
||||||
|
|
||||||
return modes.join(", ");
|
return modes.join(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,22 +212,24 @@ namespace BlackMisc
|
|||||||
bool byVtol,
|
bool byVtol,
|
||||||
bool scoreIgnoreZeros, bool scorePreferColorLiveries,
|
bool scoreIgnoreZeros, bool scorePreferColorLiveries,
|
||||||
bool excludeNoDbData, bool excludeNoExcluded,
|
bool excludeNoDbData, bool excludeNoExcluded,
|
||||||
bool modelSetRemoveFailedModel)
|
bool modelVerification, bool modelSetRemoveFailedModel, bool modelFailover)
|
||||||
{
|
{
|
||||||
MatchingMode mode = byModelString ? ByModelString : ModeNone;
|
MatchingMode mode = byModelString ? ByModelString : ModeNone;
|
||||||
if (byIcaoDataAircraft1st) { mode |= ByIcaoOrderAircraftFirst; }
|
if (byIcaoDataAircraft1st) { mode |= ByIcaoOrderAircraftFirst; }
|
||||||
if (byIcaoDataAirline1st) { mode |= ByIcaoOrderAirlineFirst; }
|
if (byIcaoDataAirline1st) { mode |= ByIcaoOrderAirlineFirst; }
|
||||||
if (byFamily) { mode |= ByFamily; }
|
if (byFamily) { mode |= ByFamily; }
|
||||||
if (byLivery) { mode |= ByLivery; }
|
if (byLivery) { mode |= ByLivery; }
|
||||||
if (byCombinedType) { mode |= ByCombinedType; }
|
if (byCombinedType) { mode |= ByCombinedType; }
|
||||||
if (byForceMilitary) { mode |= ByForceMilitary; }
|
if (byForceMilitary) { mode |= ByForceMilitary; }
|
||||||
if (byForceCivilian) { mode |= ByForceCivilian; }
|
if (byForceCivilian) { mode |= ByForceCivilian; }
|
||||||
if (byVtol) { mode |= ByVtol; }
|
if (byVtol) { mode |= ByVtol; }
|
||||||
if (scoreIgnoreZeros) { mode |= ScoreIgnoreZeros; }
|
if (scoreIgnoreZeros) { mode |= ScoreIgnoreZeros; }
|
||||||
if (scorePreferColorLiveries) { mode |= ScorePreferColorLiveries; }
|
if (scorePreferColorLiveries) { mode |= ScorePreferColorLiveries; }
|
||||||
if (excludeNoDbData) { mode |= ExcludeNoDbData; }
|
if (excludeNoDbData) { mode |= ExcludeNoDbData; }
|
||||||
if (excludeNoExcluded) { mode |= ExcludeNoExcluded; }
|
if (excludeNoExcluded) { mode |= ExcludeNoExcluded; }
|
||||||
if (modelSetRemoveFailedModel) { mode |= ModelSetRemoveFailedModel; }
|
if (modelSetRemoveFailedModel) { mode |= ModelSetRemoveFailedModel; }
|
||||||
|
if (modelVerification) { mode |= ModelVerificationAtStartup; }
|
||||||
|
if (modelFailover) { mode |= ModelFailoverWhenNoModelCanBeLoaded; }
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -55,13 +55,18 @@ namespace BlackMisc
|
|||||||
ExcludeNoExcluded = 1 << 14,
|
ExcludeNoExcluded = 1 << 14,
|
||||||
ExcludeDefault = ExcludeNoExcluded | ExcludeNoDbData,
|
ExcludeDefault = ExcludeNoExcluded | ExcludeNoDbData,
|
||||||
// --- model set ---
|
// --- model set ---
|
||||||
ModelSetRemoveFailedModel = 1 << 15,
|
ModelSetRemoveFailedModel = 1 << 15,
|
||||||
|
ModelVerificationAtStartup = 1 << 16,
|
||||||
|
ModelFailoverWhenNoModelCanBeLoaded = 1 << 17,
|
||||||
// --- others ---
|
// --- others ---
|
||||||
ModeNone = 0,
|
ModeNone = 0,
|
||||||
ModeByFLags = ByMilitary | ByVtol,
|
ModeByFLags = ByMilitary | ByVtol,
|
||||||
|
// ModeDefaultSet = ModelSetRemoveFailedModel | ModelVerificationAtStartup | ModelFailoverWhenNoModelCanBeLoaded,
|
||||||
|
ModeDefaultSet = ModelSetRemoveFailedModel | ModelFailoverWhenNoModelCanBeLoaded,
|
||||||
ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries | ExcludeDefault,
|
ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries | ExcludeDefault,
|
||||||
ModeDefaultReduce = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ByLivery | ExcludeDefault,
|
ModeDefaultReduce = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ByLivery | ExcludeDefault,
|
||||||
ModeDefaultReducePlusScore = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ModeDefaultScore | ExcludeDefault
|
ModeDefaultReducePlusScore = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ModeDefaultScore | ExcludeDefault,
|
||||||
|
ModeDefault = ModeDefaultReducePlusScore | ModeDefaultSet
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(MatchingMode, MatchingModeFlag)
|
Q_DECLARE_FLAGS(MatchingMode, MatchingModeFlag)
|
||||||
|
|
||||||
@@ -102,6 +107,13 @@ namespace BlackMisc
|
|||||||
//! Matching mode
|
//! Matching mode
|
||||||
MatchingMode getMatchingMode() const { return static_cast<MatchingMode>(m_mode); }
|
MatchingMode getMatchingMode() const { return static_cast<MatchingMode>(m_mode); }
|
||||||
|
|
||||||
|
//! Verification at startup?
|
||||||
|
//! \sa ModelVerificationOnStartup
|
||||||
|
bool doVerificationAtStartup() const { return this->getMatchingMode().testFlag(ModelVerificationAtStartup); }
|
||||||
|
|
||||||
|
//! Set startup verification
|
||||||
|
void setVerificationAtStartup(bool verify);
|
||||||
|
|
||||||
//! Matching mode as string
|
//! Matching mode as string
|
||||||
QString getMatchingModeAsString() const { return modeToString(this->getMatchingMode()); }
|
QString getMatchingModeAsString() const { return modeToString(this->getMatchingMode()); }
|
||||||
|
|
||||||
@@ -149,13 +161,13 @@ namespace BlackMisc
|
|||||||
bool byFamily, bool byLivery, bool byCombinedType,
|
bool byFamily, bool byLivery, bool byCombinedType,
|
||||||
bool byForceMilitary, bool byForceCivilian,
|
bool byForceMilitary, bool byForceCivilian,
|
||||||
bool byVtol,
|
bool byVtol,
|
||||||
bool scoreIgnoreZeros, bool scorePreferColorLiveries, bool excludeNoDbData, bool excludeNoExcluded,
|
bool scoreIgnoreZeros, bool scorePreferColorLiveries, bool excludeNoDbData, bool excludeNoExcluded,
|
||||||
bool modelSetRemoveFailedModel);
|
bool modelVerification, bool modelSetRemoveFailedModel, bool modelFailover);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_algorithm = static_cast<int>(MatchingStepwiseReducePlusScoreBased);
|
int m_algorithm = static_cast<int>(ModeDefault);
|
||||||
int m_mode = static_cast<int>(ModeDefaultReducePlusScore);
|
int m_mode = static_cast<int>(ModeDefaultReducePlusScore);
|
||||||
int m_strategy = static_cast<int>(PickByOrder);
|
int m_strategy = static_cast<int>(PickByOrder);
|
||||||
|
|
||||||
BLACK_METACLASS(
|
BLACK_METACLASS(
|
||||||
CAircraftMatcherSetup,
|
CAircraftMatcherSetup,
|
||||||
|
|||||||
Reference in New Issue
Block a user