2012-01-05 15:51:23 +01:00
|
|
|
#include "qtfslistener.h"
|
|
|
|
|
2012-01-05 16:01:43 +01:00
|
|
|
#include <QStringList>
|
|
|
|
|
2012-01-05 15:51:23 +01:00
|
|
|
QtFSListener::QtFSListener(QObject* parent)
|
|
|
|
: FileSystemWatcherInterface(parent),
|
|
|
|
watcher_(this) {
|
|
|
|
connect(&watcher_, SIGNAL(directoryChanged(const QString&)),
|
|
|
|
SIGNAL(PathChanged(const QString&)));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtFSListener::AddPath(const QString& path) {
|
|
|
|
watcher_.addPath(path);
|
|
|
|
}
|
2012-01-05 16:01:43 +01:00
|
|
|
|
|
|
|
void QtFSListener::Clear() {
|
|
|
|
watcher_.removePaths(watcher_.directories());
|
|
|
|
watcher_.removePaths(watcher_.files());
|
|
|
|
}
|