35 #include <QGridLayout> 39 #include "vtkRenderer.h" 40 #include "vtkRenderWindow.h" 50 QVBoxLayout* layout =
new QVBoxLayout(
this);
51 this->setLayout(layout);
52 layout->setSpacing(0);
57 layout->addWidget(mViewContainer);
66 mViewContainer->show();
67 static int nameGenerator = 0;
68 QString uid = QString(
"view-%1-%2")
70 .arg(reinterpret_cast<long>(
this));
75 viewItem->
getView()->setType(type);
76 mViews.push_back(view);
94 mViewContainer->hide();
95 mViewContainer->
clear();
136 Eigen::Array2i size(view->getRenderWindow()->GetSize());
137 Eigen::Array2i size_renderer(view->getRenderer()->GetSize());
138 Eigen::Array2i p_vc(view->getRenderer()->GetOrigin());
139 p_vc[1] += size_renderer[1] - 1;
140 p_vc[1] = size[1] - p_vc[1] - 1;
142 QPoint p(p_vc[0], p_vc[1]);
143 p = mViewContainer->mapToGlobal(p);
144 p = this->mapFromGlobal(p);
150 Qt::ContextMenuPolicy policy = enable ? Qt::CustomContextMenu : Qt::PreventContextMenu;
151 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.