Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxStateServiceProxy.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 CXSTATESERVICEPROXY_H
13 #define CXSTATESERVICEPROXY_H
14 
15 #include "cxStateService.h"
17 
18 namespace cx
19 {
20 
24 class cxResource_EXPORT StateServiceProxy: public StateService
25 {
26 Q_OBJECT
27 
28 public:
29  static StateServicePtr create(ctkPluginContext *pluginContext);
30  StateServiceProxy(ctkPluginContext *pluginContext);
31  virtual ~StateServiceProxy() {}
32 
33  virtual QString getVersionName();
34 // virtual QActionGroup* getApplicationActions();
35  virtual QString getApplicationStateName() const;
36  virtual QStringList getAllApplicationStateNames() const;
37 
38  virtual QActionGroup* getWorkflowActions();
39  virtual void setWorkFlowState(QString uid);
40 
41  virtual Desktop getActiveDesktop();
42  virtual void saveDesktop(Desktop desktop);
43  virtual void resetDesktop();
44  virtual WorkflowStateMachinePtr getWorkflow();
45 
46  virtual bool isNull();
47 
48 private:
49  void initServiceListener();
50  void onServiceAdded(StateService* service);
51  void onServiceRemoved(StateService *service);
52 
53  ctkPluginContext *mPluginContext;
54  StateServicePtr mService;
55  boost::shared_ptr<ServiceTrackerListener<StateService> > mServiceListener;
56 };
57 
58 }
59 
60 #endif // CXSTATESERVICEPROXY_H
boost::shared_ptr< class StateService > StateServicePtr
Workflow states for CustusX.
boost::shared_ptr< class WorkflowStateMachine > WorkflowStateMachinePtr
Data class for CustusX desktop.
Namespace for all CustusX production code.