|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
14 #include <boost/bind.hpp>
15 #include <ctkPluginContext.h>
29 mPluginContext(pluginContext),
32 this->initServiceListener();
37 return mViewService->get3DView(group, index);
42 return mViewService->getActiveGroupId();
47 return mViewService->getGroup(groupIdx);
52 mViewService->setRegistrationMode(mode);
55 void ViewServiceProxy::initServiceListener()
59 boost::bind(&ViewServiceProxy::onServiceAdded,
this, _1),
61 boost::bind(&ViewServiceProxy::onServiceRemoved,
this, _1)
63 mServiceListener->open();
65 void ViewServiceProxy::onServiceAdded(ViewService* service)
67 mViewService.reset(service, null_deleter());
81 void ViewServiceProxy::onServiceRemoved(ViewService *service)
99 return mViewService->isNull();
104 mViewService->aboutToStop();
109 mViewService->autoShowData(data);
114 mViewService->enableRender(val);
119 return mViewService->renderingIsEnabled();
124 return mViewService->createLayoutWidget(parent, index);
129 return mViewService->getLayoutWidget(index);
134 return mViewService->getActiveLayout(widgetIndex);
139 mViewService->setActiveLayout(uid, widgetIndex);
144 return mViewService->getCropper();
149 return mViewService->getRenderTimer();
154 return mViewService->getNavigation();
159 return mViewService->getLayoutRepository();
164 return mViewService->getCameraControl();
169 return mViewService->getInteractorStyleActionGroup();
174 return mViewService->centerToImageCenterInActiveViewGroup();
179 mViewService->setCameraStyle(style, groupIdx);
184 mViewService->zoomCamera3D(viewGroup3DNumber, zoomFactor);
189 mViewService->addDefaultLayout(layoutData);
194 mViewService->enableContextMenuForViews(enable);
199 return mViewService->getClippers();
virtual QWidget * getLayoutWidget(int index)
Get the specified layout widget, NULL if not created.
virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
virtual void autoShowData(DataPtr data)
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
static ViewServicePtr create(ctkPluginContext *pluginContext)
virtual void enableContextMenuForViews(bool enable=true)
virtual ClippersPtr getClippers()
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
Namespace for all CustusX production code.
virtual InteractiveCropperPtr getCropper()
Helper class for listening to services being added, modified and removed.
virtual void setRegistrationMode(REGISTRATION_STATUS mode)
virtual bool renderingIsEnabled() const
virtual NavigationPtr getNavigation(int group=0)
virtual void enableRender(bool val)
virtual ViewPtr get3DView(int group=0, int index=0)
boost::shared_ptr< class Clippers > ClippersPtr
ViewServiceProxy(ctkPluginContext *pluginContext)
virtual void aboutToStop()
void activeLayoutChanged()
emitted when the active layout changes
virtual int getActiveGroupId() const
boost::shared_ptr< class Navigation > NavigationPtr
void fps(int number)
Emits number of frames per second.
virtual CameraControlPtr getCameraControl()
virtual void setActiveLayout(const QString &uid, int widgetIndex)
boost::shared_ptr< class Data > DataPtr
void activeViewChanged()
emitted when the active view changes
virtual void zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
virtual CyclicActionLoggerPtr getRenderTimer()
virtual QString getActiveLayout(int widgetIndex=0) const
static ViewServicePtr getNullObject()
virtual ViewGroupDataPtr getGroup(int groupIdx) const
boost::shared_ptr< class View > ViewPtr
virtual void addDefaultLayout(LayoutData layoutData)
virtual LayoutRepositoryPtr getLayoutRepository()
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
boost::shared_ptr< class CameraControl > CameraControlPtr
virtual void centerToImageCenterInActiveViewGroup()
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
virtual QActionGroup * getInteractorStyleActionGroup()
void pointSampled(Vector3D p_r)