OSDN Git Service

テキストビューアを試し実装中
[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     QPoint m_dragStartPos;\r
27     bool m_dragging;\r
28 \r
29     QFileInfoList selectedItems() const;\r
30     void updateMenu();\r
31 \r
32 signals:\r
33     void indexChanged(const QString &text);\r
34     void filterChanged();\r
35     void openRequested(const QFileInfo &info);\r
36 \r
37 private slots:\r
38     void openItem();\r
39     void openUrl(const QModelIndex &index = QModelIndex());\r
40     void openEditor(const QString &path = QString());\r
41     void openTerminal(const QString &path = QString());\r
42     void kickProcess();\r
43 \r
44     void toggleChecked();\r
45     void checkAllItems();\r
46     void checkAllFiles();\r
47     void uncheckAllItems();\r
48     void invertAllChecked();\r
49 \r
50     void setPathFromOther();\r
51     void setPathToOther();\r
52     void swapPath();\r
53     void showHiddenFiles(bool show);\r
54     void showSystemFiles(bool show);\r
55     void setSort();\r
56     void refresh();\r
57     void setFilter();\r
58 \r
59     void back();\r
60     void forward();\r
61     void showHidtory();\r
62     void jumpToHome();\r
63     void jumpToParent();\r
64     void jumpToRoot();\r
65     void jumpTo();\r
66     void cursorDown();\r
67     void cursorUp();\r
68     void cursorToBegin();\r
69     void cursorToEnd();\r
70 \r
71     void cmdCopy();\r
72     void cmdMove();\r
73     void cmdDelete();\r
74     void cmdRename();\r
75     void newFile();\r
76     void newFolder();\r
77     void copyFilenameToClipboard();\r
78     void copyFullpathToClipboard();\r
79 \r
80     void XXX();\r
81 \r
82 private slots:\r
83     void askOverWrite(bool *bOk, int *prevCopyMethod, int *copyMethod,\r
84                       QString *alias, const QString &srcPath,\r
85                       const QString &tgtPath);\r
86     void onDoubleClick(const QModelIndex &index);\r
87     void contextMenuRequested(const QPoint & pos);\r
88 \r
89     // QAbstractItemView interface\r
90 public slots:\r
91     void setRootIndex(const QModelIndex &index);\r
92 \r
93     // QWidget interface\r
94 protected:\r
95     void keyPressEvent(QKeyEvent *event);\r
96     void focusInEvent(QFocusEvent *event);\r
97     void dropEvent(QDropEvent *event);\r
98     void dragEnterEvent(QDragEnterEvent *event);\r
99     void mousePressEvent(QMouseEvent *event);\r
100     void mouseMoveEvent(QMouseEvent *event);\r
101 \r
102     // QAbstractItemView interface\r
103 protected slots:\r
104     void currentChanged(const QModelIndex &current, const QModelIndex &previous);\r
105 };\r
106 \r
107 #endif // FILETABLEVIEW_H\r