X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fnetworkmodel.h;h=959d89a465a49b9340d19a1509ece0279793e34c;hp=bc4a17bc9bcf90c7f826ff0865ee3e8d3168a2b3;hb=1177f164f518b8f47b64f6736d176a995d5c17ed;hpb=c48313654848b755982179d1252cc27a8c621b91 diff --git a/src/client/networkmodel.h b/src/client/networkmodel.h index bc4a17bc..959d89a4 100644 --- a/src/client/networkmodel.h +++ b/src/client/networkmodel.h @@ -32,6 +32,8 @@ class BufferInfo; #include "selectionmodelsynchronizer.h" #include "modelpropertymapper.h" +#include "clientsettings.h" + class MappedSelectionModel; class QAbstractItemView; class Network; @@ -81,9 +83,13 @@ public: Q_DECLARE_FLAGS(ActivityLevel, Activity) ActivityLevel activity() const; - void setActivity(const ActivityLevel &level); + bool setActivity(const ActivityLevel &level); void updateActivity(const ActivityLevel &level); + void setLastMsgInsert(QDateTime msgDate); + bool setLastSeen(); + QDateTime lastSeen(); + public slots: void setTopic(const QString &topic); void join(IrcUser *ircUser); @@ -100,6 +106,8 @@ private: BufferInfo _bufferInfo; ActivityLevel _activity; Type _type; + QDateTime _lastMsgInsert; + QDateTime _lastSeen; QPointer _ircChannel; }; @@ -156,6 +164,7 @@ public: virtual QVariant data(int column, int role) const; void addUser(IrcUser *ircUser); + bool removeUser(IrcUser *ircUser); static int categoryFromModes(const QString &modes); @@ -209,7 +218,8 @@ public: BufferIdRole, NetworkIdRole, BufferInfoRole, - ItemTypeRole + ItemTypeRole, + LastSeenRole }; enum itemTypes { @@ -235,6 +245,8 @@ public: //Buffer *getBufferByIndex(const QModelIndex &) const; QModelIndex bufferIndex(BufferId bufferId); + const Network *networkByIndex(const QModelIndex &index) const; + public slots: void bufferUpdated(BufferInfo bufferInfo); void updateBufferActivity(const Message &msg);