diff options
| author | Peter Penz <[email protected]> | 2011-10-18 22:11:22 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-18 22:16:34 +0200 |
| commit | fd9cac1188130d3ef09530a902c95cf6190990a1 (patch) | |
| tree | 8ff0f646a6bc53b6087f0cf3f780ce064e2869f5 /src/kitemviews/kitemlistviewlayouter_p.h | |
| parent | 6840794b57987c5f0baf704327733b68fb92cfc6 (diff) | |
Implement group-header layouting
The most tricky part for groups - the layouting - basically works
now for all views (grouping was available only in the icons views
for Dolphin 1.x) and is nearly equally fast as without groups.
Still open:
- Group headers are ugly screen rectangles
- Return valid groups in KFileItemModel instead of the currently
hardcoded testing values
- Dynamically turning on/off groups does not work currently, the
directory must be reentered
Diffstat (limited to 'src/kitemviews/kitemlistviewlayouter_p.h')
| -rw-r--r-- | src/kitemviews/kitemlistviewlayouter_p.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/kitemviews/kitemlistviewlayouter_p.h b/src/kitemviews/kitemlistviewlayouter_p.h index c81995d9b..255db9188 100644 --- a/src/kitemviews/kitemlistviewlayouter_p.h +++ b/src/kitemviews/kitemlistviewlayouter_p.h @@ -95,15 +95,12 @@ public: private: void doLayout(); - void updateVisibleIndexes(); - void updateGroupedVisibleIndexes(); - void createGroupHeaders(); + bool createGroupHeaders(); private: bool m_dirty; bool m_visibleIndexesDirty; - bool m_grouped; Qt::Orientation m_scrollOrientation; QSizeF m_size; @@ -122,17 +119,11 @@ private: int m_firstVisibleIndex; int m_lastVisibleIndex; - int m_firstVisibleGroupIndex; - qreal m_columnWidth; qreal m_xPosInc; int m_columnCount; - struct ItemGroup { - int firstItemIndex; - qreal y; - }; - QList<ItemGroup> m_groups; + QList<int> m_groups; // Stores all item indexes that are the first item of a group. // Assures fast access for KItemListViewLayouter::isFirstGroupItem(). |
