35 #include <ctkPluginContext.h>
55 std::cout <<
"VisualizationImplService got no viewManager" << std::endl;
76 return viewManager()->
get3DView(group, index);
95 CX_LOG_DEBUG() <<
"About to destruct the visualizationservice and viewmanager, making sure timers are stopped.";
164 void VisualizationImplService::onSessionChanged()
167 void VisualizationImplService::onSessionCleared()
169 viewManager()->
clear();
171 void VisualizationImplService::onSessionLoad(QDomElement& node)
173 XMLNodeParser root(node);
174 QDomElement viewManagerNode = root.descend(
"managers/viewManager").node().toElement();
175 if (!viewManagerNode.isNull())
176 viewManager()->
parseXml(viewManagerNode);
178 void VisualizationImplService::onSessionSave(QDomElement& node)
180 XMLNodeAdder root(node);
181 QDomElement managerNode = root.descend(
"managers").node().toElement();
182 viewManager()->
addXml(managerNode);
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
virtual InteractiveCropperPtr getCropper()
void isLoading(QDomElement &root)
emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value...
void activeViewChanged()
emitted when the active view changes
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
virtual CyclicActionLoggerPtr getRenderTimer()
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
void fps(int number)
Emits number of frames per second.
boost::shared_ptr< class VisServices > VisServicesPtr
NavigationPtr getNavigation()
LayoutRepositoryPtr getLayoutRepository()
virtual bool renderingIsEnabled() const
virtual void autoShowData(DataPtr data)
void activeLayoutChanged()
emitted when the active layout changes
virtual void enableRender(bool val)
QActionGroup * createInteractorStyleActionGroup()
void fps(int number)
Emits number of frames per second.
static VisServicesPtr create(ctkPluginContext *context)
CameraControlPtr getCameraControl()
static VisualizationServiceOldPtr create(VisServicesPtr backend)
static SessionStorageServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
boost::shared_ptr< class View > ViewPtr
void autoShowData(DataPtr data)
boost::shared_ptr< class Navigation > NavigationPtr
virtual ViewGroupDataPtr getGroup(int groupIdx) const
VisualizationImplService(ctkPluginContext *context)
virtual void setActiveLayout(const QString &uid, int widgetIndex)
void sessionChanged()
emitted after change to a new session (new or loaded or cleared)
virtual QWidget * getLayoutWidget(QWidget *parent, int index)
virtual InteractiveClipperPtr getClipper()
void addXml(QDomNode &parentNode)
boost::shared_ptr< class Data > DataPtr
void parseXml(QDomNode viewmanagerNode)
QWidget * getLayoutWidget(QWidget *parent, int index)
virtual ViewPtr get3DView(int group=0, int index=0)
InteractiveClipperPtr getClipper()
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
virtual QActionGroup * createInteractorStyleActionGroup()
virtual NavigationPtr getNavigation()
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
InteractiveCropperPtr getCropper()
void setActiveLayout(const QString &uid, int widgetIndex=0)
change the layout
void cleared()
emitted when session is cleared, before isLoading is called
virtual int getActiveViewGroup() const
virtual QString getActiveLayout(int widgetIndex) const
boost::shared_ptr< class CameraControl > CameraControlPtr
void activeViewChanged()
emitted when the active view changes
void enableRender(bool val)
CyclicActionLoggerPtr getRenderTimer()
virtual LayoutRepositoryPtr getLayoutRepository()
bool renderingIsEnabled() const
virtual ViewGroupDataPtr getViewGroup(int groupIdx) const
void activeLayoutChanged()
emitted when the active layout changes
virtual ~VisualizationImplService()
virtual int getActiveGroupId() const
void isSaving(QDomElement &root)
xml storage is available
virtual CameraControlPtr getCameraControl()
virtual void aboutToStop()
ViewPtr get3DView(int group=0, int index=0)
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
QString getActiveLayout(int widgetIndex=0) const
returns the active layout