mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Get current callsign as observer callsign.
This will be used with OBS mode login.
This commit is contained in:
@@ -41,6 +41,18 @@ namespace BlackMisc
|
|||||||
return unified;
|
return unified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Callsign as Observer
|
||||||
|
*/
|
||||||
|
QString CCallsign::getAsObserverCallsignString() const
|
||||||
|
{
|
||||||
|
if (this->isEmpty()) return "";
|
||||||
|
QString obs = this->getStringAsSet();
|
||||||
|
if (obs.endsWith("_OBS", Qt::CaseInsensitive)) return obs;
|
||||||
|
if (obs.contains('_')) obs = obs.left(obs.lastIndexOf('_'));
|
||||||
|
return obs.append("_OBS").toUpper();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Equals callsign?
|
* Equals callsign?
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -76,11 +76,17 @@ namespace BlackMisc
|
|||||||
const QString &getCallsignPronounced() const { return this->m_callsignPronounced; }
|
const QString &getCallsignPronounced() const { return this->m_callsignPronounced; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get ICAO code, if this possible
|
* \brief Get ICAO code, if this makes sense (EDDF_TWR -> EDDF)
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
QString getIcaoCode() const { return m_callsign.left(4).toUpper(); }
|
QString getIcaoCode() const { return m_callsign.left(4).toUpper(); }
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Makes this callsign looking like an observer callsign (DAMBZ -> DAMBZ_OBS)
|
||||||
|
* \return
|
||||||
|
*/
|
||||||
|
QString getAsObserverCallsignString() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Equals callsign string?
|
* \brief Equals callsign string?
|
||||||
* \param callsignString
|
* \param callsignString
|
||||||
|
|||||||
Reference in New Issue
Block a user