Watcher that monitors file changes. More...
#include <OpenMS/SYSTEM/FileWatcher.h>
 
  
 | Signals | |
| void | fileChanged (const String &) | 
| Delayed file change signal.  More... | |
| Public Member Functions | |
| FileWatcher (QObject *parent=0) | |
| Constructor.  More... | |
| virtual | ~FileWatcher () | 
| Destructor.  More... | |
| void | setDelayInSeconds (DoubleReal delay) | 
| Sets the delay in seconds (default: 1s)  More... | |
| void | addFile (const String &path) | 
| Adds a file to the watcher.  More... | |
| void | removeFile (const String &path) | 
| removes a file from the watcher  More... | |
| Protected Slots | |
| void | monitorFileChanged_ (const QString &name) | 
| Slot that is connected to the fileChanged signal in order to track the changes.  More... | |
| void | timerTriggered_ () | 
| Slot that is called when the delay is over.  More... | |
| Protected Attributes | |
| Map< QString, QString > | timers_ | 
| A map that links timer name and file.  More... | |
| DoubleReal | delay_in_seconds_ | 
| Delay (seconds)  More... | |
Watcher that monitors file changes.
This class can be used similar to QFileSystemWatcher. Additionally it offers a delayed fileChanged signal.
This behaviour is required for the following reason: Normally QFileSystemWatcher emits a signal every time a file is changed. This causes several signals for large files (one for each flush of the buffer).
| FileWatcher | ( | QObject * | parent = 0 | ) | 
Constructor.
| 
 | virtual | 
Destructor.
| 
 | inline | 
Adds a file to the watcher.
References String::toQString().
Referenced by TOPPViewBase::addDataFile(), and TOPPViewBase::fileChanged_().
| 
 | signal | 
Delayed file change signal.
| 
 | protectedslot | 
Slot that is connected to the fileChanged signal in order to track the changes.
| 
 | inline | 
removes a file from the watcher
References String::toQString().
Referenced by TOPPViewBase::fileChanged_().
| 
 | inline | 
Sets the delay in seconds (default: 1s)
References FileWatcher::delay_in_seconds_.
| 
 | protectedslot | 
Slot that is called when the delay is over.
| 
 | protected | 
Delay (seconds)
Referenced by FileWatcher::setDelayInSeconds().
| 
 | protected | 
A map that links timer name and file.
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:33 using doxygen 1.8.5 |