diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-12-10 16:29:41 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-04 03:33:17 -0500 |
| commit | de29b6a5a89c1db4c19cc5ed4b4946230b7a3885 (patch) | |
| tree | 6b97dc348479a53fd2fb5bb3e9aac73dc9f35d81 /src/filetree.h | |
| parent | efdc3eb14fc238e3cb2032148ab37f143f1bbc5f (diff) | |
IconFetcher
Diffstat (limited to 'src/filetree.h')
| -rw-r--r-- | src/filetree.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/filetree.h b/src/filetree.h index aabdf61b..75270d29 100644 --- a/src/filetree.h +++ b/src/filetree.h @@ -38,6 +38,7 @@ public: const QString& filename() const; const QString& mod() const; + const QString& realPath() const; QString dataRelativeParentPath() const; QString dataRelativeFilePath() const; @@ -95,11 +96,15 @@ public: Qt::ItemFlags flags(const QModelIndex& index) const override; private: + class IconFetcher; + using DirectoryIterator = std::vector<MOShared::DirectoryEntry*>::const_iterator; OrganizerCore& m_core; mutable FileTreeItem m_root; Flags m_flags; - QIcon m_fileIcon, m_directoryIcon; + std::unique_ptr<IconFetcher> m_iconFetcher; + mutable std::vector<QModelIndex> m_iconPending; + mutable QTimer m_iconPendingTimer; bool showConflicts() const; bool showArchives() const; @@ -120,6 +125,7 @@ private: FileTreeItem* itemFromIndex(const QModelIndex& index) const; void ensureLoaded(FileTreeItem* item) const; + void updatePendingIcons(); }; Q_DECLARE_OPERATORS_FOR_FLAGS(FileTreeModel::Flags); |
