X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=5f8057ab1def3fd39e4e4471b48ffad406542d77;hp=1ce9304d5474a297a47e602550d8ffef020928e0;hb=2f83cb6d01ff68131528797020637887fe0e77b7;hpb=cc7f376eb105f7bf931fb7f96c9601a7b3f69511 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index 1ce9304d..5f8057ab 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -21,10 +21,9 @@ #ifndef _CHATSCENE_H_ #define _CHATSCENE_H_ +#include #include -#include "messagemodel.h" - class AbstractUiMsg; class Buffer; class ChatItem; @@ -35,23 +34,27 @@ class ChatScene : public QGraphicsScene { Q_OBJECT public: - ChatScene(MessageModel *model, QObject *parent); + ChatScene(QAbstractItemModel *model, QObject *parent); virtual ~ChatScene(); Buffer *buffer() const; - inline MessageModel *model() const { return _model; } + inline QAbstractItemModel *model() const { return _model; } public slots: + void setWidth(int); - protected slots: + signals: + void heightChanged(int height); + protected slots: + void rowsInserted(const QModelIndex &, int, int); void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); private: - //Buffer *_buffer; - //QList _lines; - MessageModel *_model; - QList _items; + int _width, _height; + int _timestampWidth, _senderWidth; + QAbstractItemModel *_model; + QList _lines; };