X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmessage.h;h=43742839d6e36380f3fc090072a3b79d612b85e8;hb=1956aab57bf98ce072ed86f34785e5d7abba35a0;hp=7fcd797cdcd5a1b54d59423bb91bc1d9842509a8;hpb=de1613db2dd9623aa650f7217eb718381bb642e3;p=quassel.git diff --git a/src/common/message.h b/src/common/message.h index 7fcd797c..43742839 100644 --- a/src/common/message.h +++ b/src/common/message.h @@ -25,6 +25,7 @@ #include #include +#include "bufferinfo.h" #include "global.h" class Message { @@ -35,41 +36,43 @@ class Message { enum Type { Plain, Notice, Action, Nick, Mode, Join, Part, Quit, Kick, Kill, Server, Info, Error }; enum Flags { None = 0, Self = 1, PrivMsg = 2, Highlight = 4 }; - Message(BufferId buffer = BufferId(), Type type = Plain, QString text = "", QString sender = "", quint8 flags = None); + Message(BufferInfo buffer = BufferInfo(), Type type = Plain, QString text = "", QString sender = "", quint8 flags = None); - Message(QDateTime ts, BufferId buffer = BufferId(), Type type = Plain, QString text = "", QString sender = "", quint8 flags = None); + Message(QDateTime ts, BufferInfo buffer = BufferInfo(), Type type = Plain, QString text = "", QString sender = "", quint8 flags = None); MsgId msgId() const; void setMsgId(MsgId id); - BufferId buffer() const; + BufferInfo buffer() const; QString text() const; QString sender() const; Type type() const; quint8 flags() const; - QDateTime timeStamp() const; + QDateTime timestamp() const; - QString formattedTimeStamp(); + QString formattedTimestamp(); QString formattedSender(); QString formattedText(); + //static QString formattedToHtml(const QString &); + void format(); private: - QDateTime _timeStamp; + QDateTime _timestamp; MsgId _msgId; - BufferId _buffer; + BufferInfo _buffer; QString _text; QString _sender; Type _type; quint8 _flags; - QString _formattedTimeStamp, _formattedSender, _formattedText; // cache + QString _formattedTimestamp, _formattedSender, _formattedText; // cache + /** Convert mIRC control codes to our own */ QString mircToInternal(QString); friend QDataStream &operator>>(QDataStream &in, Message &msg); - }; QDataStream &operator<<(QDataStream &out, const Message &msg);