17 #include <vtkRenderWindow.h> 53 this->optionChangedSlot();
60 void ViewGroup::optionChangedSlot()
69 wrapper->setSharedOpenGLContext(sharedOpenGLContext);
70 mViews.push_back(wrapper->getView());
77 View* view = wrapper->getView().get();
89 View* view = wrapper->getView().get();
118 if(shouldUpdateActiveData(activeData->getActive<
Mesh>(), meshes))
119 activeData->setActive(meshes.front()->getUid());
120 if(shouldUpdateActiveData(activeData->getActive<
Image>(), images))
121 activeData->setActive(images.front()->getUid());
122 if(shouldUpdateActiveData(activeData->getActive<
TrackedStream>(), trackedStreams))
123 activeData->setActive(trackedStreams.front()->getUid());
125 View* view =
static_cast<View*
>(this->sender());
131 bool ViewGroup::shouldUpdateActiveData(T activeData, std::vector<T> datas)
const 133 bool activeDataExistsInGroup = std::find(datas.begin(), datas.end(), activeData) != datas.end();
134 return !activeDataExistsInGroup && !datas.empty();
164 for (
unsigned j = 0; j <
mViews.size(); ++j)
ViewGroupDataPtr mViewGroupData
CameraStylePtr mCameraStyle
std::vector< ViewPtr > mViews
boost::shared_ptr< class ViewWrapper > ViewWrapperPtr
void addView(ViewWrapperPtr wrapper, SharedOpenGLContextPtr sharedOpenGLContext)
boost::shared_ptr< class ActiveData > ActiveDataPtr
Container for data shared between all members of a view group.
A data set for video streams (2D/3D).
void mouseClickInViewGroupSlot()
boost::shared_ptr< class SharedOpenGLContext > SharedOpenGLContextPtr
bool contains3DView() const
static DataViewProperties createFull()
std::vector< ViewWrapperPtr > mViewWrappers
virtual void parseXml(QDomNode dataNode)
load internal state info from dataNode
ViewWrapperPtr getViewWrapperFromViewUid(QString viewUid)
virtual QString getUid()=0
Get a views unique id.
std::vector< ViewPtr > getViews() const
SyncedValuePtr mActiveView
boost::shared_ptr< class CoreServices > CoreServicesPtr
boost::shared_ptr< class SyncedValue > SyncedValuePtr
virtual void addXml(QDomNode &dataNode)
store internal state info in dataNode
void initializeActiveView(SyncedValuePtr val)
ViewGroup(CoreServicesPtr backend, QString uid)
Namespace for all CustusX production code.