X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferinfo.h;h=f5a9f380aa10fb0aae2673bb7bdab6999007e567;hp=6fb3de4b4c245baf4d706e48af898c7516ebb81a;hb=e531fd1f1ea36a360a9d876c94e73b0f3b1bcd22;hpb=5b560ec1a01349562ac58051ca7e7fa899d4b994 diff --git a/src/common/bufferinfo.h b/src/common/bufferinfo.h index 6fb3de4b..f5a9f380 100644 --- a/src/common/bufferinfo.h +++ b/src/common/bufferinfo.h @@ -17,8 +17,8 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _BUFFERINFO_H_ -#define _BUFFERINFO_H_ +#ifndef BUFFERINFO_H +#define BUFFERINFO_H #include #include "types.h" @@ -36,9 +36,20 @@ public: GroupBuffer = 0x08 }; + enum Activity { + NoActivity = 0x00, + OtherActivity = 0x01, + NewMessage = 0x02, + Highlight = 0x40 + }; + Q_DECLARE_FLAGS(ActivityLevel, Activity) + BufferInfo(); BufferInfo(BufferId id, NetworkId networkid, Type type, uint gid = 0, QString buf = QString()); - + + static BufferInfo fakeStatusBuffer(NetworkId networkId); + + inline bool isValid() const { return _bufferId != 0; } inline BufferId bufferId() const { return _bufferId; } inline NetworkId networkId() const { return _netid; } inline Type type() const { return _type; } @@ -65,7 +76,8 @@ QDataStream &operator<<(QDataStream &out, const BufferInfo &bufferInfo); QDataStream &operator>>(QDataStream &in, BufferInfo &bufferInfo); QDebug operator<<(QDebug dbg, const BufferInfo &b); -Q_DECLARE_METATYPE(BufferInfo); +Q_DECLARE_METATYPE(BufferInfo) +Q_DECLARE_OPERATORS_FOR_FLAGS(BufferInfo::ActivityLevel) uint qHash(const BufferInfo &);