┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistviewanimation.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-25 19:52:33 +0200
committerPeter Penz <[email protected]>2011-09-25 19:55:42 +0200
commitaee65350437770b22b289e2c7ec5a5a4436e39a6 (patch)
tree39e758fd80a19112144417c470862e26d1a33d17 /src/kitemviews/kitemlistviewanimation.cpp
parent077ec63f58ff1d58ae56654b08e0f8ee6f5ae8e8 (diff)
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.
Diffstat (limited to 'src/kitemviews/kitemlistviewanimation.cpp')
-rw-r--r--src/kitemviews/kitemlistviewanimation.cpp12
1 files changed, 6 insertions, 6 deletions
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)