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);
83 mViewContainer->hide();
84 mViewContainer->
clear();
125 Eigen::Array2i size(view->getRenderWindow()->GetSize());
126 Eigen::Array2i size_renderer(view->getRenderer()->GetSize());
127 Eigen::Array2i p_vc(view->getRenderer()->GetOrigin());
128 p_vc[1] += size_renderer[1] - 1;
129 p_vc[1] = size[1] - p_vc[1] - 1;
131 QPoint p(p_vc[0], p_vc[1]);
132 p = mViewContainer->mapToGlobal(p);
133 p = this->mapFromGlobal(p);
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 QGridLayout * getGridLayout()
ViewRepCollectionPtr getView()