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)
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();
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
virtual QWidget * getLayoutWidget(int index)
Get the specified layout widget, NULL if not created.
virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
boost::shared_ptr< class CameraControl > CameraControlPtr
virtual void setRegistrationMode(REGISTRATION_STATUS mode)
virtual CameraControlPtr getCameraControl()
ViewServiceProxy(ctkPluginContext *pluginContext)
virtual LayoutRepositoryPtr getLayoutRepository()
void fps(int number)
Emits number of frames per second.
virtual ViewGroupDataPtr getGroup(int groupIdx) const
virtual CyclicActionLoggerPtr getRenderTimer()
virtual void aboutToStop()
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
virtual InteractiveCropperPtr getCropper()
virtual int getActiveGroupId() const
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class Clippers > ClippersPtr
virtual void centerToImageCenterInActiveViewGroup()
virtual ClippersPtr getClippers()
void pointSampled(Vector3D p_r)
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
boost::shared_ptr< class Data > DataPtr
virtual QString getActiveLayout(int widgetIndex=0) const
virtual void enableRender(bool val)
virtual void autoShowData(DataPtr data)
virtual ViewPtr get3DView(int group=0, int index=0)
void activeViewChanged()
emitted when the active view changes
virtual void addDefaultLayout(LayoutData layoutData)
static ViewServicePtr getNullObject()
void activeLayoutChanged()
emitted when the active layout changes
Helper class for listening to services being added, modified and removed.
virtual QActionGroup * getInteractorStyleActionGroup()
virtual NavigationPtr getNavigation(int group=0)
virtual bool renderingIsEnabled() const
virtual void zoomCamera3D(int viewGroup3DNumber, int zoomFactor)
static ViewServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class Navigation > NavigationPtr
virtual void enableContextMenuForViews(bool enable=true)
virtual void setActiveLayout(const QString &uid, int widgetIndex)
Namespace for all CustusX production code.