Get current callsign as observer callsign.

This will be used with OBS mode login.
This commit is contained in:
Klaus Basan
2014-01-13 01:57:42 +01:00
parent 28a64c5371
commit 7cc35b24d3
2 changed files with 19 additions and 1 deletions

View File

@@ -41,6 +41,18 @@ namespace BlackMisc
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?
*/