38 #include <vtkRenderWindow.h> 74 this->optionChangedSlot();
81 void ViewGroup::optionChangedSlot()
90 wrapper->setSharedOpenGLContext(sharedOpenGLContext);
91 mViews.push_back(wrapper->getView());
98 View* view = wrapper->getView().get();
110 View* view = wrapper->getView().get();
139 if(shouldUpdateActiveData(activeData->getActive<
Mesh>(), meshes))
140 activeData->setActive(meshes.front()->getUid());
141 if(shouldUpdateActiveData(activeData->getActive<
Image>(), images))
142 activeData->setActive(images.front()->getUid());
143 if(shouldUpdateActiveData(activeData->getActive<
TrackedStream>(), trackedStreams))
144 activeData->setActive(trackedStreams.front()->getUid());
146 View* view =
static_cast<View*
>(this->sender());
152 bool ViewGroup::shouldUpdateActiveData(T activeData, std::vector<T> datas)
const 154 bool activeDataExistsInGroup = std::find(datas.begin(), datas.end(), activeData) != datas.end();
155 return !activeDataExistsInGroup && !datas.empty();
185 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.