CustusX  15.3.3-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxViewManager.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 
33 #include "cxViewManager.h"
34 
35 #include <QGridLayout>
36 #include <QWidget>
37 #include <QTime>
38 #include <QAction>
39 #include <QtCore>
40 #include <qtextstream.h>
41 #include <vtkRenderWindow.h>
42 #include <vtkRenderWindowInteractor.h>
43 #include <vtkImageData.h>
44 #include "cxViewWrapper2D.h"
45 #include "vtkRenderer.h"
46 #include "vtkRenderWindow.h"
47 #include "cxLayoutData.h"
48 #include "boost/bind.hpp"
49 
50 #include "cxVolumetricRep.h"
51 #include "cxLogger.h"
52 #include "cxXmlOptionItem.h"
53 #include "cxTrackingService.h"
54 #include "cxSlicePlanes3DRep.h"
55 #include "cxSliceProxy.h"
56 #include "cxViewGroup.h"
57 #include "cxViewWrapper.h"
58 #include "cxViewWrapper2D.h"
59 #include "cxViewWrapper3D.h"
60 #include "cxViewWrapperVideo.h"
61 #include "cxSettings.h"
62 #include "cxProfile.h"
63 #include "cxInteractiveCropper.h"
64 #include "vtkForwardDeclarations.h"
65 #include "cxInteractiveClipper.h"
66 #include "cxImage.h"
67 #include "cxCameraStyle.h"
68 #include "cxCyclicActionLogger.h"
69 #include "cxViewCollectionWidget.h"
70 #include "cxRenderLoop.h"
71 #include "cxLayoutRepository.h"
72 
73 #include "cxCoreServices.h"
74 #include "cxXMLNodeWrapper.h"
75 #include "cxCameraControl.h"
76 #include "cxNavigation.h"
77 #include "cxPatientModelService.h"
78 
79 
80 namespace cx
81 {
82 
84 {
86  retval.reset(new ViewManager(backend));
87  return retval;
88 }
89 
90 ViewManager::ViewManager(/*PatientModelServicePtr patientModelService, */CoreServicesPtr backend) :
91  mGlobalObliqueOrientation(false)
92 {
93  mBackend = backend;
94  mRenderLoop.reset(new RenderLoop());
95  connect(mRenderLoop.get(), SIGNAL(preRender()), this, SLOT(updateViews()));
96  connect(mRenderLoop.get(), SIGNAL(fps(int)), this, SIGNAL(fps(int)));
97 
100  mCameraControl.reset(new CameraControl());
101 
102  mRenderLoop->setLogging(settings()->value("renderSpeedLogging").toBool());
103  mRenderLoop->setSmartRender(settings()->value("smartRender", true).toBool());
104  connect(settings(), SIGNAL(valueChangedFor(QString)), this, SLOT(settingsChangedSlot(QString)));
105 
106  const unsigned VIEW_GROUP_COUNT = 5; // set this to enough
107  // initialize view groups:
108  for (unsigned i = 0; i < VIEW_GROUP_COUNT; ++i)
109  {
110  ViewGroupPtr group(new ViewGroup(mBackend));
111  mViewGroups.push_back(group);
112  }
113 
114  // moved here from initialize() ... ensures object is fully callable after construction
116 
117  mActiveLayout = QStringList() << "" << "";
118  mLayoutWidgets.resize(mActiveLayout.size(), NULL);
119 
120  mInteractiveCropper.reset(new InteractiveCropper(mBackend/*patientModelService*/));
122  connect(this, SIGNAL(activeLayoutChanged()), mInteractiveClipper.get(), SIGNAL(changed()));
123  connect(mInteractiveCropper.get(), SIGNAL(changed()), mRenderLoop.get(), SLOT(requestPreRenderSignal()));
124  connect(mInteractiveClipper.get(), SIGNAL(changed()), mRenderLoop.get(), SLOT(requestPreRenderSignal()));
125  connect(this, SIGNAL(activeViewChanged()), this, SLOT(updateCameraStyleActions()));
126 
127  this->loadGlobalSettings();
128  // connect to layoutrepo after load of global
130  this->initializeGlobal2DZoom();
131  this->initializeActiveView();
133 
134  // set start layout
135  this->setActiveLayout("LAYOUT_3D_ACS_SINGLE", 0);
136 
137  mRenderLoop->setRenderingInterval(settings()->value("renderingInterval").toInt());
138  this->enableRender(true);
139 }
140 
142 {
143 }
144 
146 {
147  if (val)
148  mRenderLoop->start();
149  else
150  mRenderLoop->stop();
151 
153 }
154 
156 {
157  return mRenderLoop->isRunning();
158 }
159 
160 
162 {
164 
165  for (unsigned i = 0; i < mViewGroups.size(); ++i)
166  mViewGroups[i]->getData()->initializeGlobal2DZoom(mGlobal2DZoomVal);
167 }
168 
170 {
172  connect(mActiveView.get(), SIGNAL(changed()), this, SIGNAL(activeViewChanged()));
173 
174  for (unsigned i = 0; i < mViewGroups.size(); ++i)
176 }
177 
178 
179 
181 {
183 }
184 
185 QWidget *ViewManager::getLayoutWidget(QWidget* parent, int index)
186 {
187  CX_ASSERT(index < mLayoutWidgets.size());
188  if (!mLayoutWidgets[index])
189  {
190  bool optimizedViews = settings()->value("optimizedViews").toBool();
191 
192  if (optimizedViews)
193  {
194 // report("creating optimized wiew layout");
196  }
197  else
198  {
199 // report("creating classic wiew layout");
201  }
202 
203  connect(mLayoutWidgets[index].data(), &QObject::destroyed, this, &ViewManager::layoutWidgetDestroyed);
204  mRenderLoop->addLayout(mLayoutWidgets[index]);
205 
206  this->rebuildLayouts();
207  }
208  return mLayoutWidgets[index];
209 }
210 
218 {
219  ViewCollectionWidget* widget = dynamic_cast<ViewCollectionWidget*>(object);
220  for (unsigned i=0; i<mLayoutWidgets.size(); ++i)
221  {
222  if (mLayoutWidgets[i] == object)
223  mLayoutWidgets[i] = NULL;
224  }
225 
226  for (unsigned i = 0; i < mViewGroups.size(); ++i)
227  {
228  mViewGroups[i]->removeViews();
229  }
230 
231  this->setActiveView("");
232  mSlicePlanesProxy->clearViewports();
233 
234  QString uid = this->getActiveLayout();
235  mActiveLayout[0] = ""; // hack: force trigger a change
236  this->setActiveLayout(uid, 0);
237 }
238 
240 {
241  for(unsigned i=0; i<mViewGroups.size(); ++i)
242  {
243  ViewGroupPtr group = mViewGroups[i];
244  for (unsigned j=0; j<group->getWrappers().size(); ++j)
245  group->getWrappers()[j]->updateView();
246  }
247 }
248 
250 {
251  if (key == "smartRender")
252  {
253  mRenderLoop->setSmartRender(settings()->value("smartRender", true).toBool());
254  }
255  if (key == "renderingInterval")
256  {
257  mRenderLoop->setRenderingInterval(settings()->value("renderingInterval").toInt());
258  }
259  if (key == "renderSpeedLogging")
260  {
261  mRenderLoop->setLogging(settings()->value("renderSpeedLogging").toBool());
262  }
263 }
264 
266 {
267  return mInteractiveClipper;
268 }
269 
271 {
272  return mInteractiveCropper;
273 }
274 
275 QString ViewManager::getActiveLayout(int widgetIndex) const
276 {
277  CX_ASSERT(mActiveLayout.size() > widgetIndex);
278  return mActiveLayout[widgetIndex];
279 }
280 
282 {
283  return mActiveView->get().value<QString>();
284 }
285 
286 void ViewManager::setActiveView(QString uid)
287 {
288  mActiveView->set(uid);
289 }
290 
292 {
293  int retval = -1;
294  QString activeView = mActiveView->value<QString>();
295 
296  for (unsigned i = 0; i < mViewGroups.size(); ++i)
297  {
298  ViewWrapperPtr viewWrapper = mViewGroups[i]->getViewWrapperFromViewUid(activeView);
299  if (viewWrapper)
300  retval = i;
301  }
302 
303  return retval;
304 }
305 
307 {
308  for (unsigned i = 0; i < mViewGroups.size(); ++i)
309  {
310  mViewGroups[i]->syncOrientationMode(val);
311  }
312 }
313 
314 void ViewManager::addXml(QDomNode& parentNode)
315 {
316  XMLNodeAdder parent(parentNode);
317  XMLNodeAdder base(parent.addElement("viewManager"));
318 
319  base.addTextToElement("global2DZoom", qstring_cast(mGlobal2DZoomVal->get().toDouble()));
320  base.addTextToElement("activeView", mActiveView->value<QString>());
321 
322  QDomElement slicePlanes3DNode = base.addElement("slicePlanes3D");
323  slicePlanes3DNode.setAttribute("use", mSlicePlanesProxy->getVisible());
324  slicePlanes3DNode.setAttribute("opaque", mSlicePlanesProxy->getDrawPlanes());
325 
326  XMLNodeAdder viewGroupsNode(base.addElement("viewGroups"));
327  for (unsigned i = 0; i < mViewGroups.size(); ++i)
328  {
329  QDomElement viewGroupNode = viewGroupsNode.addElement("viewGroup");
330  viewGroupNode.setAttribute("index", i);
331  mViewGroups[i]->addXml(viewGroupNode);
332  }
333 
335  {
336  QString clippedImage = (mInteractiveClipper->getImage()) ? mInteractiveClipper->getImage()->getUid() : "";
337  base.addTextToElement("clippedImage", clippedImage);
338  }
339 }
340 
341 void ViewManager::parseXml(QDomNode viewmanagerNode)
342 {
343  XMLNodeParser base(viewmanagerNode);
344 
345  QString clippedImage = base.parseTextFromElement("clippedImage");
346  mInteractiveClipper->setImage(mBackend->getPatientService()->getData<Image>(clippedImage));
347 
348  base.parseDoubleFromElementWithDefault("global2DZoom", mGlobal2DZoomVal->get().toDouble());
349 
350  QDomElement slicePlanes3DNode = base.parseElement("slicePlanes3D");
351  mSlicePlanesProxy->setVisible(slicePlanes3DNode.attribute("use").toInt());
352  mSlicePlanesProxy->setDrawPlanes(slicePlanes3DNode.attribute("opaque").toInt());
353 
354  QDomElement viewgroups = base.parseElement("viewGroups");
355  QDomNode viewgroup = viewgroups.firstChild();
356  while (!viewgroup.isNull())
357  {
358  if (viewgroup.toElement().tagName() != "viewGroup")
359  {
360  viewgroup = viewgroup.nextSibling();
361  continue;
362  }
363  int index = viewgroup.toElement().attribute("index").toInt();
364 
365  if (index < 0 || index >= int(mViewGroups.size()))
366  {
367  viewgroup = viewgroup.nextSibling();
368  continue;
369  }
370 
371  mViewGroups[index]->parseXml(viewgroup);
372 
373  viewgroup = viewgroup.nextSibling();
374  }
375 
376  this->setActiveView(base.parseTextFromElement("activeView"));
377 }
378 
380 {
381  for (unsigned i = 0; i < mViewGroups.size(); ++i)
382  {
383  mViewGroups[i]->clearPatientData();
384  }
385 }
386 
389 ViewPtr ViewManager::get3DView(int group, int index)
390 {
391  int count = 0;
392  std::vector<ViewPtr> views = mViewGroups[group]->getViews();
393  for (unsigned i = 0; i < views.size(); ++i)
394  {
395  if(!views[i])
396  continue;
397  if (views[i]->getType()!=View::VIEW_3D)
398  continue;
399  if (index == count++)
400  return views[i];
401  }
402  return ViewPtr();
403 }
404 
405 
409 {
410  for (unsigned i=0; i<mLayoutWidgets.size(); ++i)
411  {
412  if (mLayoutWidgets[i])
413  mLayoutWidgets[i]->clearViews();
414  }
415 
416  for (unsigned i = 0; i < mViewGroups.size(); ++i)
417  {
418  mViewGroups[i]->removeViews();
419  }
420 
421  this->setActiveView("");
422  mSlicePlanesProxy->clearViewports();
423 }
424 
426 {
427  if (( groupIdx>=0 )&&( groupIdx < mViewGroups.size() ))
428  return mViewGroups[groupIdx]->getData();
429  return ViewGroupDataPtr();
430 }
431 
434 void ViewManager::setActiveLayout(const QString& layout, int widgetIndex)
435 {
436  CX_ASSERT(mActiveLayout.size() > widgetIndex);
437 
438  if (mActiveLayout[widgetIndex] == layout)
439  return;
440 
441  mActiveLayout[widgetIndex] = layout;
442 
443  this->rebuildLayouts();
444 
445  if (!mViewGroups[0]->getViews().empty())
446  this->setActiveView(mViewGroups[0]->getViews()[0]->getUid());
447 
448  emit activeLayoutChanged();
449 
450  QString layoutName = mLayoutRepository->get(layout).getName();
451  report(QString("Layout %1 changed to %2").arg(widgetIndex).arg(layoutName));
452 }
453 
455 {
456  this->deactivateCurrentLayout();
457 
458  for (unsigned i=0; i<mLayoutWidgets.size(); ++i)
459  {
461  if (mLayoutWidgets[i] && !next.getUid().isEmpty())
462  this->activateViews(mLayoutWidgets[i], next);
463  }
464 
466  mCameraControl->setView(this->get3DView());
467 }
468 
470 {
471  // Set the same proxy in all wrappers, but stop adding after the
472  // first group with 2D views are found.
473  // This works well _provided_ that the 3D view is in the first group.
474  for (unsigned i = 0; i < mViewGroups.size(); ++i)
475  {
476  bool foundSlice = false;
477  std::vector<ViewWrapperPtr> wrappers = mViewGroups[i]->getWrappers();
478  for (unsigned j = 0; j < wrappers.size(); ++j)
479  {
480  wrappers[j]->setSlicePlanesProxy(mSlicePlanesProxy);
481  foundSlice = foundSlice || wrappers[j]->getView()->getType() == View::VIEW_2D;
482  }
483  if (foundSlice)
484  break;
485  }
486 }
488 {
489  if (!widget)
490  return;
491 
492  for (LayoutData::iterator iter = next.begin(); iter != next.end(); ++iter)
493  this->activateView(widget, *iter);
494 }
495 
497 {
498  mRenderLoop->setRenderingInterval(interval);
499 }
500 
502 {
503  if (!viewData.isValid())
504  return;
505 
506  ViewPtr view = widget->addView(viewData.mType, viewData.mRegion);
507 
508  vtkRenderWindowInteractorPtr interactor = view->getRenderWindow()->GetInteractor();
509  //Turn off rendering in vtkRenderWindowInteractor
510  interactor->EnableRenderOff();
511  //Increase the StillUpdateRate in the vtkRenderWindowInteractor (default is 0.0001 images per second)
512  double rate = settings()->value("stillUpdateRate").value<double>();
513  interactor->SetStillUpdateRate(rate);
514  // Set the same value when moving (seems counterintuitive, but for us, moving isnt really special.
515  // The real challenge is updating while the tracking is active, and this uses the still update rate.
516  interactor->SetDesiredUpdateRate(rate);
517 
518 // mRenderLoop->addView(view);
519  ViewWrapperPtr wrapper = this->createViewWrapper(view, viewData);
520  mViewGroups[viewData.mGroup]->addView(wrapper);
521 // widget->showViews();
522 }
523 
525 {
526  if (viewData.mType == View::VIEW_2D)
527  {
528  ViewWrapper2DPtr wrapper(new ViewWrapper2D(view, mBackend));
529  wrapper->initializePlane(viewData.mPlane);
530  return wrapper;
531  }
532  else if (viewData.mType == View::VIEW_3D)
533  {
534 
535  ViewWrapper3DPtr wrapper(new ViewWrapper3D(viewData.mGroup + 1, view, mBackend));
536  if (viewData.mGroup == 0)
537  mInteractiveCropper->setView(view);
538  return wrapper;
539  }
540  else if (viewData.mType == View::VIEW_REAL_TIME)
541  {
542  ViewWrapperVideoPtr wrapper(new ViewWrapperVideo(view, mBackend));
543  return wrapper;
544  }
545  else
546  {
547  reportError(QString("Unknown view type %1").arg(qstring_cast(viewData.mType)));
548  }
549 
550  return ViewWrapperPtr();
551 }
552 
554 {
555  return mLayoutRepository;
556 }
557 
559 {
560  this->saveGlobalSettings();
561 
562  bool activeChange = mActiveLayout[0] == uid;
563  if (activeChange)
564  {
565  mActiveLayout[0] = ""; // hack: force trigger a change
566  this->setActiveLayout(uid, 0);
567  }
568 }
569 
571 {
572  XmlOptionFile file = profile()->getXmlSettings().descend("viewmanager");
573  mLayoutRepository->load(file);
574 }
575 
577 {
578  XmlOptionFile file = profile()->getXmlSettings().descend("viewmanager");
579  mLayoutRepository->save(file);
580  file.save();
581 }
582 
584 {
585  return mCameraStyleInteractor->createInteractorStyleActionGroup();
586 }
587 
589 {
590  int active = this->getActiveViewGroup();
591  int index = this->findGroupContaining3DViewGivenGuess(active);
592 
593  if (index<0)
594  {
595  mCameraStyleInteractor->connectCameraStyle(CameraStylePtr());
596  }
597  else
598  {
599  ViewGroupPtr group = this->getViewGroups()[index];
600  mCameraStyleInteractor->connectCameraStyle(group->getCameraStyle());
601  mCameraControl->setView(this->get3DView(index, 0));
602  }
603 
604 }
605 
609 {
610  if (preferredGroup>=0)
611  if (mViewGroups[preferredGroup]->contains3DView())
612  return preferredGroup;
613 
614  for (unsigned i=0; i<mViewGroups.size(); ++i)
615  if (mViewGroups[i]->contains3DView())
616  return i;
617  return -1;
618 }
619 
620 
622 {
623  if (settings()->value("Automation/autoShowNewData").toBool())
624  {
625  this->getViewGroups()[0]->getData()->addDataSorted(data->getUid());
626  }
627 }
628 
630 {
631  return mRenderLoop->getRenderTimer();
632 }
633 
634 } //namespace cx
static QPointer< ViewCollectionWidget > createViewWidgetLayout(QWidget *parent=NULL)
std::vector< ViewGroupPtr > getViewGroups()
QString qstring_cast(const T &val)
double parseDoubleFromElementWithDefault(QString name, double defaultValue)
static VisualizationServiceOldPtr create(CoreServicesPtr backend)
std::vector< QPointer< ViewCollectionWidget > > mLayoutWidgets
int mGroup
what group to connect to. -1 means not set.
Definition: cxLayoutData.h:84
cxResource_EXPORT ProfilePtr profile()
Definition: cxProfile.cpp:142
SlicePlanesProxyPtr mSlicePlanesProxy
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
Definition: cxViewGroup.h:50
void setSlicePlanesProxyInViewsUpTo2DViewgroup()
void reportError(QString msg)
Definition: cxLogger.cpp:92
void activeViewChanged()
emitted when the active view changes
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
ViewDataContainer::iterator iterator
Definition: cxLayoutData.h:101
#define CX_ASSERT(statement)
Definition: cxLogger.h:128
void fps(int number)
Emits number of frames per second.
void deactivateCurrentLayout()
deactivate the current layout, leaving an empty layout
NavigationPtr getNavigation()
LayoutRepositoryPtr getLayoutRepository()
QDomElement addElement(QString name)
boost::shared_ptr< class CameraStyle > CameraStylePtr
Definition: cxCameraStyle.h:57
void setRenderingInterval(int interval)
vtkSmartPointer< class vtkRenderWindowInteractor > vtkRenderWindowInteractorPtr
QActionGroup * createInteractorStyleActionGroup()
boost::shared_ptr< class ViewWrapper > ViewWrapperPtr
ViewWrapperPtr createViewWrapper(ViewPtr view, LayoutViewData viewData)
virtual ~ViewManager()
CameraControlPtr mCameraControl
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Definition: cxSettings.cpp:99
boost::shared_ptr< class ViewManager > VisualizationServiceOldPtr
boost::shared_ptr< class InteractiveClipper > InteractiveClipperPtr
QString getUid() const
Definition: cxLayoutData.h:108
boost::shared_ptr< class View > ViewPtr
void autoShowData(DataPtr data)
boost::shared_ptr< class Navigation > NavigationPtr
Definition: cxViewGroup.h:54
iterator begin()
Definition: cxLayoutData.h:115
bool isValid() const
Definition: cxLayoutData.h:91
void settingsChangedSlot(QString key)
void initializeActiveView()
void activateViews(ViewCollectionWidget *widget, LayoutData next)
QString getActiveView() const
returns the active view
boost::shared_ptr< ViewWrapper2D > ViewWrapper2DPtr
SyncedValuePtr mGlobal2DZoomVal
void updateCameraStyleActions()
void onLayoutRepositoryChanged(QString uid)
void addXml(QDomNode &parentNode)
void initializeGlobal2DZoom()
boost::shared_ptr< class Data > DataPtr
void parseXml(QDomNode viewmanagerNode)
PLANE_TYPE mPlane
ptNOPLANE means 3D
Definition: cxLayoutData.h:85
QWidget * getLayoutWidget(QWidget *parent, int index)
LayoutRegion mRegion
Definition: cxLayoutData.h:87
SyncedValuePtr mActiveView
ViewManager(CoreServicesPtr backend)
InteractiveClipperPtr getClipper()
void activateView(ViewCollectionWidget *widget, LayoutViewData viewData)
static SyncedValuePtr create(QVariant val=QVariant())
void layoutChanged(QString uid)
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
A volumetric data set.
Definition: cxImage.h:64
CoreServicesPtr mBackend
QDomElement addTextToElement(QString name, QString text)
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
InteractiveCropperPtr getCropper()
Settings * settings()
Shortcut for accessing the settings instance.
Definition: cxSettings.cpp:42
void setActiveLayout(const QString &uid, int widgetIndex=0)
change the layout
Helper class for managing a set of slice planes.
virtual int getActiveViewGroup() const
boost::shared_ptr< ViewWrapperVideo > ViewWrapperVideoPtr
int findGroupContaining3DViewGivenGuess(int preferredGroup)
CameraStyleInteractorPtr mCameraStyleInteractor
void enableRender(bool val)
CyclicActionLoggerPtr getRenderTimer()
QStringList mActiveLayout
the active layout (type)
LayoutRepositoryPtr mLayoutRepository
boost::shared_ptr< ViewWrapper3D > ViewWrapper3DPtr
void report(QString msg)
Definition: cxLogger.cpp:90
QString parseTextFromElement(QString name)
virtual ViewPtr addView(View::Type type, LayoutRegion region)=0
void save()
save entire document.
boost::shared_ptr< class CoreServices > CoreServicesPtr
Definition: cxCameraStyle.h:59
bool renderingIsEnabled() const
iterator end()
Definition: cxLayoutData.h:116
boost::shared_ptr< class SyncedValue > SyncedValuePtr
Definition: cxViewGroup.h:51
std::vector< ViewGroupPtr > mViewGroups
View::Type mType
Definition: cxLayoutData.h:86
void layoutWidgetDestroyed(QObject *object)
virtual ViewGroupDataPtr getViewGroup(int groupIdx) const
void syncOrientationMode(SyncedValuePtr val)
static QPointer< ViewCollectionWidget > createOptimizedLayout(QWidget *parent=NULL)
void activeLayoutChanged()
emitted when the active layout changes
RenderLoopPtr mRenderLoop
boost::shared_ptr< class ViewGroup > ViewGroupPtr
void setActiveView(QString viewUid)
Helper class for xml files used to store ssc/cx data.
InteractiveCropperPtr mInteractiveCropper
InteractiveClipperPtr mInteractiveClipper
QDomElement parseElement(QString name)
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