Initial commit
[cuteexplorer] / filelistwidget.h
1 #ifndef FILELISTWIDGET_H
2 #define FILELISTWIDGET_H
3
4 #include <QListView>
5 #include <QFileSystemModel>
6 #include <QDir>
7 #include <QMessageBox>
8 #include <QKeyEvent>
9
10 class FileListWidget : public QListView
11 {
12 Q_OBJECT
13 public:
14     explicit FileListWidget(QWidget *parent = 0);
15
16     QString getPath();
17
18 signals:
19     void pathChanged(QString newPath);
20
21 public slots:
22     void changePath(QString path);
23     void changePathUp();
24
25     void actionDelete();
26     void actionCut();
27     void actionCopy();
28     void actionPaste();
29     void actionSwitchMode(bool iconmode=true);
30     void actionRename();
31     void actionShowHidden(bool show=true);
32     void actionSendFiles();
33
34     void setSelectMode(bool mode=true);
35 private slots:
36     void handleItemActivation(QModelIndex index);
37
38 private:
39     QFileSystemModel *fileSystemModel;
40     QDir currentDir;
41     QModelIndexList selectedFiles;
42     bool mode_cut;
43     bool mode_copy;
44     bool select;
45 };
46
47 #endif // FILELISTWIDGET_H