6#ifndef SWIFT_MISC_AVIATION_CALLSIGN_H
7#define SWIFT_MISC_AVIATION_CALLSIGN_H
35 IndexCallsignString = CPropertyIndexRef::GlobalIndexCCallsign,
36 IndexCallsignStringAsSet,
37 IndexTelephonyDesignator,
63 bool isEmpty()
const {
return m_callsignAsSet.isEmpty(); }
67 bool isAtcCallsign()
const;
71 bool isAtcAlikeCallsign()
const;
74 bool isObserverCallsign()
const;
77 bool isSupervisorCallsign()
const;
81 bool isBroadcastCallsign()
const;
85 void markAsBroadcastCallsign();
88 void markAsWallopCallsign();
93 bool isMaybeCopilotCallsign(
const CCallsign &pilotCallsign)
const;
102 QString getFsdCallsignString()
const;
105 bool isSameAsSet()
const;
120 QString getAsObserverCallsignString()
const;
127 QString getAirlinePrefix()
const;
133 QString getFlightIndentification()
const;
136 QString getFlightNumber()
const;
139 int getFlightNumberInt()
const;
142 bool hasSuffix()
const;
145 bool hasAtcSuffix()
const;
148 int getSuffixSortOrder()
const;
151 bool equalsString(
const QString &callsignString)
const;
154 bool isValid()
const;
169 QString convertToQString(
bool i18n =
false)
const;
175 static int suffixToSortOrder(
const QString &suffix);
178 static bool isValidAircraftCallsign(
const QString &callsign);
181 static bool isValidAircraftCallsign(
const CCallsign &callsign);
184 static bool isValidAtcCallsign(
const QString &callsign);
187 static bool isValidAtcCallsign(
const CCallsign &callsign);
190 static QString unifyCallsign(
const QString &callsign, TypeHint hint = NoHint);
196 static const QStringList &atcAlikeCallsignSuffixes();
199 static bool looksLikeAtcCallsign(
const QString &callsign);
202 static const CIcon &atcSuffixToIcon(
const QString &suffix);
217 CStatusMessage::StatusSeverity s = CStatusMessage::SeverityInfo);
220 static void registerMetadata();
226 TypeHint m_typeHint = NoHint;
231 SWIFT_METAMEMBER(callsignAsSet, 0, DisabledForComparison | DisabledForHashing),
232 SWIFT_METAMEMBER(telephonyDesignator, 0, DisabledForComparison | DisabledForHashing),
Value object for icons. An icon is stored in the global icon repository and identified by its index....
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Streamable status message, e.g.
static constexpr auto SeverityInfo
Status severities.
swift::misc::StatusSeverity StatusSeverity
Status severities.
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of a callsign.
const QString & getTelephonyDesignator() const
Get callsign telephony designator (how callsign is pronounced).
TypeHint
Representing what.
CIcons::IconIndex toIcon() const
As icon, not implemented by all classes.
CCallsign()=default
Default constructor.
const QString & asString() const
Get callsign (normalized).
const QString & getStringAsSet() const
Get callsign.
bool isEmpty() const
Is empty?
TypeHint getTypeHint() const
Type hint.
static const CIcon & convertToIcon(const CCallsign &callsign)
Representing icon.
void setTypeHint(TypeHint hint)
Type hint.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...