X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.h;h=5f8057ab1def3fd39e4e4471b48ffad406542d77;hp=fd72010670ece4e05d44a015e4831df34c333355;hb=bf01681e9e6108517bfa997422b84e04b801a40a;hpb=da2b5b2e4e2b0ea1847a0a5f0cb4a3752fc655c9 diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index fd720106..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,15 +34,18 @@ 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); + signals: + void heightChanged(int height); + protected slots: void rowsInserted(const QModelIndex &, int, int); void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); @@ -51,7 +53,7 @@ class ChatScene : public QGraphicsScene { private: int _width, _height; int _timestampWidth, _senderWidth; - MessageModel *_model; + QAbstractItemModel *_model; QList _lines; };