Hide model string for ATC clients

This commit is contained in:
Klaus Basan
2014-12-20 18:13:47 +01:00
parent a03bd4d07f
commit 0b03ac1339
6 changed files with 71 additions and 19 deletions

View File

@@ -58,6 +58,22 @@ namespace BlackMisc
}
}
/*
* ATC callsign?
*/
bool CCallsign::isAtcCallsign() const
{
if (this->m_callsignAsSet.contains('_'))
{
if (this->m_callsignAsSet.size() >= 3)
{
QString app = this->m_callsignAsSet.right(3);
return atcCallsignAppendixes().contains(app, Qt::CaseInsensitive);
}
}
return false;
}
/*
* Callsign as Observer
*/
@@ -136,5 +152,14 @@ namespace BlackMisc
return (regexp.match(callsign).hasMatch());
}
/*
* Appendixes
*/
const QStringList &CCallsign::atcCallsignAppendixes()
{
static const QStringList a( { "APP", "GND", "TWR", "DEL", "CTR", "SUP", "FSS" });
return a;
}
} // namespace
} // namespace