4 #include "filetablemodel.h"
10 class FolderView : public QTableView
14 explicit FolderView(QWidget *parent = 0);
19 void initialize(MainWindow *mainWnd, bool left);
20 void updateAppearance(bool darker = false);
23 void searchItem(const QString &text);
24 void searchNext(const QString &text);
25 void searchPrev(const QString &text);
27 void setCheckStateAll(Qt::CheckState state);
28 void setCheckStateAllFiles();
29 void invertCheckState();
30 void toggleCheckState(const QModelIndex &index);
33 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);
51 MainWindow *m_mainWnd;
52 FileTableModel m_model;
54 QPoint m_dragStartPos;
58 void currentChanged(const QFileInfo &info);
60 void dropAccepted(const QFileInfoList &list);
63 void retrieveStarted(const QString &path);
64 void requestContextMenu(QContextMenuEvent *event);
65 // void keyPressed(QKeyEvent *event);
69 // QAbstractItemView interface
71 void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
72 void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
76 void keyPressEvent(QKeyEvent *event);
77 void mousePressEvent(QMouseEvent *event);
78 void mouseMoveEvent(QMouseEvent *event);
79 void dragEnterEvent(QDragEnterEvent *event);
80 void dropEvent(QDropEvent *event);
81 void contextMenuEvent(QContextMenuEvent *event);
82 void focusInEvent(QFocusEvent *event);
83 void focusOutEvent(QFocusEvent *event);
86 #endif // FOLDERVIEW_H