projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
You can now apply the current settings for hiding events like join or
[quassel.git]
/
src
/
client
/
messagemodel.h
diff --git
a/src/client/messagemodel.h
b/src/client/messagemodel.h
index
ee0e79e
..
b65fbbf
100644
(file)
--- a/
src/client/messagemodel.h
+++ b/
src/client/messagemodel.h
@@
-44,6
+44,7
@@
public:
TimestampRole,
FormatRole,
ColumnTypeRole,
TimestampRole,
FormatRole,
ColumnTypeRole,
+ RedirectedToRole,
UserRole
};
UserRole
};
@@
-55,7
+56,7
@@
public:
inline QModelIndex index(int row, int column, const QModelIndex &/*parent*/ = QModelIndex()) const { return createIndex(row, column); }
inline QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
inline QModelIndex index(int row, int column, const QModelIndex &/*parent*/ = QModelIndex()) const { return createIndex(row, column); }
inline QModelIndex parent(const QModelIndex &) const { return QModelIndex(); }
- inline int rowCount(const QModelIndex &
/*parent*/ = QModelIndex()) const { return
_messageList.count(); }
+ inline int rowCount(const QModelIndex &
parent = QModelIndex()) const { return parent.isValid() ? 0 :
_messageList.count(); }
inline int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 3; }
virtual QVariant data(const QModelIndex &index, int role) const;
inline int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 3; }
virtual QVariant data(const QModelIndex &index, int role) const;
@@
-68,6
+69,11
@@
public:
void clear();
void clear();
+public slots:
+ void requestBacklog(BufferId bufferId);
+ void messagesReceived(BufferId bufferId, int count);
+ void buffersPermanentlyMerged(BufferId bufferId1, BufferId bufferId2);
+
protected:
virtual MessageModelItem *createMessageModelItem(const Message &) = 0;
virtual void customEvent(QEvent *event);
protected:
virtual MessageModelItem *createMessageModelItem(const Message &) = 0;
virtual void customEvent(QEvent *event);
@@
-84,6
+90,7
@@
private:
QList<Message> _messageBuffer;
QTimer _dayChangeTimer;
QDateTime _nextDayChange;
QList<Message> _messageBuffer;
QTimer _dayChangeTimer;
QDateTime _nextDayChange;
+ QHash<BufferId, int> _messagesWaiting;
};
// **************************************************
};
// **************************************************
@@
-100,11
+107,12
@@
public:
inline virtual ~MessageModelItem() {}
virtual QVariant data(int column, int role) const;
inline virtual ~MessageModelItem() {}
virtual QVariant data(int column, int role) const;
- virtual bool setData(int column, const QVariant &value, int role)
= 0
;
+ virtual bool setData(int column, const QVariant &value, int role);
inline const QDateTime &timeStamp() const { return _timestamp; }
inline MsgId msgId() const { return _msgId; }
inline BufferId bufferId() const { return _bufferId; }
inline const QDateTime &timeStamp() const { return _timestamp; }
inline MsgId msgId() const { return _msgId; }
inline BufferId bufferId() const { return _bufferId; }
+ inline void setBufferId(BufferId bufferId) { _bufferId = bufferId; }
inline Message::Type msgType() const { return _type; }
inline Message::Flags msgFlags() const { return _flags; }
inline Message::Type msgType() const { return _type; }
inline Message::Flags msgFlags() const { return _flags; }
@@
-118,6
+126,7
@@
private:
QDateTime _timestamp;
MsgId _msgId;
BufferId _bufferId;
QDateTime _timestamp;
MsgId _msgId;
BufferId _bufferId;
+ BufferId _redirectedTo;
Message::Type _type;
Message::Flags _flags;
};
Message::Type _type;
Message::Flags _flags;
};