projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing wrong usage of QList::erase(QList::iterator) (also for QHash)
[quassel.git]
/
src
/
qtui
/
chatscene.h
diff --git
a/src/qtui/chatscene.h
b/src/qtui/chatscene.h
index
a941fd9
..
b90de71
100644
(file)
--- a/
src/qtui/chatscene.h
+++ b/
src/qtui/chatscene.h
@@
-72,6
+72,7
@@
public:
virtual ~ChatScene();
inline QAbstractItemModel *model() const { return _model; }
virtual ~ChatScene();
inline QAbstractItemModel *model() const { return _model; }
+ inline MessageFilter *filter() const { return qobject_cast<MessageFilter*>(_model); }
inline QString idString() const { return _idString; }
int rowByScenePos(qreal y) const;
inline QString idString() const { return _idString; }
int rowByScenePos(qreal y) const;
@@
-81,10
+82,11
@@
public:
ChatView *chatView() const;
ChatItem *chatItemAt(const QPointF &pos) const;
ChatView *chatView() const;
ChatItem *chatItemAt(const QPointF &pos) const;
+ inline ChatLine *chatLine(int row) { return (row < _lines.count()) ? _lines[row] : 0; }
- inline bool isSingleBufferScene() const { return _singleBufferScene; }
+ inline bool isSingleBufferScene() const { return _singleBufferId.isValid(); }
+ inline BufferId singleBufferId() const { return _singleBufferId; }
bool containsBuffer(const BufferId &id) const;
bool containsBuffer(const BufferId &id) const;
- inline ChatLine *chatLine(int row) { return (row < _lines.count()) ? _lines[row] : 0; }
ColumnHandleItem *firstColumnHandle() const;
ColumnHandleItem *secondColumnHandle() const;
ColumnHandleItem *firstColumnHandle() const;
ColumnHandleItem *secondColumnHandle() const;
@@
-155,7
+157,7
@@
private:
QString _idString;
QAbstractItemModel *_model;
QList<ChatLine *> _lines;
QString _idString;
QAbstractItemModel *_model;
QList<ChatLine *> _lines;
-
bool _singleBufferScene
;
+
BufferId _singleBufferId
;
// calls to QChatScene::sceneRect() are very expensive. As we manage the scenerect ourselves
// we store the size in a member variable.
// calls to QChatScene::sceneRect() are very expensive. As we manage the scenerect ourselves
// we store the size in a member variable.