21 #ifndef FM_DIRTREEMODEL_H 22 #define FM_DIRTREEMODEL_H 24 #include "libfmqtglobals.h" 25 #include <QModelIndex> 26 #include <QAbstractItemModel> 29 #include <QSharedPointer> 34 class DirTreeModelItem;
45 FileInfoRole = Qt::UserRole
51 QModelIndex addRoot(FmFileInfo* root);
52 void loadRow(
const QModelIndex& index);
53 void unloadRow(
const QModelIndex& index);
55 bool isLoaded(
const QModelIndex& index);
56 QIcon icon(
const QModelIndex& index);
57 FmFileInfo* fileInfo(
const QModelIndex& index);
58 FmPath* filePath(
const QModelIndex& index);
59 QString dispName(
const QModelIndex& index);
61 void setShowHidden(
bool show_hidden);
62 bool showHidden()
const {
66 QModelIndex indexFromPath(FmPath* path)
const;
68 virtual Qt::ItemFlags flags(
const QModelIndex& index)
const;
69 virtual QVariant data(
const QModelIndex& index,
int role)
const;
70 virtual int columnCount(
const QModelIndex& parent)
const;
71 virtual int rowCount(
const QModelIndex& parent)
const;
72 virtual QModelIndex parent(
const QModelIndex& child)
const;
73 virtual QModelIndex index(
int row,
int column,
const QModelIndex& parent)
const;
74 virtual bool hasChildren(
const QModelIndex& parent = QModelIndex())
const;
82 void rowLoaded(
const QModelIndex& index);
86 QList<DirTreeModelItem*> rootItems_;
90 #endif // FM_DIRTREEMODEL_H Definition: appchoosercombobox.cpp:26
Definition: dirtreeview.h:36
Definition: dirtreemodel.h:37
Definition: dirtreemodelitem.h:35