Ref T242, utility functions for matching

* search among airline aircraft
* improved logging information
* search among airline ICAO aircraft (which aircraft does the airline use?)
* check ecosystem before merging with VATSIM data
This commit is contained in:
Klaus Basan
2018-02-07 05:21:41 +01:00
parent 10f942e702
commit e001b0338f
14 changed files with 231 additions and 27 deletions

View File

@@ -81,6 +81,13 @@ namespace BlackMisc
}
}
QString CAirlineIcaoCode::getDesignatorDbKey() const
{
return (this->isLoadedFromDb()) ?
this->getDesignator() % QStringLiteral(" ") % this->getDbKeyAsStringInParentheses() :
this->getDesignator();
}
QString CAirlineIcaoCode::getDesignatorNameCountry() const
{
QString s(this->getDesignator());
@@ -178,11 +185,11 @@ namespace BlackMisc
QString CAirlineIcaoCode::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
return m_designator %
QLatin1String(" (") % m_name % QLatin1String(")") %
QLatin1String(" Op: ") % boolToYesNo(this->isOperating()) %
QLatin1String(" VA: ") % boolToYesNo(this->isVirtualAirline()) %
QLatin1String(" Mil: ") % boolToYesNo(this->isMilitary());
return this->getDesignatorDbKey() %
(this->hasName() ? QStringLiteral(" ") % m_name : QStringLiteral("")) %
QStringLiteral(" Op: ") % boolToYesNo(this->isOperating()) %
QStringLiteral(" VA: ") % boolToYesNo(this->isVirtualAirline()) %
QStringLiteral(" Mil: ") % boolToYesNo(this->isMilitary());
}
CVariant CAirlineIcaoCode::propertyByIndex(const CPropertyIndex &index) const