+class Message {
+ Q_DECLARE_TR_FUNCTIONS(Message);
+
+ public:
+ /** The different types a message can have for display */
+ 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(BufferInfo buffer = BufferInfo(), 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);
+
+ BufferInfo buffer() const;
+ QString text() const;
+ QString sender() const;
+ Type type() const;
+ quint8 flags() const;
+ QDateTime timeStamp() const;
+
+ QString formattedTimeStamp();
+ QString formattedSender();
+ QString formattedText();