jared | a954181 | 2013-01-09 00:08:46 -0800 | [diff] [blame] | 1 | #ifndef FILESYSTEMWATCHER_H |
| 2 | #define FILESYSTEMWATCHER_H |
| 3 | |
| 4 | #include <QtGui> |
| 5 | |
| 6 | namespace Ui { |
| 7 | class filesystemwatcher; |
| 8 | } |
| 9 | |
| 10 | class filesystemwatcher : public QMainWindow |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | |
| 14 | public: |
| 15 | // constructor |
| 16 | filesystemwatcher(QString dirPath, QWidget *parent = 0); |
| 17 | |
| 18 | // destructor |
| 19 | ~filesystemwatcher(); |
| 20 | |
| 21 | private slots: |
| 22 | // signal for changes to monitored files |
| 23 | void fileChangedSlot(QString filePath); |
| 24 | |
| 25 | // signal for changes to monitored directories |
| 26 | void dirChangedSlot(QString dirPath); |
| 27 | |
| 28 | private: |
| 29 | Ui::filesystemwatcher* m_ui; // user interface |
| 30 | QFileSystemWatcher* m_watcher; // filesystem watcher |
| 31 | QStringListModel* m_listViewModel; // list view model |
| 32 | QListView* m_listView; // list |
| 33 | QString m_dirPath; // monitored path |
| 34 | }; |
| 35 | |
| 36 | #endif // FILESYSTEMWATCHER_H |