X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmessage.h;h=68047db5c993876fb2c5f1761e282fe71e9326e6;hb=3ae4aa8a6039e7c605c163ecace78687720d9ed6;hp=7fcd797cdcd5a1b54d59423bb91bc1d9842509a8;hpb=de1613db2dd9623aa650f7217eb718381bb642e3;p=quassel.git diff --git a/src/common/message.h b/src/common/message.h index 7fcd797c..68047db5 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,14 +36,14 @@ 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; @@ -53,12 +54,14 @@ class Message { QString formattedSender(); QString formattedText(); + //static QString formattedToHtml(const QString &); + void format(); private: QDateTime _timeStamp; MsgId _msgId; - BufferId _buffer; + BufferInfo _buffer; QString _text; QString _sender; Type _type; @@ -66,10 +69,10 @@ class Message { 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);