[FS9] Function for at least halfway correct engine type

This commit is contained in:
Klaus Basan
2020-04-13 04:11:27 +02:00
committed by Mat Sutcliffe
parent 1ab1e8ca70
commit a3f646a792
4 changed files with 32 additions and 8 deletions

View File

@@ -385,6 +385,14 @@ namespace BlackMisc
return c;
}
QChar CAircraftIcaoCode::getAircraftTypeChar() const
{
if (m_combinedType.length() < 1) { return {}; }
QChar c(m_combinedType.at(0));
if (c == "-") { return {}; }
return c;
}
QString CAircraftIcaoCode::getCombinedModelDescription() const
{
// Shortcut for most cases

View File

@@ -145,6 +145,9 @@ namespace BlackMisc
//! Aircraft type, such a L(andplane), S(eaplane), H(elicopter)
QString getAircraftType() const;
//! Aircraft type, such a L(andplane), S(eaplane), H(elicopter)
QChar getAircraftTypeChar() const;
//! Set type
void setCombinedType(const QString &type) { m_combinedType = type.trimmed().toUpper(); }