mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Detect textmessage being a SELCAL call
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f5ec7ea864
commit
e60acb25c3
@@ -45,14 +45,6 @@ namespace BlackMisc
|
||||
CTextMessage(const QString &message, const BlackMisc::Aviation::CCallsign &senderCallsign, const BlackMisc::Aviation::CCallsign &recipientCallsign = BlackMisc::Aviation::CCallsign())
|
||||
: m_message(message), m_received(QDateTime::currentDateTimeUtc()), m_senderCallsign(senderCallsign), m_recipientCallsign(recipientCallsign), m_frequency(-1.0, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()) {}
|
||||
|
||||
/*!
|
||||
* \brief QVariant, required for DBus QVariant lists
|
||||
*/
|
||||
virtual QVariant toQVariant() const
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get callsign (from)
|
||||
*/
|
||||
@@ -179,6 +171,22 @@ namespace BlackMisc
|
||||
*/
|
||||
void toggleSenderRecipient();
|
||||
|
||||
/*!
|
||||
* \brief Is this a text message encapsulating a SELCAL
|
||||
* \see http://forums.vatsim.net/viewtopic.php?f=8&t=63467
|
||||
*/
|
||||
bool isSelcalMessage() const;
|
||||
|
||||
/*!
|
||||
* \brief Is this a text message encapsulating a SELCAL for given code
|
||||
*/
|
||||
bool isSelcalMessageFor(const QString &selcal) const;
|
||||
|
||||
/*!
|
||||
* \brief Get SELCAL code (if applicable, e.g. ABCD), otherwise ""
|
||||
*/
|
||||
QString getSelcalCode() const;
|
||||
|
||||
/*!
|
||||
* \brief Equal operator ==
|
||||
*/
|
||||
@@ -194,6 +202,14 @@ namespace BlackMisc
|
||||
*/
|
||||
virtual uint getValueHash() const;
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant()
|
||||
*/
|
||||
virtual QVariant toQVariant() const
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Register metadata
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user