13#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
22#include <QtCore/QFileSystemWatcher>
56 delay_in_seconds_ = delay;
60 inline void addFile(
const std::string & path)
62 QFileSystemWatcher::addPath(
toQString(path));
68 QFileSystemWatcher::removePath(
toQString(path));
Watcher that monitors file changes.
Definition FileWatcher.h:43
void fileChanged(const std::string &)
Delayed file change signal.
void removeFile(const std::string &path)
removes a file from the watcher
Definition FileWatcher.h:66
std::map< QString, QString > timers_
A map that links timer name and file.
Definition FileWatcher.h:83
void timerTriggered_()
Slot that is called when the delay is over.
void setDelayInSeconds(double delay)
Sets the delay in seconds (default: 1s)
Definition FileWatcher.h:54
~FileWatcher() override
Destructor.
void monitorFileChanged_(const QString &name)
Slot that is connected to the fileChanged signal in order to track the changes.
double delay_in_seconds_
Delay (seconds)
Definition FileWatcher.h:85
void addFile(const std::string &path)
Adds a file to the watcher.
Definition FileWatcher.h:60
FileWatcher(QObject *parent=nullptr)
Constructor.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
QString toQString(const std::string &s)
Convert std::string to QString (replaces String::toQString())
Definition Qt5Port.h:42