filewatcher.h 321 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <QObject>
  3. #include <QString>
  4. #include <QFileSystemWatcher>
  5. class FileWatcher:public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. FileWatcher();
  10. ~FileWatcher();
  11. bool addPath(const QString& file);
  12. signals:
  13. void sig_dirStateChange(const QString& path);
  14. private:
  15. QFileSystemWatcher* m_fileSystemWatcher;
  16. };