4 #include "filetablemodel.h"
9 class FolderView : public QTableView
13 explicit FolderView(QWidget *parent = 0);
19 void updateAppearance();
22 void searchItem(const QString &text);
23 void searchNext(const QString &text);
24 void searchPrev(const QString &text);
26 void setCheckStateAll(bool checked);
27 void setCheckStateAllFiles();
28 void invertCheckState();
29 void toggleCheckState(const QModelIndex &index);
32 bool historyForward();
36 QFileInfo currentItem() const;
37 QString dir() const { return m_model.absolutePath(); }
38 QFileInfoList checkedItems() const;
39 QFileInfoList selectedItems() const;
40 const History* history() const { return &m_history; }
41 QStringList nameFilters() const { return m_model.nameFilters(); }
44 void setPath(const QString &path, bool addHistory);
45 void setFilter(QDir::Filters filter, bool enable);
46 void setHistoryIndexAt(int index);
47 void setNameFilters(const QStringList &list);
48 void setSorting(QDir::SortFlags flags);
51 FileTableModel m_model;
53 QPoint m_dragStartPos;
57 void currentChanged(const QString &path);
59 void dropAccepted(const QFileInfoList &list);
62 void retrieveStarted(const QString &path);
63 void retrieveFinished();
64 void keyPressed(QKeyEvent *event);
68 // QAbstractItemView interface
70 void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
71 void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
75 void keyPressEvent(QKeyEvent *event);
76 void mousePressEvent(QMouseEvent *event);
77 void mouseMoveEvent(QMouseEvent *event);
78 void dragEnterEvent(QDragEnterEvent *event);
79 void dropEvent(QDropEvent *event);
82 #endif // FOLDERVIEW_H