NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxViewServiceNull.cpp
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 #include "cxViewServiceNull.h"
13 
14 #include <QActionGroup>
15 #include <QDomNode>
16 #include "cxLogger.h"
17 
18 namespace cx
19 {
21 {
22  mActionGroup = new QActionGroup(this);
23 }
24 
25 ViewPtr ViewServiceNull::get3DView(int group, int index)
26 {
27  printWarning();
28  return ViewPtr();
29 }
30 
32 {
33  printWarning();
34  return -1;
35 }
36 
38 {
39  printWarning();
40  return ViewGroupDataPtr();
41 }
42 
43 void ViewServiceNull::setRegistrationMode(REGISTRATION_STATUS mode)
44 {
45  printWarning();
46 }
48 {
49  return true;
50 }
51 
52 void ViewServiceNull::printWarning() const
53 {
54  CX_LOG_WARNING() <<"Trying to use VideoServiceNull. Is VideoService (org.custusx.core.view) disabled?";
55 }
56 
58 {
59  printWarning();
60 }
61 
63 {
64 
65 }
66 
68 {
69  return false;
70 }
71 
72 QWidget* ViewServiceNull::createLayoutWidget(QWidget *parent, int index) { return NULL; }
73 QWidget* ViewServiceNull::getLayoutWidget(int index) { return NULL; }
74 QString ViewServiceNull::getActiveLayout(int widgetIndex) const { return ""; }
75 void ViewServiceNull::setActiveLayout(const QString& uid, int widgetIndex) {}
81 QActionGroup* ViewServiceNull::getInteractorStyleActionGroup() { return mActionGroup; }
82 
84 {
85  printWarning();
86 }
87 
88 void ViewServiceNull::setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
89 {
90  printWarning();
91 }
92 
93 void ViewServiceNull::zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
94 {
95  printWarning();
96 }
97 
99 {
100  printWarning();
101 }
102 
104 {
105  printWarning();
106 }
107 
109 {
110  return ClippersPtr();
111 }
112 
113 } //cx
cx::ViewServiceNull::getClippers
virtual ClippersPtr getClippers()
Definition: cxViewServiceNull.cpp:108
cx::ViewServiceNull::setRegistrationMode
virtual void setRegistrationMode(REGISTRATION_STATUS mode)
Definition: cxViewServiceNull.cpp:43
cx::ViewServiceNull::getLayoutWidget
virtual QWidget * getLayoutWidget(int index)
Get the specified layout widget, NULL if not created.
Definition: cxViewServiceNull.cpp:73
cxLogger.h
cx::ViewGroupDataPtr
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
Definition: cxViewGroup.h:29
cx::ViewServiceNull::enableContextMenuForViews
virtual void enableContextMenuForViews(bool enable=true)
Definition: cxViewServiceNull.cpp:103
cx::ViewServiceNull::getNavigation
virtual NavigationPtr getNavigation(int group=0)
Definition: cxViewServiceNull.cpp:78
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ViewServiceNull::get3DView
virtual ViewPtr get3DView(int group=0, int index=0)
Definition: cxViewServiceNull.cpp:25
cx::ViewServiceNull::addDefaultLayout
virtual void addDefaultLayout(LayoutData layoutData)
Definition: cxViewServiceNull.cpp:98
cx::ClippersPtr
boost::shared_ptr< class Clippers > ClippersPtr
Definition: cxForwardDeclarations.h:153
cx::ViewServiceNull::getGroup
virtual ViewGroupDataPtr getGroup(int groupIdx) const
Definition: cxViewServiceNull.cpp:37
cx::ViewServiceNull::createLayoutWidget
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
Definition: cxViewServiceNull.cpp:72
cx::LayoutData
Definition: cxLayoutData.h:76
cx::NavigationPtr
boost::shared_ptr< class Navigation > NavigationPtr
Definition: cxForwardDeclarations.h:160
cx::ViewServiceNull::enableRender
virtual void enableRender(bool val)
Definition: cxViewServiceNull.cpp:62
cx::ViewServiceNull::getActiveGroupId
virtual int getActiveGroupId() const
Definition: cxViewServiceNull.cpp:31
cx::ViewServiceNull::getCropper
virtual InteractiveCropperPtr getCropper()
Definition: cxViewServiceNull.cpp:76
cx::ViewServiceNull::setActiveLayout
virtual void setActiveLayout(const QString &uid, int widgetIndex)
Definition: cxViewServiceNull.cpp:75
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::ViewServiceNull::ViewServiceNull
ViewServiceNull()
Definition: cxViewServiceNull.cpp:20
cx::ViewServiceNull::getLayoutRepository
virtual LayoutRepositoryPtr getLayoutRepository()
Definition: cxViewServiceNull.cpp:79
cx::ViewServiceNull::getRenderTimer
virtual CyclicActionLoggerPtr getRenderTimer()
Definition: cxViewServiceNull.cpp:77
cx::ViewServiceNull::isNull
virtual bool isNull()
Definition: cxViewServiceNull.cpp:47
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::ViewServiceNull::centerToImageCenterInActiveViewGroup
virtual void centerToImageCenterInActiveViewGroup()
Definition: cxViewServiceNull.cpp:83
cx::CyclicActionLoggerPtr
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
Definition: cxForwardDeclarations.h:154
cx::ViewServiceNull::autoShowData
virtual void autoShowData(DataPtr data)
Definition: cxViewServiceNull.cpp:57
cx::LayoutRepositoryPtr
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
Definition: cxForwardDeclarations.h:159
cx::ViewServiceNull::getActiveLayout
virtual QString getActiveLayout(int widgetIndex) const
Definition: cxViewServiceNull.cpp:74
cx::CameraControlPtr
boost::shared_ptr< class CameraControl > CameraControlPtr
Definition: cxForwardDeclarations.h:152
cxViewServiceNull.h
CX_LOG_WARNING
#define CX_LOG_WARNING
Definition: cxLogger.h:98
cx::InteractiveCropperPtr
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
Definition: cxForwardDeclarations.h:158
cx::ViewServiceNull::renderingIsEnabled
virtual bool renderingIsEnabled() const
Definition: cxViewServiceNull.cpp:67
cx::ViewServiceNull::getInteractorStyleActionGroup
virtual QActionGroup * getInteractorStyleActionGroup()
Definition: cxViewServiceNull.cpp:81
cx::ViewServiceNull::getCameraControl
virtual CameraControlPtr getCameraControl()
Definition: cxViewServiceNull.cpp:80
cx::ViewServiceNull::zoomCamera3D
virtual void zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
Definition: cxViewServiceNull.cpp:93
cx::ViewServiceNull::setCameraStyle
virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
Definition: cxViewServiceNull.cpp:88