Column handles (but not yet the columns themselves) are now movable
[quassel.git] / src / qtui / chatscene.h
index 8122872..9d8a565 100644 (file)
 #ifndef _CHATSCENE_H_
 #define _CHATSCENE_H_
 
 #ifndef _CHATSCENE_H_
 #define _CHATSCENE_H_
 
+#include <QAbstractItemModel>
 #include <QGraphicsScene>
 
 #include <QGraphicsScene>
 
-#include "messagemodel.h"
-
 class AbstractUiMsg;
 class Buffer;
 class ChatItem;
 class ChatLine;
 class AbstractUiMsg;
 class Buffer;
 class ChatItem;
 class ChatLine;
+class ColumnHandleItem;
+
 class QGraphicsSceneMouseEvent;
 
 class ChatScene : public QGraphicsScene {
   Q_OBJECT
 
   public:
 class QGraphicsSceneMouseEvent;
 
 class ChatScene : public QGraphicsScene {
   Q_OBJECT
 
   public:
-    ChatScene(MessageModel *model, QObject *parent);
+    ChatScene(QAbstractItemModel *model, QObject *parent);
     virtual ~ChatScene();
 
     Buffer *buffer() const;
     virtual ~ChatScene();
 
     Buffer *buffer() const;
-    inline MessageModel *model() const { return _model; }
+    inline QAbstractItemModel *model() const { return _model; }
 
   public slots:
 
   public slots:
-    void setWidth(int);
+    void setWidth(qreal);
 
 
-  protected slots:
+  private slots:
+    void rectChanged(const QRectF &);
 
 
-    void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent );
+  signals:
+    void heightChanged(qreal height);
+
+  protected slots:
+    void rowsInserted(const QModelIndex &, int, int);
 
   private:
 
   private:
-    int _width;
-    MessageModel *_model;
+    qreal _width, _height;
+    QAbstractItemModel *_model;
     QList<ChatLine *> _lines;
 
     QList<ChatLine *> _lines;
 
+    ColumnHandleItem *firstColHandle, *secondColHandle;
+    qreal firstColHandlePos, secondColHandlePos;
 };
 
 #endif
 };
 
 #endif