Improve scrolling and dynamic backlog fetching behavior
[quassel.git] / src / qtui / chatview.h
index b9c1892..27713ea 100644 (file)
@@ -34,32 +34,28 @@ class MessageFilter;
 class ChatView : public QGraphicsView, public AbstractChatView {
   Q_OBJECT
 
-  public:
-    ChatView(MessageFilter *, QWidget *parent = 0);
-    ChatView(Buffer *, QWidget *parent = 0);
-    ~ChatView();
+public:
+  ChatView(MessageFilter *, QWidget *parent = 0);
+  ChatView(BufferId bufferId, QWidget *parent = 0);
 
-    ChatScene *scene() const;
+  virtual MsgId lastMsgId() const;
+  inline ChatScene *scene() const { return _scene; }
 
-  public slots:
+public slots:
+  inline virtual void clear() {}
 
-    void clear();
+protected:
+  virtual void resizeEvent(QResizeEvent *event);
 
-    void setBufferForBacklogFetching(BufferId buffer);
+protected slots:
+  virtual void sceneHeightChangedAt(qreal ypos, qreal hdiff);
+  virtual void verticalScrollbarChanged(int);
 
-  protected:
-    virtual void resizeEvent(QResizeEvent *event);
+private:
+  void init(MessageFilter *filter);
 
-  protected slots:
-    virtual void sceneHeightChanged(qreal height);
-    virtual void verticalScrollbarChanged(int);
-    virtual void sliderPressed();
-    virtual void sliderReleased();
-
-  private:
-    void init(MessageFilter *filter);
-
-    ChatScene *_scene;
+  ChatScene *_scene;
+  int _lastScrollbarPos;
 };