FileWatcher Class Reference
#include <filewatcher.h>
Public Slots | |
| void | addFile (QString fileName) |
| void | removeFile (QString fileName) |
| void | addDir (QString fileName) |
| void | removeDir (QString fileName) |
| void | start () |
| void | stop () |
| void | forceScan () |
Signals | |
| void | fileChanged (QString) |
| void | fileDeleted (QString) |
| void | dirChanged (QString) |
| void | dirDeleted (QString) |
| void | statePending (QString) |
Public Member Functions | |
| FileWatcher (QObject *parent) | |
| ~FileWatcher () | |
| bool | isActive () |
| void | setTimeOut (const int newTimeOut, const bool restartTimer=false) |
| int | timeOut () const |
| QList< QString > | files () |
Private Slots | |
| void | checkFiles () |
Private Attributes | |
| QMap< QString, fileMod > | watchedFiles |
| QTimer * | watchTimer |
| bool | blockAddRemove |
| bool | stopped |
| bool | dying |
| int | m_timeOut |
Classes | |
| struct | fileMod |
Detailed Description
Definition at line 19 of file filewatcher.h.
Constructor & Destructor Documentation
| FileWatcher::FileWatcher | ( | QObject * | parent | ) |
Definition at line 23 of file filewatcher.cpp.
References blockAddRemove, checkFiles(), dying, m_timeOut, stopped, watchedFiles, and watchTimer.
| FileWatcher::~FileWatcher | ( | ) |
Definition at line 36 of file filewatcher.cpp.
References blockAddRemove, checkFiles(), dying, watchedFiles, and watchTimer.
Member Function Documentation
| bool FileWatcher::isActive | ( | ) |
Definition at line 111 of file filewatcher.cpp.
References blockAddRemove.
Referenced by ScribusCore::fileWatcherActive().
| void FileWatcher::setTimeOut | ( | const int | newTimeOut, | |
| const bool | restartTimer = false | |||
| ) |
Definition at line 46 of file filewatcher.cpp.
References m_timeOut, and start().
Referenced by PageItem_LatexFrame::PageItem_LatexFrame().
| int FileWatcher::timeOut | ( | ) | const |
| QList< QString > FileWatcher::files | ( | ) |
Definition at line 116 of file filewatcher.cpp.
References watchedFiles.
Referenced by ScribusDoc::itemSelection_ClearItem(), ScribusDoc::itemSelection_DeleteItem(), and ScribusDoc::loadPict().
| void FileWatcher::addFile | ( | QString | fileName | ) | [slot] |
Definition at line 58 of file filewatcher.cpp.
References FileWatcher::fileMod::info, m_timeOut, FileWatcher::fileMod::pending, FileWatcher::fileMod::pendingCount, stopped, FileWatcher::fileMod::timeInfo, watchedFiles, and watchTimer.
Referenced by addDir(), ScribusDoc::loadPict(), CollectForOutput::processItem(), PrefsManager::setupMainWindow(), ScribusMainWindow::updateRecent(), and PageItem_LatexFrame::writeEditorFile().
| void FileWatcher::removeFile | ( | QString | fileName | ) | [slot] |
Definition at line 74 of file filewatcher.cpp.
References m_timeOut, stopped, watchedFiles, and watchTimer.
Referenced by ScribusMainWindow::DoFileClose(), ScribusDoc::itemSelection_ClearItem(), ScribusDoc::itemSelection_DeleteItem(), ScribusDoc::loadPict(), CollectForOutput::processItem(), removeDir(), and ScribusMainWindow::removeRecent().
| void FileWatcher::addDir | ( | QString | fileName | ) | [slot] |
| void FileWatcher::removeDir | ( | QString | fileName | ) | [slot] |
| void FileWatcher::start | ( | ) | [slot] |
Definition at line 93 of file filewatcher.cpp.
References m_timeOut, stopped, and watchTimer.
Referenced by CollectForOutput::collect(), ScribusMainWindow::DoFileSave(), ScribusMainWindow::doPrint(), setTimeOut(), and PageItem_LatexFrame::writeEditorFile().
| void FileWatcher::stop | ( | ) | [slot] |
Definition at line 100 of file filewatcher.cpp.
References stopped, and watchTimer.
Referenced by CollectForOutput::collect(), ScribusMainWindow::DoFileSave(), ScribusMainWindow::doPrint(), PageItem_LatexFrame::PageItem_LatexFrame(), and PageItem_LatexFrame::writeEditorFile().
| void FileWatcher::forceScan | ( | ) | [slot] |
Definition at line 106 of file filewatcher.cpp.
References checkFiles().
Referenced by CollectForOutput::collect(), ScribusMainWindow::DoFileSave(), ScribusMainWindow::doPrint(), and PageItem_LatexFrame::writeEditorFile().
| void FileWatcher::checkFiles | ( | ) | [private, slot] |
Definition at line 121 of file filewatcher.cpp.
References blockAddRemove, dirChanged(), dirDeleted(), dying, fileChanged(), fileDeleted(), m_timeOut, statePending(), stopped, watchedFiles, and watchTimer.
Referenced by FileWatcher(), forceScan(), and ~FileWatcher().
| void FileWatcher::fileChanged | ( | QString | ) | [signal] |
Referenced by checkFiles().
| void FileWatcher::fileDeleted | ( | QString | ) | [signal] |
Referenced by checkFiles().
| void FileWatcher::dirChanged | ( | QString | ) | [signal] |
Referenced by checkFiles().
| void FileWatcher::dirDeleted | ( | QString | ) | [signal] |
Referenced by checkFiles().
| void FileWatcher::statePending | ( | QString | ) | [signal] |
Referenced by checkFiles().
Member Data Documentation
QMap<QString, fileMod> FileWatcher::watchedFiles [private] |
Definition at line 57 of file filewatcher.h.
Referenced by addFile(), checkFiles(), files(), FileWatcher(), removeFile(), and ~FileWatcher().
QTimer* FileWatcher::watchTimer [private] |
Definition at line 58 of file filewatcher.h.
Referenced by addFile(), checkFiles(), FileWatcher(), removeFile(), start(), stop(), and ~FileWatcher().
bool FileWatcher::blockAddRemove [private] |
Definition at line 59 of file filewatcher.h.
Referenced by checkFiles(), FileWatcher(), isActive(), and ~FileWatcher().
bool FileWatcher::stopped [private] |
Definition at line 60 of file filewatcher.h.
Referenced by addFile(), checkFiles(), FileWatcher(), removeFile(), start(), and stop().
bool FileWatcher::dying [private] |
Definition at line 61 of file filewatcher.h.
Referenced by checkFiles(), FileWatcher(), and ~FileWatcher().
int FileWatcher::m_timeOut [private] |
Definition at line 62 of file filewatcher.h.
Referenced by addFile(), checkFiles(), FileWatcher(), removeFile(), setTimeOut(), start(), and timeOut().
The documentation for this class was generated from the following files:
