┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontainer.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-30 23:22:56 +0200
committerPeter Penz <[email protected]>2011-09-30 23:27:09 +0200
commitd9f9e69ce1bdd6f898ee21cb2f14607bd90fa07b (patch)
tree3815617d32e78006a3f551c35665ad80420a3e08 /src/kitemviews/kitemlistcontainer.h
parent7424fcc3314a63d0716cb428a8b8de24b23e0279 (diff)
Implement smooth-scrolling for horizontal and vertical scrollbars
Currently only a smoothscrolling was provided into the scroll-direction, but not in case of the details-view where a horizontal scrollbar might be shown too. Some minor adjustments of the private KItemListSmoothScroller interface will be done later...
Diffstat (limited to 'src/kitemviews/kitemlistcontainer.h')
-rw-r--r--src/kitemviews/kitemlistcontainer.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h
index 36ac9753e..4d6eadbbb 100644
--- a/src/kitemviews/kitemlistcontainer.h
+++ b/src/kitemviews/kitemlistcontainer.h
@@ -29,6 +29,7 @@
#include <QAbstractScrollArea>
class KItemListController;
+class KItemListSmoothScroller;
class KItemListView;
class KItemModelBase;
class QPropertyAnimation;
@@ -54,13 +55,12 @@ protected:
virtual void showEvent(QShowEvent* event);
virtual void resizeEvent(QResizeEvent* event);
virtual void scrollContentsBy(int dx, int dy);
- virtual bool eventFilter(QObject* obj, QEvent* event);
virtual void wheelEvent(QWheelEvent* event);
private slots:
+ void slotScrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous);
void slotModelChanged(KItemModelBase* current, KItemModelBase* previous);
void slotViewChanged(KItemListView* current, KItemListView* previous);
- void slotAnimationStateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
void scrollTo(qreal offset);
void updateScrollOffsetScrollBar();
void updateItemOffsetScrollBar();
@@ -68,13 +68,13 @@ private slots:
private:
void initialize();
void updateGeometries();
+ void updateSmoothScrollers(Qt::Orientation orientation);
private:
KItemListController* m_controller;
- bool m_scrollBarPressed;
- bool m_smoothScrolling;
- QPropertyAnimation* m_smoothScrollingAnimation;
+ KItemListSmoothScroller* m_horizontalSmoothScroller;
+ KItemListSmoothScroller* m_verticalSmoothScroller;
};
#endif