16 #include "Base/Util/Assert.h"
18 #include <boost/bimap.hpp>
22 const std::vector<boost::bimap<JobStatus, QString>::value_type> values = {
27 const boost::bimap<JobStatus, QString> status2name(values.begin(), values.end());
34 auto it = status2name.left.find(status);
35 ASSERT(it != status2name.left.end());
41 auto it = status2name.right.find(
name);
42 ASSERT(it != status2name.right.end());
QString jobStatusToString(JobStatus status)
get a string representation of the status
JobStatus jobStatusFromString(const QString &name)
get status value for given string representation
JobStatus
The JobStatus enum lists the possible states of a job.
@ Completed
the job was successfully completed
@ Canceled
the job was stopped by the user
@ Running
the job is busy calculating
@ Failed
the job aborted because it hit an error
@ Idle
the job has not been started yet
@ Fitting
the job is busy fitting
QString const & name(EShape k)