X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fmessage.h;h=7fcd797cdcd5a1b54d59423bb91bc1d9842509a8;hb=d7052a3218b115ab68d24ea33e670ed26afd19ce;hp=baa884654ea983dd6fdb99300829fc5e0f5af812;hpb=2ee32e7f7707349d12c98181bbe6842f6d19f60e;p=quassel.git diff --git a/src/common/message.h b/src/common/message.h index baa88465..7fcd797c 100644 --- a/src/common/message.h +++ b/src/common/message.h @@ -21,12 +21,14 @@ #ifndef _MESSAGE_H_ #define _MESSAGE_H_ +#include #include #include #include "global.h" class Message { + Q_DECLARE_TR_FUNCTIONS(Message); public: /** The different types a message can have for display */ @@ -47,6 +49,12 @@ class Message { quint8 flags() const; QDateTime timeStamp() const; + QString formattedTimeStamp(); + QString formattedSender(); + QString formattedText(); + + void format(); + private: QDateTime _timeStamp; MsgId _msgId; @@ -56,6 +64,10 @@ class Message { Type _type; quint8 _flags; + QString _formattedTimeStamp, _formattedSender, _formattedText; // cache + + QString mircToInternal(QString); + friend QDataStream &operator>>(QDataStream &in, Message &msg); };