|
LMMS
|
#include <FileSearchJob.h>
Classes | |
| struct | Task |
| Represents a search task to be carried out by the search job. More... | |
Signals | |
| void | foundMatch (const QString &path) |
| Emitted when the search job has found a matching path. | |
| void | started () |
| Emitted when the search job has started searching. | |
| void | finished () |
| Emitted when the search job has finished searching. | |
Public Member Functions | |
| FileSearchJob (QObject *parent=nullptr) | |
Create a search job with the given parent (if any). | |
| ~FileSearchJob () | |
| Stop processing and destroys the object. | |
| FileSearchJob (const FileSearchJob &)=delete | |
| FileSearchJob (FileSearchJob &&)=delete | |
| FileSearchJob & | operator= (const FileSearchJob &)=delete |
| FileSearchJob & | operator= (FileSearchJob &&)=delete |
| void | search (Task task) |
Private Member Functions | |
| void | runSearch (Task task) |
Private Attributes | |
| std::future< void > | m_task |
| std::atomic_flag | m_stop = ATOMIC_FLAG_INIT |
The FileSearchJob class allows for searching for files on the filesystem. Searching occurs on a background thread, and results are emitted as a Qt slot back to the user.
| lmms::gui::FileSearchJob::FileSearchJob | ( | QObject * | parent = nullptr | ) |
Create a search job with the given parent (if any).
| lmms::gui::FileSearchJob::~FileSearchJob | ( | ) |
Stop processing and destroys the object.
|
delete |
|
delete |
|
signal |
Emitted when the search job has finished searching.
Emitted when the search job has found a matching path.
|
delete |
|
delete |
Commit to searching with the given task. Cancels any previous search. Callers can connect to the provided signals to interact with the search and its progress.
|
signal |
Emitted when the search job has started searching.
|
private |
|
private |