X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fbuffer.h;h=72a30f114068bf4e259cf6f651a0b1b374e34032;hb=7a1eca89ead6eb300c593ace9f14c0eb2f9836b8;hp=def01bddc05e1977dc921004aeb60b21c2df2138;hpb=8010224cf5bfe5685dc2cf535e8dc1ec19c4c364;p=quassel.git diff --git a/src/client/buffer.h b/src/client/buffer.h index def01bdd..72a30f11 100644 --- a/src/client/buffer.h +++ b/src/client/buffer.h @@ -32,7 +32,6 @@ struct BufferState; #include "message.h" #include "bufferinfo.h" -/// Encapsulates the contents of a single channel, query or server status context. /** */ class Buffer : public QObject { @@ -50,34 +49,23 @@ public: Buffer(BufferInfo, QObject *parent = 0); BufferInfo bufferInfo() const; - QList contents() const; inline bool isVisible() const { return _isVisible; } - inline QDateTime lastSeen() const { return _lastSeen; } + inline MsgId lastSeenMsg() const { return _lastSeenMsg; } inline ActivityLevel activityLevel() const { return _activityLevel; } -signals: - void msgAppended(AbstractUiMsg *); - void msgPrepended(AbstractUiMsg *); - void layoutQueueEmpty(); - public slots: - void appendMsg(const Message &); - void prependMsg(const Message &); - bool layoutMsg(); void setVisible(bool visible); - void setLastSeen(const QDateTime &); + void setLastSeenMsg(const MsgId &msgId); void setActivityLevel(ActivityLevel level); + void updateActivityLevel(const Message &msg); private: BufferInfo _bufferInfo; bool _isVisible; - QDateTime _lastSeen; + MsgId _lastSeenMsg; + Message _lastRcvdMsg; ActivityLevel _activityLevel; - QList layoutQueue; - QList layoutedMsgs; - - void updateActivityLevel(const Message &msg); }; Q_DECLARE_OPERATORS_FOR_FLAGS(Buffer::ActivityLevel)