Worker thread searching for files.
More...
#include </var/tmp/work/evaf/src/apps/FileFinder/Engine/engine.h>
|
void | finished (bool canceled) |
| Signal indicating that a search is finished. More...
|
|
void | found (QString const &fileName, QString const &dir) |
| A file was found during the search. More...
|
|
Worker thread searching for files.
The Worker class is a separate thread that searches for files and then emits the found() signal on every file found.
Definition at line 178 of file engine.h.
eVaf::FileFinder::Engine::Internal::Worker::Worker |
( |
QObject * |
parent = 0 | ) |
|
virtual eVaf::FileFinder::Engine::Internal::Worker::~Worker |
( |
| ) |
|
|
virtual |
bool eVaf::FileFinder::Engine::Internal::Worker::busy |
( |
| ) |
const |
Indicates that a search is ongoing and the worker thread busy.
void eVaf::FileFinder::Engine::Internal::Worker::cancel |
( |
| ) |
|
Cancels an ongoing search.
void eVaf::FileFinder::Engine::Internal::Worker::finished |
( |
bool |
canceled | ) |
|
|
signal |
Signal indicating that a search is finished.
- Parameters
-
canceled | True if the search was canceled instead of finished |
void eVaf::FileFinder::Engine::Internal::Worker::found |
( |
QString const & |
fileName, |
|
|
QString const & |
dir |
|
) |
| |
|
signal |
A file was found during the search.
- Parameters
-
fileName | Name of the file with a path relative to the search directory |
dir | Search directory |
virtual void eVaf::FileFinder::Engine::Internal::Worker::run |
( |
| ) |
|
|
protectedvirtual |
void eVaf::FileFinder::Engine::Internal::Worker::search |
( |
QString const & |
dir, |
|
|
bool |
recursive, |
|
|
Filter const & |
filter |
|
) |
| |
Starts a new search.
- Parameters
-
dir | Directory where to search |
recursive | If true, searches recurively in sub-directories |
filter | Search filter |
The search() function starts a new search. If a search is already ongoing, cancels it and starts a new one.
Search results are reported back with the found() signal and the finished() signal indicates that the search is done.
void eVaf::FileFinder::Engine::Internal::Worker::stop |
( |
| ) |
|
Stops and terminates the worker thread.
The documentation for this class was generated from the following file: