25 #include <QGridLayout>
30 camera(new SoOrthographicCamera)
35 this->setContentsMargins(1, 1, 1, 1);
37 QGridLayout* grid =
new QGridLayout();
38 grid->setContentsMargins(0, 0, 0, 0);
39 this->setLayout(grid);
40 this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
42 QWidget* view1 =
new QWidget(
this);
43 view1->setMinimumSize(100, 100);
44 view1->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
47 viewer->setSceneGraph(
control->getScene()->registerCamera(camera));
50 camera->position.setValue(0, 0, 0);
51 camera->pointAt(SbVec3f(0, 0, -1));
52 control->getScene()->makeCameraViewAll(camera, viewer->getViewportRegion());
56 viewer->redrawOnSelectionChange(
control->getScene()->selectionRootNode);
63 grid->addWidget(view1, 0, 0, 1, 2);
67 connect(
control.get(), SIGNAL(reloadScene()),
this, SLOT(updateMinimap()));
71 void gui::MinimapWidget::updateMinimap()
73 camera->position.setValue(0, 0, 0);
74 camera->pointAt(SbVec3f(0, 0, -1));
78 controller->getScene()->makeCameraViewAll(camera, viewer->getViewportRegion());