Quassel now handles even huge ChatScenes without slowing to a crawl.
[quassel.git] / src / qtui / chatview.h
index 4a46d30..100b311 100644 (file)
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 
-#ifndef _CHATVIEW_H_
-#define _CHATVIEW_H_
+#ifndef CHATVIEW_H_
+#define CHATVIEW_H_
 
 #include <QGraphicsView>
 
+#include "abstractbuffercontainer.h"
+
 class AbstractUiMsg;
 class Buffer;
 class ChatLine;
 class ChatScene;
 
-class ChatView : public QGraphicsView {
+class ChatView : public QGraphicsView, public AbstractChatView {
   Q_OBJECT
 
   public:
@@ -38,7 +40,7 @@ class ChatView : public QGraphicsView {
     ChatScene *scene() const;
 
   public slots:
-/*
+
     void clear();
 
     void prependMsg(AbstractUiMsg *);
@@ -49,8 +51,14 @@ class ChatView : public QGraphicsView {
     void prependChatLines(QList<ChatLine *>);
     void appendChatLines(QList<ChatLine *>);
 
-    void setContents(QList<ChatLine *>);
-*/
+    void setContents(const QList<AbstractUiMsg *> &);
+
+  protected:
+    virtual void resizeEvent(QResizeEvent *event);
+
+  protected slots:
+    virtual void sceneHeightChanged(int height);
+
   private:
     ChatScene *_scene;
 };