/***************************************************************************
- * 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 *
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;
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;
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.