]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewautoscroller.h
* Use Nepomuk for getting the meta data instead of KFileMetaInfo.
[dolphin.git] / src / dolphinviewautoscroller.h
index c02112b7b3f22e926b89319231d830e20ab7c779..3827b2326114284f0f957d52ee12569c9c44079d 100644 (file)
@@ -38,20 +38,28 @@ class DolphinViewAutoScroller : public QObject
 public:
     DolphinViewAutoScroller(QAbstractItemView* parent);
     virtual ~DolphinViewAutoScroller();
-    
+    bool isActive() const;
+
 protected:
     virtual bool eventFilter(QObject* watched, QEvent* event);
 
 private slots:
     void scrollViewport();
-    
+
 private:
     void triggerAutoScroll();
     void stopAutoScroll();
-    
+
+    /**
+     * Calculates the scroll increment dependent from
+     * the cursor position \a cursorPos and the range 0 - \a rangeSize - 1.
+     */
+    int calculateScrollIncrement(int cursorPos, int rangeSize) const;
+
 private:
     bool m_rubberBandSelection;
-    int m_scrollInc;
+    int m_horizontalScrollInc;
+    int m_verticalScrollInc;
     QAbstractItemView* m_itemView;
     QTimer* m_timer;
 };