Refactoring: Pull Up Duplicate Code
[quassel.git] / src / uisupport / bufferview.h
index aaafd61..4971e36 100644 (file)
 #include "bufferviewconfig.h"
 #include "networkmodel.h"
 #include "types.h"
+#include "treeviewtouch.h"
 
 /*****************************************
  * The TreeView showing the Buffers
  *****************************************/
-class BufferView : public QTreeView
+class BufferView : public TreeViewTouch
 {
     Q_OBJECT
 
@@ -79,9 +80,6 @@ protected:
     virtual QSize sizeHint() const;
     virtual void focusInEvent(QFocusEvent *event) { QAbstractScrollArea::focusInEvent(event); }
     virtual void contextMenuEvent(QContextMenuEvent *event);
-       virtual bool event(QEvent *event);
-       virtual void mouseMoveEvent(QMouseEvent *event);
-       virtual void mousePressEvent(QMouseEvent *event);
 
 #if QT_VERSION < 0x050000
     virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
@@ -103,8 +101,6 @@ private slots:
 
 private:
     QPointer<BufferViewConfig> _config;
-       qint64 _lastTouchStart = 0;
-       bool _touchScrollInProgress = false;
 
     enum ExpandedState {
         WasExpanded = 0x01,