mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
* parsing homebase from user * updating to Simulation/AircraftModel * known ICAO function * renaming, style changes * convenience functions
This commit is contained in:
@@ -29,7 +29,8 @@ namespace BlackMisc
|
||||
{
|
||||
IndexCallsignString = BlackMisc::CPropertyIndex::GlobalIndexCCallsign,
|
||||
IndexCallsignStringAsSet,
|
||||
IndexTelephonyDesignator
|
||||
IndexTelephonyDesignator,
|
||||
IndexSuffix
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
@@ -49,8 +50,13 @@ namespace BlackMisc
|
||||
bool isEmpty() const { return this->m_callsignAsSet.isEmpty(); }
|
||||
|
||||
//! ATC callsign
|
||||
//! \sa atcCallsignSuffixes()
|
||||
bool isAtcCallsign() const;
|
||||
|
||||
//! ATC alike callsign
|
||||
//! \sa atcAlikeCallsignSuffixes()
|
||||
bool isAtcAlikeCallsign() const;
|
||||
|
||||
//! Get callsign.
|
||||
const QString &asString() const { return this->m_callsign; }
|
||||
|
||||
@@ -87,9 +93,12 @@ namespace BlackMisc
|
||||
//! Valid callsign?
|
||||
static bool isValidCallsign(const QString &callsign);
|
||||
|
||||
//! List of ATC suffixes (e.g. TWR);
|
||||
//! List of real ATC suffixes (e.g. TWR);
|
||||
static const QStringList &atcCallsignSuffixes();
|
||||
|
||||
//! List of real ("TWR") and treated like ATC suffixes (e.g. OBS);
|
||||
static const QStringList &atcAlikeCallsignSuffixes();
|
||||
|
||||
protected:
|
||||
//! \copydoc CValueObject::convertToQString()
|
||||
virtual QString convertToQString(bool i18n = false) const override;
|
||||
@@ -110,10 +119,10 @@ namespace BlackMisc
|
||||
} // namespace
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CCallsign, (
|
||||
attr(o.m_callsign, flags<CaseInsensitiveComparison>()),
|
||||
attr(o.m_callsignAsSet, flags<DisabledForComparison>()),
|
||||
attr(o.m_telephonyDesignator, flags<DisabledForComparison>())
|
||||
))
|
||||
attr(o.m_callsign, flags<CaseInsensitiveComparison>()),
|
||||
attr(o.m_callsignAsSet, flags<DisabledForComparison>()),
|
||||
attr(o.m_telephonyDesignator, flags<DisabledForComparison>())
|
||||
))
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsign)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user