X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=4d66f648411d42290b84d914f5c475d3d4c27577;hb=c7ce9cd32c8fbbdd2d93c20da78a98f32e5b938d;hp=b40561e7ea077e16cd8ca3d16fc5e59334b364a6;hpb=a06b72f5cc0ff48e7f00de7a7e45ee11c2bba16b;p=quassel.git diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index b40561e7..4d66f648 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -62,8 +62,8 @@ public: enum ClickMode { NoClick, - SingleClick, DragStartClick, + SingleClick, DoubleClick, TripleClick }; @@ -72,6 +72,7 @@ public: virtual ~ChatScene(); inline QAbstractItemModel *model() const { return _model; } + inline MessageFilter *filter() const { return qobject_cast(_model); } 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; + 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; - inline ChatLine *chatLine(int row) { return (row < _lines.count()) ? _lines[row] : 0; } ColumnHandleItem *firstColumnHandle() const; ColumnHandleItem *secondColumnHandle() const; @@ -155,7 +157,7 @@ private: QString _idString; QAbstractItemModel *_model; QList _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.