Removing the old ChatWidget and related stuff from CMakeLists.txt
[quassel.git] / src / qtui / chatwidget.h
index 801203c..4c01ff1 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <QtGui>
 
+#include "abstractbuffercontainer.h"
 #include "types.h"
 
 class ChatLineOld;
@@ -39,11 +40,11 @@ class AbstractUiMsg;
  * Because we use this as a custom widget in Qt Designer, we cannot use a constructor that takes custom
  * parameters. Instead, it is mandatory to call init() before using this widget.
  */
-class ChatWidget : public QAbstractScrollArea {
+class ChatWidget : public QAbstractScrollArea, public AbstractChatView {
   Q_OBJECT
 
   public:
-    ChatWidget(QWidget *parent = 0);
+    ChatWidget(BufferId, QWidget *parent = 0);
     ~ChatWidget();
     void init(BufferId id);
 
@@ -60,7 +61,7 @@ class ChatWidget : public QAbstractScrollArea {
     void appendChatLine(ChatLineOld *);
     void prependChatLines(QList<ChatLineOld *>);
     void appendChatLines(QList<ChatLineOld *>);
-    void setContents(QList<ChatLineOld *>);
+    void setContents(const QList<AbstractUiMsg *> &);
 
   protected:
     virtual void resizeEvent(QResizeEvent *event);
@@ -76,6 +77,7 @@ class ChatWidget : public QAbstractScrollArea {
     void scrollBarValChanged(int);
     void ensureVisible(int line);
     void handleScrollTimer();
+    void viewportChanged(int newPos);
 
   private:
     BufferId bufferId;
@@ -120,6 +122,8 @@ class ChatWidget : public QAbstractScrollArea {
     QString selectionToString();
     void handleMouseMoveEvent(const QPoint &pos);
 
+    MsgId lastBacklogOffset;
+    int lastBacklogSize;
 };
 
 #endif