mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-29 04:35:41 +08:00
feat: Add wake turbulence category enum
This commit is contained in:
@@ -225,7 +225,7 @@ namespace BlackGui::Components
|
||||
|
||||
if (aircraft.getAircraftIcaoCode().isLoadedFromDb() && aircraft.getAircraftIcaoCode().hasValidWtc())
|
||||
{
|
||||
const QString wtc = aircraft.getAircraftIcaoCode().getWtc().toUpper();
|
||||
const QString wtc = toSingleLetterCode(aircraft.getAircraftIcaoCode().getWtc());
|
||||
const bool heavyFlag = (wtc.startsWith("H", Qt::CaseInsensitive) || wtc.startsWith("S", Qt::CaseInsensitive));
|
||||
ui->cb_Heavy->setChecked(heavyFlag);
|
||||
}
|
||||
@@ -825,7 +825,7 @@ namespace BlackGui::Components
|
||||
QPointer<CFlightPlanComponent> myself(this);
|
||||
QTimer::singleShot(25, this, [=] {
|
||||
if (!myself || !sGui || sGui->isShuttingDown()) { return; }
|
||||
const bool heavy = icao.getWtc().startsWith("H");
|
||||
const bool heavy = icao.getWtc() == BlackMisc::Aviation::WakeTurbulenceCategory::HEAVY;
|
||||
ui->cb_Heavy->setChecked(heavy);
|
||||
if (heavy) { ui->cb_Tcas->setChecked(false); }
|
||||
this->buildPrefixIcaoSuffix();
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace BlackGui::Components
|
||||
CAircraftModel CModelMatcherComponent::defaultModel() const
|
||||
{
|
||||
// can somehow dynamilcally determine the models
|
||||
const CAircraftIcaoCode icaoAircraft("B737", "L2J", "FooBar", "Dummy", "M", false, false, false, 1);
|
||||
const CAircraftIcaoCode icaoAircraft("B737", "L2J", "FooBar", "Dummy", CWakeTurbulenceCategory::MEDIUM, false, false, false, 1);
|
||||
const CAirlineIcaoCode icaoAirline("Foo", "FooBar airlines", { "DE", "Germany" }, "FOO", true, true);
|
||||
const CLivery livery(CLivery::getStandardCode(icaoAirline), icaoAirline, "Standard Foo airlines", "red", "blue", false);
|
||||
CAircraftModel model("default model", CAircraftModel::TypeOwnSimulatorModel, "dummy model", icaoAircraft, livery);
|
||||
|
||||
Reference in New Issue
Block a user