X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/85aec92f819eae5a6189bd3ec25cff44dce3ae19..b1c9b5126d:/src/dolphinviewautoscroller.h diff --git a/src/dolphinviewautoscroller.h b/src/dolphinviewautoscroller.h index dd84963a7..3827b2326 100644 --- a/src/dolphinviewautoscroller.h +++ b/src/dolphinviewautoscroller.h @@ -38,27 +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(); - void scrollToCurrentIndex(); private: void triggerAutoScroll(); void stopAutoScroll(); /** - * Calculates the scroll increment m_scrollInc dependent from + * Calculates the scroll increment dependent from * the cursor position \a cursorPos and the range 0 - \a rangeSize - 1. */ - void calculateScrollIncrement(int cursorPos, int rangeSize); + 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; };