|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The JobWorker class provides running the domain simulation in a thread. More...
Public Slots | |
| void | start () |
| void | terminate () |
| Sets request for JobRunner to terminate underlying domain simulation. More... | |
Signals | |
| void | finished () |
| void | progressUpdate () |
| void | started () |
Public Member Functions | |
| JobWorker (const QString &identifier, ISimulation *simulation) | |
| QString | failureMessage () const |
| QString | identifier () const |
| int | progress () const |
| int | simulationDuration () const |
| QString | status () const |
Private Member Functions | |
| bool | updateProgress (int percentage_done) |
| Sets current progress. Returns true if we want to continue the simulation. More... | |
Private Attributes | |
| QString | m_failure_message |
| QString | m_identifier |
| QString | m_job_status |
| int | m_percentage_done |
| ISimulation * | m_simulation |
| int | m_simulation_duration |
| bool | m_terminate_request_flag |
The JobWorker class provides running the domain simulation in a thread.
Definition at line 24 of file JobWorker.h.
| JobWorker::JobWorker | ( | const QString & | identifier, |
| ISimulation * | simulation | ||
| ) |
Definition at line 20 of file JobWorker.cpp.
| QString JobWorker::failureMessage | ( | ) | const |
Definition at line 86 of file JobWorker.cpp.
References m_failure_message.
Referenced by JobQueueData::processFinishedJob().
|
signal |
Referenced by JobQueueData::runJob(), and start().
| QString JobWorker::identifier | ( | ) | const |
Definition at line 30 of file JobWorker.cpp.
References m_identifier.
Referenced by JobQueueData::processFinishedJob().
| int JobWorker::progress | ( | ) | const |
Definition at line 35 of file JobWorker.cpp.
References m_percentage_done.
|
signal |
Referenced by JobQueueData::runJob(), start(), and updateProgress().
| int JobWorker::simulationDuration | ( | ) | const |
Definition at line 91 of file JobWorker.cpp.
References m_simulation_duration.
Referenced by JobQueueData::processFinishedJob().
|
slot |
Definition at line 40 of file JobWorker.cpp.
References GUIHelpers::currentDateTime(), finished(), m_failure_message, m_job_status, m_percentage_done, m_simulation, m_simulation_duration, m_terminate_request_flag, progressUpdate(), ISimulation::runSimulation(), started(), ISimulation::subscribe(), and updateProgress().
Referenced by JobQueueData::runJob().
|
signal |
Referenced by JobQueueData::runJob(), and start().
| QString JobWorker::status | ( | ) | const |
Definition at line 81 of file JobWorker.cpp.
References m_job_status.
Referenced by JobQueueData::processFinishedJob().
|
slot |
Sets request for JobRunner to terminate underlying domain simulation.
Definition at line 98 of file JobWorker.cpp.
References m_job_status, and m_terminate_request_flag.
Referenced by JobQueueData::cancelJob().
|
private |
Sets current progress. Returns true if we want to continue the simulation.
Definition at line 106 of file JobWorker.cpp.
References m_percentage_done, m_terminate_request_flag, and progressUpdate().
Referenced by start().
|
private |
Definition at line 56 of file JobWorker.h.
Referenced by failureMessage(), and start().
|
private |
Definition at line 51 of file JobWorker.h.
Referenced by identifier().
|
private |
Definition at line 54 of file JobWorker.h.
Referenced by start(), status(), and terminate().
|
private |
Definition at line 53 of file JobWorker.h.
Referenced by progress(), start(), and updateProgress().
|
private |
Definition at line 52 of file JobWorker.h.
Referenced by start().
|
private |
Definition at line 57 of file JobWorker.h.
Referenced by simulationDuration(), and start().
|
private |
Definition at line 55 of file JobWorker.h.
Referenced by start(), terminate(), and updateProgress().