X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmessage.h;h=0c9c3d36528b24919408dbfc151e2a36af8b85e0;hp=1411f3b4248a42942b7d261a873e0bd06e187394;hb=9d12f8189a0dfd8ac76e41aea86ac56bdf907fde;hpb=8de2d4650197bdae2f39f804228f3bce5ddbd59c diff --git a/src/common/message.h b/src/common/message.h index 1411f3b4..0c9c3d36 100644 --- a/src/common/message.h +++ b/src/common/message.h @@ -32,8 +32,28 @@ class 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 }; + enum Type { + Plain, + Notice, + Action, + Nick, + Mode, + Join, + Part, + Quit, + Kick, + Kill, + Server, + Info, + Error + }; + + enum Flags { + None = 0, + Self = 1 + }; + Q_DECLARE_FLAGS(MessageFlags, Flags) + Message(BufferInfo bufferInfo = BufferInfo(), Type type = Plain, QString text = "", QString sender = "", quint8 flags = None); @@ -78,5 +98,6 @@ QDataStream &operator<<(QDataStream &out, const Message &msg); QDataStream &operator>>(QDataStream &in, Message &msg); Q_DECLARE_METATYPE(Message); +Q_DECLARE_OPERATORS_FOR_FLAGS(Message::MessageFlags) #endif