diff --git a/src/blackgui/components/settingscomponent.ui b/src/blackgui/components/settingscomponent.ui
index 48b929b97..7f14e49c8 100644
--- a/src/blackgui/components/settingscomponent.ui
+++ b/src/blackgui/components/settingscomponent.ui
@@ -14,7 +14,7 @@
Settings
- 6
+ 0
@@ -615,19 +615,6 @@
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
diff --git a/src/blackgui/components/settingsmatchingcomponent.ui b/src/blackgui/components/settingsmatchingcomponent.ui
index 8affd4358..74f4fd0d9 100644
--- a/src/blackgui/components/settingsmatchingcomponent.ui
+++ b/src/blackgui/components/settingsmatchingcomponent.ui
@@ -6,14 +6,14 @@
0
0
- 232
+ 230
197
Matching settings
-
+
3
@@ -27,24 +27,49 @@
3
-
-
-
-
- 0
- 150
-
+
+
+ true
+
+
+
+ 0
+ 0
+ 211
+ 375
+
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 375
+
+
+
+
+
+
-
-
- QFrame::StyledPanel
-
-
- QFrame::Raised
-
-
+
-
diff --git a/src/blackgui/editors/matchingform.cpp b/src/blackgui/editors/matchingform.cpp
index 994b9cbf1..9434efabd 100644
--- a/src/blackgui/editors/matchingform.cpp
+++ b/src/blackgui/editors/matchingform.cpp
@@ -76,6 +76,8 @@ namespace BlackGui
ui->cb_ByVtol->setChecked(mode.testFlag(CAircraftMatcherSetup::ByVtol));
ui->cb_ScoreIgnoreZeros->setChecked(mode.testFlag(CAircraftMatcherSetup::ScoreIgnoreZeros));
ui->cb_ScorePreferColorLiveries->setChecked(mode.testFlag(CAircraftMatcherSetup::ScorePreferColorLiveries));
+ ui->cb_ExclNoExcludedModels->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoExcluded));
+ ui->cb_ExclNoDbData->setChecked(mode.testFlag(CAircraftMatcherSetup::ExcludeNoDbData));
this->setMatchingAlgorithm(setup);
this->setPickStrategy(setup);
@@ -108,7 +110,8 @@ namespace BlackGui
ui->cb_ByFamily->isChecked(), ui->cb_ByLivery->isChecked(),
ui->cb_ByCombinedCode->isChecked(),
ui->cb_ByMilitary->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()
);
}
diff --git a/src/blackgui/editors/matchingform.ui b/src/blackgui/editors/matchingform.ui
index f39a8c1b5..dd14b613e 100644
--- a/src/blackgui/editors/matchingform.ui
+++ b/src/blackgui/editors/matchingform.ui
@@ -6,8 +6,8 @@
0
0
- 247
- 348
+ 293
+ 375
@@ -32,28 +32,28 @@
Algorithm
-
-
-
-
- reduction, then score based
-
-
-
- -
-
-
- reduction
-
-
-
- -
+
-
score only
- -
+
-
+
+
+ reduction
+
+
+
+ -
+
+
+ red. + score based
+
+
+
+ -
reset
@@ -86,7 +86,7 @@
-
- order (higher rank first)
+ higher rank first
@@ -95,73 +95,108 @@
-
+
+
+ 0
+ 110
+
+
Reduction
-
-
-
-
- family
-
-
-
- -
-
-
- by ICAO: airline first
-
-
-
- -
-
-
- combined code
-
-
-
- -
+
-
model string
- -
-
+
-
+
- livery
+ by ICAO: airline first
- -
+
-
Qt::Horizontal
- -
+
-
+
+
+ livery
+
+
+
+ -
by ICAO: aircraft first
- -
+
-
+
+
+ family
+
+
+
+ -
+
+
+ combined code
+
+
+
+ -
military
- -
+
-
Vertical Takeoff or Landing
- VTOL (helicopters)
+ VTOL
+
+
+
+
+
+
+ -
+
+
+ Exclusiion
+
+
+
-
+
+
+ models marked as excluded are ignored
+
+
+ Excluded models
+
+
+
+ -
+
+
+ models without DB data are ignored
+
+
+ Excl. no DB data
@@ -194,8 +229,8 @@
- rb_ScoreAndReduction
rb_Reduction
+ rb_ScoreOnly
rb_PickFirst
rb_PickRandom
rb_PickByOrder
@@ -203,10 +238,8 @@
rb_ByIcaoDataAirline1st
cb_ByModelString
cb_ByLivery
- cb_ByFamily
- cb_ByCombinedCode
- cb_ByMilitary
- cb_ByVtol
+ cb_ExclNoExcludedModels
+ cb_ExclNoDbData
cb_ScorePreferColorLiveries
cb_ScoreIgnoreZeros
diff --git a/src/blackmisc/simulation/aircraftmatchersetup.cpp b/src/blackmisc/simulation/aircraftmatchersetup.cpp
index 7d15bdf34..9a7301b17 100644
--- a/src/blackmisc/simulation/aircraftmatchersetup.cpp
+++ b/src/blackmisc/simulation/aircraftmatchersetup.cpp
@@ -129,6 +129,8 @@ namespace BlackMisc
static const QString combined("by combined code");
static const QString noZeros("scoring, ignore zero scores");
static const QString preferColorLiveries("scoring, prefer color liveries");
+ static const QString exNoDb("excl.without DB data");
+ static const QString exExcl("excl.excluded");
switch (modeFlag)
{
@@ -141,6 +143,8 @@ namespace BlackMisc
case ByIcaoOrderAirlineFirst: return icaoAirline;
case ScoreIgnoreZeros: return noZeros;
case ScorePreferColorLiveries: return preferColorLiveries;
+ case ExcludeNoDbData: return exNoDb;
+ case ExcludeNoExcluded: return exExcl;
default: break;
}
@@ -184,7 +188,8 @@ namespace BlackMisc
CAircraftMatcherSetup::MatchingMode CAircraftMatcherSetup::matchingMode(
bool byModelString, bool byIcaoDataAircraft1st, bool byIcaoDataAirline1st, bool byFamily, bool byLivery, bool byCombinedType,
bool byMilitary, bool byVtol,
- bool scoreIgnoreZeros, bool scorePreferColorLiveries)
+ bool scoreIgnoreZeros, bool scorePreferColorLiveries,
+ bool excludeNoDbData, bool excludeNoExcluded)
{
MatchingMode mode = byModelString ? ByModelString : ModeNone;
if (byIcaoDataAircraft1st) { mode |= ByIcaoOrderAircraftFirst; }
@@ -196,6 +201,8 @@ namespace BlackMisc
if (byVtol) { mode |= ByVtol; }
if (scoreIgnoreZeros) { mode |= ScoreIgnoreZeros; }
if (scorePreferColorLiveries) { mode |= ScorePreferColorLiveries; }
+ if (excludeNoDbData) { mode |= ExcludeNoDbData; }
+ if (excludeNoExcluded) { mode |= ExcludeNoExcluded; }
return mode;
}
} // namespace
diff --git a/src/blackmisc/simulation/aircraftmatchersetup.h b/src/blackmisc/simulation/aircraftmatchersetup.h
index 19e29dca9..db387f6bc 100644
--- a/src/blackmisc/simulation/aircraftmatchersetup.h
+++ b/src/blackmisc/simulation/aircraftmatchersetup.h
@@ -48,12 +48,16 @@ namespace BlackMisc
// --- score based matching ---
ScoreIgnoreZeros = 1 << 10, //!< zero scores are ignored
ScorePreferColorLiveries = 1 << 11, //!< prefer color liveries
+ // --- exclusion ---
+ ExcludeNoDbData = 1 << 12,
+ ExcludeNoExcluded = 1 << 13,
+ ExcludeDefault = ExcludeNoExcluded | ExcludeNoDbData,
// --- others ---
ModeNone = 0,
ModeByFLags = ByMilitary | ByVtol,
- ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries,
- ModeDefaultReduce = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ByLivery,
- ModeDefaultReducePlusScore = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ModeDefaultScore,
+ ModeDefaultScore = ScoreIgnoreZeros | ScorePreferColorLiveries | ExcludeDefault,
+ ModeDefaultReduce = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ByLivery | ExcludeDefault,
+ ModeDefaultReducePlusScore = ModeByFLags | ByModelString | ByFamily | ByManufacturer | ByCombinedType | ByIcaoOrderAircraftFirst | ModeDefaultScore | ExcludeDefault
};
Q_DECLARE_FLAGS(MatchingMode, MatchingModeFlag)
@@ -136,7 +140,7 @@ namespace BlackMisc
//! Mode by flags
static MatchingMode matchingMode(bool byModelString, bool byIcaoDataAircraft1st, bool byIcaoDataAirline1st,
bool byFamily, bool byLivery, bool byCombinedType, bool byMilitary, bool byVtol,
- bool scoreIgnoreZeros, bool scorePreferColorLiveries);
+ bool scoreIgnoreZeros, bool scorePreferColorLiveries, bool excludeNoDbData, bool excludeNoExcluded);
private:
int m_algorithm = static_cast(MatchingStepwiseReducePlusScoreBased);