OSDN Git Service

0068e4fbfc9a31250cd69c53f17c12c206943100
[gefu/Gefu.git] / filetableview.h
1 #ifndef FILETABLEVIEW_H\r
2 #define FILETABLEVIEW_H\r
3 \r
4 #include "history.h"\r
5 \r
6 #include <QFileInfoList>\r
7 #include <QTableView>\r
8 \r
9 class FileTableView : public QTableView\r
10 {\r
11     Q_OBJECT\r
12 public:\r
13     explicit FileTableView(QWidget *parent = 0);\r
14     ~FileTableView();\r
15 \r
16     QString side() const;\r
17     void setSide(const QString &side);\r
18 \r
19     History* history() { return &m_history; }\r
20 \r
21     void setRootPath(const QString &path, bool addHistory);\r
22 \r
23 private:\r
24     QString m_side;\r
25     History m_history;\r
26 \r
27     QFileInfoList selectedItems() const;\r
28     void updateMenu();\r
29 \r
30 signals:\r
31     void indexChanged(const QString &text);\r
32 \r
33 public slots:\r
34     void setPath();\r
35     void openUrl();\r
36     void kickProcess();\r
37 \r
38     void toggleChecked();\r
39     void checkAllItems();\r
40     void checkAllFiles();\r
41     void uncheckAllItems();\r
42     void invertAllChecked();\r
43 \r
44     void setPathFromOther();\r
45     void setPathToOther();\r
46     void swapPath();\r
47     void showHiddenFiles(bool show);\r
48     void showSystemFiles(bool show);\r
49     void setSort();\r
50     void refresh();\r
51 \r
52     void back();\r
53     void forward();\r
54     void showHidtory();\r
55     void jumpToHome();\r
56     void jumpToParent();\r
57     void jumpToRoot();\r
58     void jumpTo();\r
59     void cursorDown();\r
60     void cursorUp();\r
61     void cursorToBegin();\r
62     void cursorToEnd();\r
63 \r
64     void cmdCopy();\r
65     void cmdMove();\r
66     void cmdDelete();\r
67     void cmdRename();\r
68     void newFile();\r
69     void newFolder();\r
70 \r
71     void XXX();\r
72 \r
73 private slots:\r
74     void askOverWrite(bool *bOk, int *prevCopyMethod, int *copyMethod,\r
75                       QString *alias, const QString &srcPath,\r
76                       const QString &tgtPath);\r
77 \r
78     // QAbstractItemView interface\r
79 public slots:\r
80     void setRootIndex(const QModelIndex &index);\r
81 \r
82     // QWidget interface\r
83 protected:\r
84     void keyPressEvent(QKeyEvent *event);\r
85     void focusInEvent(QFocusEvent *event);\r
86 \r
87     // QAbstractItemView interface\r
88 protected slots:\r
89     void currentChanged(const QModelIndex &current, const QModelIndex &previous);\r
90 };\r
91 \r
92 #endif // FILETABLEVIEW_H\r