35 #include <boost/bind.hpp>
36 #include <ctkPluginContext.h>
50 mPluginContext(pluginContext),
53 this->initServiceListener();
58 return mViewService->get3DView(group, index);
63 return mViewService->getActiveGroupId();
68 return mViewService->getGroup(groupIdx);
73 mViewService->setRegistrationMode(mode);
76 void ViewServiceProxy::initServiceListener()
80 boost::bind(&ViewServiceProxy::onServiceAdded,
this, _1),
82 boost::bind(&ViewServiceProxy::onServiceRemoved,
this, _1)
84 mServiceListener->open();
86 void ViewServiceProxy::onServiceAdded(ViewService* service)
88 mViewService.reset(service, null_deleter());
102 void ViewServiceProxy::onServiceRemoved(ViewService *service)
120 return mViewService->isNull();
125 mViewService->aboutToStop();
130 mViewService->autoShowData(data);
135 mViewService->enableRender(val);
140 return mViewService->renderingIsEnabled();
145 return mViewService->createLayoutWidget(parent, index);
150 return mViewService->getLayoutWidget(index);
155 return mViewService->getActiveLayout(widgetIndex);
160 mViewService->setActiveLayout(uid, widgetIndex);
165 return mViewService->getCropper();
170 return mViewService->getRenderTimer();
175 return mViewService->getNavigation();
180 return mViewService->getLayoutRepository();
185 return mViewService->getCameraControl();
190 return mViewService->getInteractorStyleActionGroup();
195 return mViewService->centerToImageCenterInActiveViewGroup();
200 mViewService->setCameraStyle(style, groupIdx);
205 mViewService->addDefaultLayout(layoutData);
210 return mViewService->getClippers();
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)
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
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()
virtual InteractiveCropperPtr getCropper()
virtual int getActiveGroupId() const
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class Navigation > NavigationPtr
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)
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
virtual void autoShowData(DataPtr data)
virtual ViewPtr get3DView(int group=0, int index=0)
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
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()
boost::shared_ptr< class CameraControl > CameraControlPtr
virtual NavigationPtr getNavigation()
virtual bool renderingIsEnabled() const
static ViewServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class Clippers > ClippersPtr
virtual void setActiveLayout(const QString &uid, int widgetIndex)