CustusX  2021.04.21-dev+develop.337f9
An IGT application
cxStateServiceImpl.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 CXSTATESERVICEIMPL_H
13 #define CXSTATESERVICEIMPL_H
14 
15 #include "org_custusx_core_state_Export.h"
16 #include "cxStateService.h"
17 
18 namespace cx
19 {
20 typedef boost::shared_ptr<class ApplicationStateMachine> ApplicationStateMachinePtr;
21 typedef boost::shared_ptr<class WorkflowStateMachine> WorkflowStateMachinePtr;
22 
23 
29 class org_custusx_core_state_EXPORT StateServiceImpl: public StateService
30 {
31 Q_OBJECT
32 
33 public:
34  virtual ~StateServiceImpl();
35  StateServiceImpl(ctkPluginContext* context);
36 
37  virtual QString getVersionName();
38  virtual QString getApplicationStateName() const;
39  virtual QStringList getAllApplicationStateNames() const;
40 
41  virtual QActionGroup* getWorkflowActions();
42  virtual void setWorkFlowState(QString uid);
43 
44  virtual Desktop getActiveDesktop();
45  virtual void saveDesktop(Desktop desktop);
46  virtual void resetDesktop();
47 
48  virtual bool isNull();
49 
50 private:
51  WorkflowStateMachinePtr getWorkflow();
52  void initialize();
53 
54  WorkflowStateMachinePtr mWorkflowStateMachine;
55  VisServicesPtr mServices;
56 };
57 
58 }
59 
60 #endif // CXSTATESERVICEIMPL_H
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
Workflow states for CustusX.
boost::shared_ptr< class WorkflowStateMachine > WorkflowStateMachinePtr
Data class for CustusX desktop.
boost::shared_ptr< class ApplicationStateMachine > ApplicationStateMachinePtr
Namespace for all CustusX production code.