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 #include "filetablewidget.h"\r
10 class MainWindow;\r
11 \r
12 namespace Ui {\r
13 class FolderPanel;\r
14 }\r
15 \r
16 class FolderPanel : public QWidget\r
17 {\r
18     Q_OBJECT\r
19 \r
20 public:\r
21     explicit FolderPanel(QWidget *parent = 0);\r
22     ~FolderPanel();\r
23 \r
24     FileTableWidget* fileTable();\r
25     const FileTableWidget* fileTable() const;\r
26 \r
27     QDir* dir() { return &m_dir; }\r
28     const QDir* dir() const { return &m_dir; }\r
29 \r
30     void setCurrentFolder(const QString &path);\r
31     void InstallWatcher();\r
32     void UninstallWatcher();\r
33 \r
34     void beginUpdate()      { m_bUpdating = true; }\r
35     void endUpdate()        { m_bUpdating = false; onUpdateMark(0, 0);}\r
36     bool isUpdating() const { return m_bUpdating; }\r
37 \r
38 private:\r
39     Ui::FolderPanel *ui;\r
40     QDir m_dir;\r
41     QFileIconProvider m_IconFactory;\r
42     QFileSystemWatcher *m_fsWatcher;\r
43     bool m_bUpdating;\r
44 \r
45 private slots:\r
46     void onUpdateMark(int, int);\r
47     void on_locationField_editingFinished();\r
48     void on_directoryChanged(QString);\r
49     void on_fileTable_itemSelectionChanged();\r
50 };\r
51 \r
52 #endif // FOLDERPANEL_H\r