diff options
| author | Frank Reininghaus <[email protected]> | 2011-09-17 14:35:25 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2011-09-17 14:35:25 +0200 |
| commit | 9424f5a789b98b148e3c6b39738da164c73e0431 (patch) | |
| tree | 55fb42e69cf35a775ec8966da64a7aea1a5dc397 /src/kitemviews/kfileitemmodel.h | |
| parent | 5070666ad2cd5fe3e559adca00a52aed5d137153 (diff) | |
Implement restoring expanded folders in Details View
Diffstat (limited to 'src/kitemviews/kfileitemmodel.h')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 160817043..4156b2be8 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -113,6 +113,11 @@ public: bool setExpanded(int index, bool expanded); bool isExpanded(int index) const; bool isExpandable(int index) const; + QSet<KUrl> expandedUrls() const; + void restoreExpandedUrls(const QSet<KUrl>& urls); + +signals: + void loadingCompleted(); protected: virtual void onGroupRoleChanged(const QByteArray& current, const QByteArray& previous); @@ -199,12 +204,19 @@ private: QTimer* m_minimumUpdateIntervalTimer; QTimer* m_maximumUpdateIntervalTimer; KFileItemList m_pendingItemsToInsert; + bool m_pendingEmitLoadingCompleted; // 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. mutable int m_rootExpansionLevel; + // Stores the URLs of the expanded folders. + QSet<KUrl> m_expandedUrls; + + // Stores the URLs which have to be expanded in order to restore a previous state of the model. + QSet<KUrl> m_restoredExpandedUrls; + friend class KFileItemModelTest; // For unit testing }; |
