39 Ui::CFileTreeViewGuiComp, ifile::IFileNameParam>,
48 I_REGISTER_SUBELEMENT(CurrentFile);
50 I_REGISTER_SUBELEMENT_INTERFACE(CurrentFile,
imod::IModel, ExtractCurrentFile);
51 I_REGISTER_SUBELEMENT_INTERFACE(CurrentFile,
istd::IChangeable, ExtractCurrentFile);
53 I_ASSIGN(m_fileTypeInfoCompPtr,
"FileTypeInfo",
"File type info used to create file filters",
false,
"FileTypeInfo");
54 I_ASSIGN_MULTI_0(m_filtersAttrPtr,
"Filters",
"List of filters if no FileTypeInfo is specified",
false);
55 I_ASSIGN(m_noEmptyDirsAttrPtr,
"NoEmptyFolders",
"Recursively skip folder which containing no files",
true,
true);
81 void OnSelectionChanged(
const QItemSelection& selected,
const QItemSelection& deselected);
82 void on_Refresh_clicked();
83 void OnTreeModelUpdated();
84 void on_FilterText_textChanged(QString filterText);
87 void RebuildTreeModel();
88 void DoTreeModelUpdate();
89 void UpdateCurrentSelection();
90 void UpdateChildItems(QStandardItem* itemPtr);
97 bool CreateFileList(
const QDir& root,
98 const QStringList& nameFilters,
99 QDir::SortFlags sortSpec,
100 QStandardItem* parentItemPtr);
105 bool CreateDirectoryList(
107 const QStringList& nameFilters,
108 QDir::SortFlags sortSpec,
109 QStandardItem* parentItemPtr);
111 void EnumerateDirectory(
113 const QStringList& nameFilters,
114 QDir::SortFlags sortSpec,
115 QStandardItem* parentItemPtr);
122 virtual int GetPathType()
const override
131 template <
class InterfaceType>
134 return &component.m_currentFile;
141 m_parentPtr(parentPtr)
146 virtual void run()
override
148 m_parentPtr->DoTreeModelUpdate();
160 bool m_fileModelUpdateAllowed;
164 mutable QStandardItemModel m_itemModel;
165 QFileIconProvider m_iconProvider;
167 mutable QMap<QString, QIcon> m_extToIconMap;
169 QRegularExpression m_filterMatcher;
170 QString m_userFilter;
171 QTimer m_filterTimer;
172 QElapsedTimer m_performanceTimer;
175 I_MULTIATTR(QString, m_filtersAttrPtr);
176 I_ATTR(
bool, m_noEmptyDirsAttrPtr);