CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxCustusXWorkflowStates.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXCUSTUSXWORKFLOWSTATES_H_
13 #define CXCUSTUSXWORKFLOWSTATES_H_
14 
15 #include "org_custusx_core_state_Export.h"
16 
17 #include <iostream>
18 #include <QState>
19 #include <QStateMachine>
20 #include <QString>
21 #include <QAction>
22 #include "cxTypeConversions.h"
24 #include "cxWorkflowState.h"
25 #include "boost/shared_ptr.hpp"
26 
27 
28 namespace cx
29 {
30 
31 class org_custusx_core_state_EXPORT PatientDataWorkflowState: public WorkflowState
32 {
33 Q_OBJECT
34 
35 public:
36  PatientDataWorkflowState(QState* parent, CoreServicesPtr backend) :
37  WorkflowState(parent, "PatientDataUid", "Patient Data", backend)
38  {}
40  virtual QIcon getIcon() const { return QIcon(":/icons/workflow_state_patient_data.png"); }
41 
42  virtual bool canEnter() const { return true; }
43 };
44 
45 class org_custusx_core_state_EXPORT NavigationWorkflowState: public WorkflowState
46 {
47 Q_OBJECT
48 
49 public:
50  NavigationWorkflowState(QState* parent, CoreServicesPtr services);
52  virtual QIcon getIcon() const
53  {
54  return QIcon(":/icons/workflow_state_navigation.png");
55  }
56  virtual void onEntry(QEvent* event);
57  virtual bool canEnter() const;
58 };
59 
60 class org_custusx_core_state_EXPORT RegistrationWorkflowState: public WorkflowState
61 {
62 Q_OBJECT
63 
64 public:
65  RegistrationWorkflowState(QState* parent, CoreServicesPtr services);
66 
68  virtual QIcon getIcon() const
69  {
70  return QIcon(":/icons/workflow_state_registration.png");
71  }
72 
73  virtual bool canEnter() const;
74 };
75 
76 class org_custusx_core_state_EXPORT PreOpPlanningWorkflowState: public WorkflowState
77 {
78 Q_OBJECT
79 
80 public:
81  PreOpPlanningWorkflowState(QState* parent, CoreServicesPtr services);
82 
84  {}
85  virtual QIcon getIcon() const
86  {
87  return QIcon(":/icons/workflow_state_planning.png");
88  }
89 
90  virtual bool canEnter() const;
91 };
92 
93 class org_custusx_core_state_EXPORT IntraOpImagingWorkflowState: public WorkflowState
94 {
95 Q_OBJECT
96 
97 public:
98  IntraOpImagingWorkflowState(QState* parent, CoreServicesPtr services);
100  {}
101  virtual QIcon getIcon() const
102  {
103  return QIcon(":/icons/workflow_state_acquisition.png");
104  }
105 
106  virtual void onEntry(QEvent* event);
107  virtual bool canEnter() const;
108 };
109 
110 class org_custusx_core_state_EXPORT PostOpControllWorkflowState: public WorkflowState
111 {
112 Q_OBJECT
113 
114 public:
115  PostOpControllWorkflowState(QState* parent, CoreServicesPtr services);
117  virtual QIcon getIcon() const
118  {
119  return QIcon(":/icons/workflow_state_post_op.png");
120  }
121 
122  virtual bool canEnter() const;
123 };
124 
128 }
129 #endif /* CXCUSTUSXWORKFLOWSTATES_H_ */
virtual QIcon getIcon() const
State in a WorkflowStateMachine.
boost::shared_ptr< class CoreServices > CoreServicesPtr
Definition: cxCameraStyle.h:37
virtual ~PostOpControllWorkflowState()
PatientDataWorkflowState(QState *parent, CoreServicesPtr backend)
Namespace for all CustusX production code.