┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-10-22 01:31:02 +0200
committerPeter Penz <[email protected]>2011-10-22 01:33:26 +0200
commiteac436d0374d3be323c6ba36799d3cddc98301ea (patch)
treeca149d04153f6d169a70cb232fb0c420e90016e4 /src/kitemviews/kfileitemmodel.h
parentfd9cac1188130d3ef09530a902c95cf6190990a1 (diff)
Implement grouping for names
- Use a custom header for KFileItems - Cache the groups - Allow enabling/disabling grouping dynamically Currently there is a random crash in combination with the groupheader-recycler, this will be fixed during the next days.
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
-rw-r--r--src/kitemviews/kfileitemmodel.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h
index 7d10aad8e..8ccff95e8 100644
--- a/src/kitemviews/kfileitemmodel.h
+++ b/src/kitemviews/kfileitemmodel.h
@@ -194,6 +194,16 @@ private:
bool useMaximumUpdateInterval() const;
+ QList<QPair<int, QVariant> > nameRoleGroups() const;
+ QList<QPair<int, QVariant> > sizeRoleGroups() const;
+ QList<QPair<int, QVariant> > dateRoleGroups() const;
+ QList<QPair<int, QVariant> > permissionRoleGroups() const;
+ QList<QPair<int, QVariant> > ownerRoleGroups() const;
+ QList<QPair<int, QVariant> > groupRoleGroups() const;
+ QList<QPair<int, QVariant> > typeRoleGroups() const;
+ QList<QPair<int, QVariant> > destinationRoleGroups() const;
+ QList<QPair<int, QVariant> > pathRoleGroups() const;
+
private:
QWeakPointer<KDirLister> m_dirLister;
@@ -214,6 +224,9 @@ private:
KFileItemList m_pendingItemsToInsert;
bool m_pendingEmitLoadingCompleted;
+ // Cache for KFileItemModel::groups()
+ mutable QList<QPair<int, QVariant> > m_groups;
+
// Stores the smallest expansion level of the root-URL. Is required to calculate
// the "expansionLevel" role in an efficient way. A value < 0 indicates that
// it has not been initialized yet.