diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-12-12 16:03:13 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-04 03:33:17 -0500 |
| commit | d3e9abddaf1f927102002d9fb2721e858f6c3a3e (patch) | |
| tree | 58e1a5d495b676bb7450398c85fbd3c70708048b /src/filetree.h | |
| parent | de29b6a5a89c1db4c19cc5ed4b4946230b7a3885 (diff) | |
tooltips, archive names
Diffstat (limited to 'src/filetree.h')
| -rw-r--r-- | src/filetree.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/filetree.h b/src/filetree.h index 75270d29..13299bb3 100644 --- a/src/filetree.h +++ b/src/filetree.h @@ -19,7 +19,7 @@ public: FileTreeItem(); FileTreeItem( - FileTreeItem* parent, + FileTreeItem* parent, int originID, std::wstring virtualParentPath, std::wstring realPath, Flags flags, std::wstring file, std::wstring mod); @@ -32,11 +32,12 @@ public: const std::vector<std::unique_ptr<FileTreeItem>>& children() const; FileTreeItem* parent(); - + int originID() const; const QString& virtualParentPath() const; QString virtualPath() const; const QString& filename() const; const QString& mod() const; + QFont font() const; const QString& realPath() const; QString dataRelativeParentPath() const; @@ -57,6 +58,7 @@ public: private: FileTreeItem* m_parent; + int m_originID; QString m_virtualParentPath; QString m_realPath; Flags m_flags; @@ -102,7 +104,7 @@ private: OrganizerCore& m_core; mutable FileTreeItem m_root; Flags m_flags; - std::unique_ptr<IconFetcher> m_iconFetcher; + mutable std::unique_ptr<IconFetcher> m_iconFetcher; mutable std::vector<QModelIndex> m_iconPending; mutable QTimer m_iconPendingTimer; @@ -126,6 +128,9 @@ private: FileTreeItem* itemFromIndex(const QModelIndex& index) const; void ensureLoaded(FileTreeItem* item) const; void updatePendingIcons(); + + QString makeTooltip(const FileTreeItem& item) const; + QVariant makeIcon(const FileTreeItem& item, const QModelIndex& index) const; }; Q_DECLARE_OPERATORS_FOR_FLAGS(FileTreeModel::Flags); |
