mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Better CSimulatedAircraft::getNetworkModelAirlineIcaoDifference / CSimulatedAircraft::getNetworkModelAircraftIcaoDifference
This commit is contained in:
@@ -455,17 +455,36 @@ namespace BlackMisc
|
||||
{
|
||||
const CAircraftIcaoCode icao(this->getModel().getAircraftIcaoCode());
|
||||
const CAircraftIcaoCode icaoNw(this->getNetworkModel().getAircraftIcaoCode());
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[=] ") + icao.getDesignator(); }
|
||||
if (!icao.hasDesignator()) { return QStringLiteral("[x] no sim."); }
|
||||
if (!icaoNw.hasDesignator()) { return QStringLiteral("[x] no nw."); }
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[==] ") % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return QStringLiteral("[=] ") % icao.getDesignator(); }
|
||||
static const QString diff("%1 -> %2");
|
||||
return diff.arg(icaoNw.getDesignator(), icao.getDesignator());
|
||||
}
|
||||
|
||||
QString CSimulatedAircraft::getNetworkModelAirlineIcaoDifference() const
|
||||
{
|
||||
static const QString diff("%1 -> %2");
|
||||
|
||||
if (this->getModel().getLivery().isColorLivery() || this->getNetworkModel().getLivery().isColorLivery())
|
||||
{
|
||||
if (this->getModel().getLivery().isColorLivery() && this->getNetworkModel().getLivery().isColorLivery())
|
||||
{
|
||||
return ("col/col");
|
||||
}
|
||||
|
||||
if (this->getModel().getLivery().isColorLivery())
|
||||
{
|
||||
return diff.arg("col", this->getNetworkModel().getAirlineIcaoCode().getDesignator());
|
||||
}
|
||||
return diff.arg(this->getNetworkModel().getAirlineIcaoCode().getDesignator(), "col");
|
||||
}
|
||||
|
||||
const CAirlineIcaoCode icao(this->getModel().getAirlineIcaoCode());
|
||||
const CAirlineIcaoCode icaoNw(this->getNetworkModel().getAirlineIcaoCode());
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[=] ") + icao.getDesignator(); }
|
||||
static const QString diff("%1 -> %2");
|
||||
if (icao.isDbEqual(icaoNw) || icao == icaoNw) { return QStringLiteral("[==] ") % icao.getDesignatorDbKey(); }
|
||||
if (icao.getDesignator() == icaoNw.getDesignator()) { return QStringLiteral("[=] ") % icao.getDesignatorDbKey(); }
|
||||
return diff.arg(icaoNw.getDesignator(), icao.getDesignator());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user