mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
refs #240, text to status message, used when a text message shall be logged or used in popup windows with status message signature
This commit is contained in:
@@ -138,6 +138,15 @@ namespace BlackMisc
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* As status message
|
||||||
|
*/
|
||||||
|
CStatusMessage CTextMessage::asStatusMessage(bool withSender, bool withRecipient, const QString separator) const
|
||||||
|
{
|
||||||
|
QString m = this->asString(withSender, withRecipient, separator);
|
||||||
|
return CStatusMessage::getInfoMessage(m, CStatusMessage::TypeTrafficNetwork);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Toggle sender / receiver
|
* Toggle sender / receiver
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "pqfrequency.h"
|
#include "pqfrequency.h"
|
||||||
#include "avcallsign.h"
|
#include "avcallsign.h"
|
||||||
|
#include "statusmessage.h"
|
||||||
#include "valueobject.h"
|
#include "valueobject.h"
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
||||||
@@ -128,6 +129,16 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
QString asString(bool withSender, bool withRecipient, const QString separator = ", ") const;
|
QString asString(bool withSender, bool withRecipient, const QString separator = ", ") const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Whole message as BlackMisc::CStatusMessage.
|
||||||
|
* Used to display message in logs, or any other situation where a CStatusMessage is required.
|
||||||
|
* \param withSender include sender information in string?
|
||||||
|
* \param withRecipient include recipient information in string?
|
||||||
|
* \param separator values separated by given value
|
||||||
|
* \return
|
||||||
|
*/
|
||||||
|
BlackMisc::CStatusMessage asStatusMessage(bool withSender, bool withRecipient, const QString separator = ", ") const;
|
||||||
|
|
||||||
//! \brief Toggle sender receiver, can be used to ping my own message
|
//! \brief Toggle sender receiver, can be used to ping my own message
|
||||||
void toggleSenderRecipient();
|
void toggleSenderRecipient();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user