diff options
| author | Peter Penz <[email protected]> | 2011-09-25 19:52:33 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-09-25 19:55:42 +0200 |
| commit | aee65350437770b22b289e2c7ec5a5a4436e39a6 (patch) | |
| tree | 39e758fd80a19112144417c470862e26d1a33d17 /src/kitemviews/kitemlistviewlayouter_p.h | |
| parent | 077ec63f58ff1d58ae56654b08e0f8ee6f5ae8e8 (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/kitemlistviewlayouter_p.h')
| -rw-r--r-- | src/kitemviews/kitemlistviewlayouter_p.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/kitemviews/kitemlistviewlayouter_p.h b/src/kitemviews/kitemlistviewlayouter_p.h index 18ffb4caa..c81995d9b 100644 --- a/src/kitemviews/kitemlistviewlayouter_p.h +++ b/src/kitemviews/kitemlistviewlayouter_p.h @@ -56,8 +56,15 @@ public: qreal headerHeight() const; // TODO: add note that offset can be < 0 or > maximumOffset! - void setOffset(qreal offset); - qreal offset() const; + void setScrollOffset(qreal scrollOffset); + qreal scrollOffset() const; + + qreal maximumScrollOffset() const; + + void setItemOffset(qreal scrollOffset); + qreal itemOffset() const; + + qreal maximumItemOffset() const; void setModel(const KItemModelBase* model); const KItemModelBase* model() const; @@ -65,7 +72,6 @@ public: void setSizeHintResolver(const KItemListSizeHintResolver* sizeHintResolver); const KItemListSizeHintResolver* sizeHintResolver() const; - qreal maximumOffset() const; // TODO: mention that return value is -1 if count == 0 int firstVisibleIndex() const; @@ -107,8 +113,11 @@ private: const KItemModelBase* m_model; const KItemListSizeHintResolver* m_sizeHintResolver; - qreal m_offset; - qreal m_maximumOffset; + qreal m_scrollOffset; + qreal m_maximumScrollOffset; + + qreal m_itemOffset; + qreal m_maximumItemOffset; int m_firstVisibleIndex; int m_lastVisibleIndex; |
