Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxViewServiceProxy.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 CXVIEWSERVICEPROXY_H_
13 #define CXVIEWSERVICEPROXY_H_
14 
15 #include "cxResourceVisualizationExport.h"
16 
17 #include "cxViewService.h"
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 
24 class cxResourceVisualization_EXPORT ViewServiceProxy : public ViewService
25 {
26 public:
27  static ViewServicePtr create(ctkPluginContext *pluginContext);
28  ViewServiceProxy(ctkPluginContext *pluginContext);
29 
30  virtual ViewPtr get3DView(int group = 0, int index = 0);
31 
32  virtual int getActiveGroupId() const;
33  virtual ViewGroupDataPtr getGroup(int groupIdx) const;
34  virtual void setRegistrationMode(REGISTRATION_STATUS mode);
35 
36  virtual void autoShowData(DataPtr data);
37  virtual void enableRender(bool val);
38  virtual bool renderingIsEnabled() const;
39 
40  virtual QWidget* createLayoutWidget(QWidget* parent, int index);
41  virtual QWidget* getLayoutWidget(int index);
42  virtual QString getActiveLayout(int widgetIndex=0) const;
43  virtual void setActiveLayout(const QString& uid, int widgetIndex);
44  virtual ClippersPtr getClippers();
45  virtual InteractiveCropperPtr getCropper();
46  virtual CyclicActionLoggerPtr getRenderTimer();
47  virtual NavigationPtr getNavigation(int group = 0);
48  virtual LayoutRepositoryPtr getLayoutRepository();
49  virtual CameraControlPtr getCameraControl();
50  virtual QActionGroup* getInteractorStyleActionGroup();
51  virtual void centerToImageCenterInActiveViewGroup();
52  virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx);
53  virtual void zoomCamera3D(int viewGroup3DNumber, int zoomFactor);
54  virtual void addDefaultLayout(LayoutData layoutData);
55  virtual void enableContextMenuForViews(bool enable=true);
56 
57  bool isNull();
58 
59 public slots:
60  virtual void aboutToStop();
61 
62 private:
63  void initServiceListener();
64  void onServiceAdded(ViewService* service);
65  void onServiceRemoved(ViewService *service);
66 
67  ctkPluginContext *mPluginContext;
68  ViewServicePtr mViewService;
69  boost::shared_ptr<ServiceTrackerListener<ViewService> > mServiceListener;
70 };
71 } //cx
72 #endif // CXVIEWSERVICEPROXY_H_
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
Definition: cxViewGroup.h:29
Visualization services.
Definition: cxViewService.h:50
boost::shared_ptr< class CameraControl > CameraControlPtr
boost::shared_ptr< class ViewService > ViewServicePtr
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class Clippers > ClippersPtr
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< class Navigation > NavigationPtr
Namespace for all CustusX production code.