From fd9cac1188130d3ef09530a902c95cf6190990a1 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 18 Oct 2011 22:11:22 +0200 Subject: 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 --- src/kitemviews/kitemlistviewlayouter_p.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/kitemviews/kitemlistviewlayouter_p.h') 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 m_groups; + QList m_groups; // Stores all item indexes that are the first item of a group. // Assures fast access for KItemListViewLayouter::isFirstGroupItem(). -- cgit v1.3.1