From aee65350437770b22b289e2c7ec5a5a4436e39a6 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 25 Sep 2011 19:52:33 +0200 Subject: Provide scrollbar for large items If an item does not fit into the available width/height a scrollbar should be provided (e.g. typically this represents the horizontal scrollbar in the details-view where the width can be larger than the than the visible width). Currently the interaction with the scrollbar is not implemented but this will be a quite minor task in comparison to this patch. --- src/kitemviews/kitemlistviewanimation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/kitemviews/kitemlistviewanimation.cpp') diff --git a/src/kitemviews/kitemlistviewanimation.cpp b/src/kitemviews/kitemlistviewanimation.cpp index 449d557f9..9b122ee8c 100644 --- a/src/kitemviews/kitemlistviewanimation.cpp +++ b/src/kitemviews/kitemlistviewanimation.cpp @@ -29,7 +29,7 @@ KItemListViewAnimation::KItemListViewAnimation(QObject* parent) : QObject(parent), m_scrollOrientation(Qt::Vertical), - m_offset(0), + m_scrollOffset(0), m_animation() { } @@ -51,10 +51,10 @@ Qt::Orientation KItemListViewAnimation::scrollOrientation() const return m_scrollOrientation; } -void KItemListViewAnimation::setOffset(qreal offset) +void KItemListViewAnimation::setScrollOffset(qreal offset) { - const qreal diff = m_offset - offset; - m_offset = offset; + const qreal diff = m_scrollOffset - offset; + m_scrollOffset = offset; // The change of the offset requires that the position of all // animated QGraphicsWidgets get adjusted. An exception is made @@ -108,9 +108,9 @@ void KItemListViewAnimation::setOffset(qreal offset) } } -qreal KItemListViewAnimation::offset() const +qreal KItemListViewAnimation::scrollOffset() const { - return m_offset; + return m_scrollOffset; } void KItemListViewAnimation::start(QGraphicsWidget* widget, AnimationType type, const QVariant& endValue) -- cgit v1.3.1