BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
JobStatus.h File Reference

Description

Defines enum JobStatus.

Homepage:\n http://www.bornagainproject.org
License:\n GNU General Public License v3 or higher (see COPYING)
Authors
Scientific Computing Group at MLZ (see CITATION, AUTHORS)

Definition in file JobStatus.h.

Include dependency graph for JobStatus.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  JobStatus {
  Idle , Running , Fitting , Completed ,
  Canceled , Failed
}
 The JobStatus enum lists the possible states of a job. More...
 

Functions

JobStatus jobStatusFromString (const QString &name)
 get status value for given string representation More...
 
QString jobStatusToString (JobStatus status)
 get a string representation of the status More...
 

Enumeration Type Documentation

◆ JobStatus

enum JobStatus
strong

The JobStatus enum lists the possible states of a job.

Enumerator
Idle 

the job has not been started yet

Running 

the job is busy calculating

Fitting 

the job is busy fitting

Completed 

the job was successfully completed

Canceled 

the job was stopped by the user

Failed 

the job aborted because it hit an error

Definition at line 22 of file JobStatus.h.

22  {
23  Idle, //!< the job has not been started yet
24  Running, //!< the job is busy calculating
25  Fitting, //!< the job is busy fitting
26  Completed, //!< the job was successfully completed
27  Canceled, //!< the job was stopped by the user
28  Failed //!< the job aborted because it hit an error
29 };
@ 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

Function Documentation

◆ jobStatusFromString()

JobStatus jobStatusFromString ( const QString &  name)

get status value for given string representation

Definition at line 39 of file JobStatus.cpp.

40 {
41  auto it = status2name.right.find(name);
42  ASSERT(it != status2name.right.end());
43  return it->second;
44 }
QString const & name(EShape k)
Definition: particles.cpp:20

References GUI::RealSpace::Particles::name().

Referenced by JobItem::getStatus().

Here is the call graph for this function:

◆ jobStatusToString()

QString jobStatusToString ( JobStatus  status)

get a string representation of the status

Definition at line 32 of file JobStatus.cpp.

33 {
34  auto it = status2name.left.find(status);
35  ASSERT(it != status2name.left.end());
36  return it->second;
37 }

Referenced by JobItem::JobItem(), JobPropertiesTableModel::data(), and JobItem::setStatus().