OSDN Git Service

フォルダとファイルの作成を実装。
[gefu/Gefu.git] / folderpanel.h
1 #ifndef FOLDERPANEL_H\r
2 #define FOLDERPANEL_H\r
3 \r
4 #include <QWidget>\r
5 #include <QDir>\r
6 #include <QTableWidget>\r
7 #include <QFileIconProvider>\r
8 #include <QFileSystemWatcher>\r
9 class MainWindow;\r
10 \r
11 namespace Ui {\r
12 class FolderPanel;\r
13 }\r
14 \r
15 class FolderPanel : public QWidget\r
16 {\r
17     Q_OBJECT\r
18 \r
19 public:\r
20     explicit FolderPanel(QWidget *parent = 0);\r
21     ~FolderPanel();\r
22 \r
23     QTableWidget* fileTable();\r
24     const QTableWidget* fileTable() const;\r
25 \r
26     QDir* dir() { return &m_dir; }\r
27     const QDir* dir() const { return &m_dir; }\r
28 \r
29     void setCurrentFolder(const QString &path);\r
30 \r
31 private:\r
32     Ui::FolderPanel *ui;\r
33     QDir m_dir;\r
34     QFileIconProvider m_IconFactory;\r
35     QFileSystemWatcher *m_fsWatcher;\r
36 \r
37     MainWindow* mainWindow();\r
38     bool eventFilter(QObject *, QEvent *);\r
39 \r
40 private slots:\r
41     void on_fileTable_cellChanged(int row, int column);\r
42     void on_locationField_editingFinished();\r
43     void on_directoryChanged(QString);\r
44 };\r
45 \r
46 #endif // FOLDERPANEL_H\r