diff options
| author | Peter Penz <[email protected]> | 2011-10-22 01:31:02 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-22 01:33:26 +0200 |
| commit | eac436d0374d3be323c6ba36799d3cddc98301ea (patch) | |
| tree | ca149d04153f6d169a70cb232fb0c420e90016e4 /src/kitemviews/kfileitemmodel.h | |
| parent | fd9cac1188130d3ef09530a902c95cf6190990a1 (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.h | 13 |
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. |
