14 #include <QGridLayout> 18 #include "vtkRenderer.h" 19 #include "vtkRenderWindow.h" 29 QVBoxLayout* layout =
new QVBoxLayout(
this);
30 this->setLayout(layout);
31 layout->setSpacing(0);
36 layout->addWidget(mViewContainer);
45 mViewContainer->show();
46 static int nameGenerator = 0;
47 QString uid = QString(
"view-%1-%2")
49 .arg(reinterpret_cast<long>(
this));
54 viewItem->
getView()->setType(type);
55 mViews.push_back(view);
73 mViewContainer->hide();
74 mViewContainer->
clear();
115 Eigen::Array2i size(view->getRenderWindow()->GetSize());
116 Eigen::Array2i size_renderer(view->getRenderer()->GetSize());
117 Eigen::Array2i p_vc(view->getRenderer()->GetOrigin());
118 p_vc[1] += size_renderer[1] - 1;
119 p_vc[1] = size[1] - p_vc[1] - 1;
121 QPoint p(p_vc[0], p_vc[1]);
122 p = mViewContainer->mapToGlobal(p);
123 p = this->mapFromGlobal(p);
129 Qt::ContextMenuPolicy policy = enable ? Qt::CustomContextMenu : Qt::PreventContextMenu;
130 mViewContainer->setContextMenuPolicy(policy);
boost::shared_ptr< class View > ViewPtr
ViewItem * addView(QString uid, LayoutRegion region, QString name="")
virtual void setModified()
void renderAll()
Use this function to render all views at once. Do not call render on each view.
virtual void setOffScreenRenderingAndClear(bool on)
boost::shared_ptr< class RenderWindowFactory > RenderWindowFactoryPtr
virtual QGridLayout * getGridLayout()
ViewRepCollectionPtr getView()
virtual bool getOffScreenRendering() const
Namespace for all CustusX production code.