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/kfileitemmodel.cpp | |
| 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/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 3a49135f9..46de7c5aa 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -225,15 +225,19 @@ QString KFileItemModel::roleDescription(const QByteArray& role) const QList<QPair<int, QVariant> > KFileItemModel::groups() const { - // TODO: + // TODO: dirty hack for initial testing of grouping functionality QPair<int, QVariant> group1(0, "Group 1"); - QPair<int, QVariant> group2(5, "Group 2"); + QPair<int, QVariant> group2(2, "Group 2"); QPair<int, QVariant> group3(10, "Group 3"); + QPair<int, QVariant> group4(11, "Group 4"); + QPair<int, QVariant> group5(40, "Group 5"); QList<QPair<int, QVariant> > groups; groups.append(group1); groups.append(group2); groups.append(group3); + groups.append(group4); + groups.append(group5); return groups; } |
