summaryrefslogtreecommitdiffstats
path: root/logic/RecursiveFileSystemWatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/RecursiveFileSystemWatcher.h')
-rw-r--r--logic/RecursiveFileSystemWatcher.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/logic/RecursiveFileSystemWatcher.h b/logic/RecursiveFileSystemWatcher.h
index 339172bb..a2a9e7e3 100644
--- a/logic/RecursiveFileSystemWatcher.h
+++ b/logic/RecursiveFileSystemWatcher.h
@@ -2,6 +2,7 @@
#include <QFileSystemWatcher>
#include <QDir>
+#include "pathmatcher/IPathMatcher.h"
class RecursiveFileSystemWatcher : public QObject
{
@@ -10,16 +11,27 @@ public:
RecursiveFileSystemWatcher(QObject *parent);
void setRootDir(const QDir &root);
- QDir rootDir() const { return m_root; }
+ QDir rootDir() const
+ {
+ return m_root;
+ }
// WARNING: setting this to true may be bad for performance
void setWatchFiles(const bool watchFiles);
- bool watchFiles() const { return m_watchFiles; }
+ bool watchFiles() const
+ {
+ return m_watchFiles;
+ }
- void setFileExpression(const QString &exp) { m_exp = exp; }
- QString fileExpression() const { return m_exp; }
+ void setMatcher(IPathMatcher::Ptr matcher)
+ {
+ m_matcher = matcher;
+ }
- QStringList files() const { return m_files; }
+ QStringList files() const
+ {
+ return m_files;
+ }
signals:
void filesChanged();
@@ -33,7 +45,7 @@ private:
QDir m_root;
bool m_watchFiles = false;
bool m_isEnabled = false;
- QString m_exp;
+ IPathMatcher::Ptr m_matcher;
QFileSystemWatcher *m_watcher;