35 #include <boost/bind.hpp>
36 #include <ctkPluginContext.h>
50 mPluginContext(pluginContext),
53 this->initServiceListener();
58 return mVisualizationService->get3DView(group, index);
63 return mVisualizationService->getActiveGroup();
68 return mVisualizationService->getGroup(groupIdx);
71 void VisualizationServiceProxy::initServiceListener()
75 boost::bind(&VisualizationServiceProxy::onServiceAdded,
this, _1),
77 boost::bind(&VisualizationServiceProxy::onServiceRemoved,
this, _1)
79 mServiceListener->open();
81 void VisualizationServiceProxy::onServiceAdded(VisualizationService* service)
83 mVisualizationService.reset(service, null_deleter());
95 void VisualizationServiceProxy::onServiceRemoved(VisualizationService *service)
111 return mVisualizationService->isNull();
116 mVisualizationService->aboutToStop();
121 mVisualizationService->autoShowData(data);
126 mVisualizationService->enableRender(val);
131 return mVisualizationService->renderingIsEnabled();
136 return mVisualizationService->getLayoutWidget(parent, index);
141 return mVisualizationService->getActiveLayout(widgetIndex);
146 mVisualizationService->setActiveLayout(uid, widgetIndex);
151 return mVisualizationService->getClipper();
156 return mVisualizationService->getCropper();
161 return mVisualizationService->getRenderTimer();
166 return mVisualizationService->getNavigation();
171 return mVisualizationService->getLayoutRepository();
176 return mVisualizationService->getCameraControl();
181 return mVisualizationService->createInteractorStyleActionGroup();
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
virtual CyclicActionLoggerPtr getRenderTimer()
virtual void autoShowData(DataPtr data)
virtual void enableRender(bool val)
VisualizationServiceProxy(ctkPluginContext *pluginContext)
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
void activeLayoutChanged()
emitted when the active layout changes
virtual LayoutRepositoryPtr getLayoutRepository()
void fps(int number)
Emits number of frames per second.
virtual QActionGroup * createInteractorStyleActionGroup()
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
virtual InteractiveClipperPtr getClipper()
static VisualizationServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class Navigation > NavigationPtr
boost::shared_ptr< class Data > DataPtr
virtual NavigationPtr getNavigation()
virtual void setActiveLayout(const QString &uid, int widgetIndex)
static VisualizationServicePtr getNullObject()
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
virtual InteractiveCropperPtr getCropper()
virtual ViewGroupDataPtr getGroup(int groupIdx) const
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
virtual void aboutToStop()
virtual QWidget * getLayoutWidget(QWidget *parent, int index)
virtual int getActiveGroup() const
Helper class for listening to services being added, modified and removed.
boost::shared_ptr< class CameraControl > CameraControlPtr
void activeViewChanged()
emitted when the active view changes
virtual QString getActiveLayout(int widgetIndex=0) const
virtual bool renderingIsEnabled() const
virtual ViewPtr get3DView(int group=0, int index=0)
virtual CameraControlPtr getCameraControl()