![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Provides directory scanning and file watching via QFileSystemWatcher to automatically load new modules into a ctkCmdLineModuleManager. More...
#include <Libs/CommandLineModules/Core/ctkCmdLineModuleDirectoryWatcher.h>
Signals | |
void | errorDetected (const QString &) |
Signals that an error was detected, and the caller should raise an error to the user. More... | |
Public Member Functions | |
QStringList | additionalModules () const |
Gets the list of additional command line executable, where "additional" means "in addition to those directories we are watching". More... | |
QStringList | commandLineModules () const |
Returns the complete list of files (command line executables) currently being watched. More... | |
ctkCmdLineModuleDirectoryWatcher (ctkCmdLineModuleManager *moduleManager) | |
QStringList | directories () const |
Returns the list of directories currently being watched. More... | |
void | emitErrorDectectedSignal (const QString &) |
public method to emit the errorDetected signal. More... | |
void | setAdditionalModules (const QStringList &files) |
Sets an additional list of command line executables to watch. More... | |
void | setDebug (bool debug) |
Set the watcher into debug mode, for more output. More... | |
void | setDirectories (const QStringList &directories) |
Set the directories to be watched. More... | |
virtual | ~ctkCmdLineModuleDirectoryWatcher () |
Provides directory scanning and file watching via QFileSystemWatcher to automatically load new modules into a ctkCmdLineModuleManager.
This class can be used in 3 ways.
OR
OR
If either directories or files are invalid (not existing, not executable etc), they are filtered out and ignored.
Definition at line 63 of file ctkCmdLineModuleDirectoryWatcher.h.
ctkCmdLineModuleDirectoryWatcher::ctkCmdLineModuleDirectoryWatcher | ( | ctkCmdLineModuleManager * | moduleManager | ) |
|
virtual |
QStringList ctkCmdLineModuleDirectoryWatcher::additionalModules | ( | ) | const |
Gets the list of additional command line executable, where "additional" means "in addition to those directories we are watching".
QStringList ctkCmdLineModuleDirectoryWatcher::commandLineModules | ( | ) | const |
Returns the complete list of files (command line executables) currently being watched.
QStringList ctkCmdLineModuleDirectoryWatcher::directories | ( | ) | const |
Returns the list of directories currently being watched.
void ctkCmdLineModuleDirectoryWatcher::emitErrorDectectedSignal | ( | const QString & | ) |
public method to emit the errorDetected signal.
|
signal |
Signals that an error was detected, and the caller should raise an error to the user.
void ctkCmdLineModuleDirectoryWatcher::setAdditionalModules | ( | const QStringList & | files | ) |
Sets an additional list of command line executables to watch.
files | a list of file names. If any of these file names are not valid command line executables, they will be filtered out and ignored. |
void ctkCmdLineModuleDirectoryWatcher::setDebug | ( | bool | debug | ) |
Set the watcher into debug mode, for more output.
debug | if true, you get more output on the console, otherwise, less output. |
void ctkCmdLineModuleDirectoryWatcher::setDirectories | ( | const QStringList & | directories | ) |
Set the directories to be watched.
directories | a list of directory names. If any of these are invalid, they will be filtered out and ignored. |