Fraxinus  18.10
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 
45  virtual bool isNull();
46 
47 private:
48  void initServiceListener();
49  void onServiceAdded(StateService* service);
50  void onServiceRemoved(StateService *service);
51 
52  ctkPluginContext *mPluginContext;
53  StateServicePtr mService;
54  boost::shared_ptr<ServiceTrackerListener<StateService> > mServiceListener;
55 };
56 
57 }
58 
59 #endif // CXSTATESERVICEPROXY_H
boost::shared_ptr< class StateService > StateServicePtr
Workflow states for CustusX.
Data class for CustusX desktop.
Namespace for all CustusX production code.