Fraxinus  17.12
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) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 
33 #include "cxViewServiceNull.h"
34 
35 #include <QActionGroup>
36 #include <QDomNode>
37 #include "cxLogger.h"
38 
39 namespace cx
40 {
42 {
43  mActionGroup = new QActionGroup(this);
44 }
45 
46 ViewPtr ViewServiceNull::get3DView(int group, int index)
47 {
48  printWarning();
49  return ViewPtr();
50 }
51 
53 {
54  printWarning();
55  return -1;
56 }
57 
59 {
60  printWarning();
61  return ViewGroupDataPtr();
62 }
63 
64 void ViewServiceNull::setRegistrationMode(REGISTRATION_STATUS mode)
65 {
66  printWarning();
67 }
69 {
70  return true;
71 }
72 
73 void ViewServiceNull::printWarning() const
74 {
75  CX_LOG_WARNING() <<"Trying to use VideoServiceNull. Is VideoService (org.custusx.core.view) disabled?";
76 }
77 
79 {
80  printWarning();
81 }
82 
84 {
85 
86 }
87 
89 {
90  return false;
91 }
92 
93 QWidget* ViewServiceNull::createLayoutWidget(QWidget *parent, int index) { return NULL; }
94 QWidget* ViewServiceNull::getLayoutWidget(int index) { return NULL; }
95 QString ViewServiceNull::getActiveLayout(int widgetIndex) const { return ""; }
96 void ViewServiceNull::setActiveLayout(const QString& uid, int widgetIndex) {}
102 QActionGroup* ViewServiceNull::getInteractorStyleActionGroup() { return mActionGroup; }
103 
105 {
106  printWarning();
107 }
108 
109 void ViewServiceNull::setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
110 {
111  printWarning();
112 }
113 
114 void ViewServiceNull::zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
115 {
116  printWarning();
117 }
118 
120 {
121  printWarning();
122 }
123 
125 {
126  printWarning();
127 }
128 
130 {
131  return ClippersPtr();
132 }
133 
134 } //cx
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
Definition: cxViewGroup.h:50
virtual QActionGroup * getInteractorStyleActionGroup()
boost::shared_ptr< class CameraControl > CameraControlPtr
virtual bool renderingIsEnabled() const
virtual void enableRender(bool val)
virtual void addDefaultLayout(LayoutData layoutData)
virtual ViewGroupDataPtr getGroup(int groupIdx) const
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
virtual void enableContextMenuForViews(bool enable=true)
virtual int getActiveGroupId() const
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
boost::shared_ptr< class View > ViewPtr
virtual void zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
boost::shared_ptr< class Clippers > ClippersPtr
boost::shared_ptr< class Data > DataPtr
virtual InteractiveCropperPtr getCropper()
virtual void setActiveLayout(const QString &uid, int widgetIndex)
virtual ViewPtr get3DView(int group=0, int index=0)
virtual QString getActiveLayout(int widgetIndex) const
virtual QWidget * getLayoutWidget(int index)
Get the specified layout widget, NULL if not created.
virtual CameraControlPtr getCameraControl()
virtual void centerToImageCenterInActiveViewGroup()
virtual CyclicActionLoggerPtr getRenderTimer()
virtual ClippersPtr getClippers()
virtual void autoShowData(DataPtr data)
#define CX_LOG_WARNING
Definition: cxLogger.h:119
virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
virtual LayoutRepositoryPtr getLayoutRepository()
boost::shared_ptr< class Navigation > NavigationPtr
virtual NavigationPtr getNavigation(int group=0)
virtual void setRegistrationMode(REGISTRATION_STATUS mode)
Namespace for all CustusX production code.