folderwatcher.h 507 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MIRALL_FOLDERWATCHER_H
  2. #define MIRALL_FOLDERWATCHER_H
  3. #include <QObject>
  4. #include <QString>
  5. #include <QMutex>
  6. class QFileSystemWatcher;
  7. namespace Mirall {
  8. class FolderWatcher : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. FolderWatcher(const QString &path, QObject *parent = 0L);
  13. ~FolderWatcher();
  14. signals:
  15. void folderChanged(const QString &path);
  16. protected slots:
  17. void slotDirectoryChanged(const QString &path);
  18. private:
  19. QFileSystemWatcher *_watcher;
  20. QMutex _mutex;
  21. };
  22. }
  23. #endif