ChatView now uses MessageFilter to display only messages for its buffer.
[quassel.git] / src / qtui / chatscene.h
index 8122872..5f8057a 100644 (file)
 #ifndef _CHATSCENE_H_
 #define _CHATSCENE_H_
 
+#include <QAbstractItemModel>
 #include <QGraphicsScene>
 
-#include "messagemodel.h"
-
 class AbstractUiMsg;
 class Buffer;
 class ChatItem;
@@ -35,22 +34,26 @@ 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:
-    int _width;
-    MessageModel *_model;
+    int _width, _height;
+    int _timestampWidth, _senderWidth;
+    QAbstractItemModel *_model;
     QList<ChatLine *> _lines;
 
 };