16 #include "vtkRenderWindow.h" 26 mOffScreenRendering =
false;
28 mLayout =
new QGridLayout;
30 mLayout->setSpacing(2);
31 mLayout->setMargin(4);
33 this->setLayout(mLayout);
42 ViewWidget* view = mViewCache->retrieveView(
this, type, mOffScreenRendering);
57 mOffScreenRendering = on;
62 return mOffScreenRendering;
67 mViewCache->clearViews();
69 for (
unsigned i=0; i<
mViews.size(); ++i)
72 mLayout->removeWidget(
mViews[i]);
81 for (
unsigned i=0; i<
mViews.size(); ++i)
90 for (
unsigned i=0; i<
mViews.size(); ++i)
101 ViewWidget* widget = this->WidgetFromView(view);
104 CX_LOG_ERROR() <<
"Did not find view in layout " << view->getUid();
108 QPoint p = widget->mapToGlobal(QPoint(0,0));
109 p = this->mapFromGlobal(p);
115 Qt::ContextMenuPolicy policy = enable ? Qt::CustomContextMenu : Qt::PreventContextMenu;
116 for (
unsigned i=0; i<
mViews.size(); ++i)
118 mViews[i]->setContextMenuPolicy(policy);
124 for (
unsigned i=0; i<
mViews.size(); ++i)
135 mLayout->setSpacing(val);
140 mLayout->setMargin(val);
145 return mLayout->spacing();
150 return mLayout->margin();
155 std::vector<ViewPtr> retval;
156 for (
unsigned i=0; i<
mViews.size(); ++i)
157 retval.push_back(
mViews[i]->getView());
LayoutPosition span
size of region
boost::shared_ptr< class View > ViewPtr
void setStretchFactors(QGridLayout *layout, LayoutRegion region, int stretchFactor)
static MultiViewCachePtr create(RenderWindowFactoryPtr factory)
static const int MaxGridSize
LayoutPosition pos
start position of region
boost::shared_ptr< class RenderWindowFactory > RenderWindowFactoryPtr
Namespace for all CustusX production code.