18 #include <QVBoxLayout>
24 setWindowTitle(
"Real Space");
28 const auto createAction = [&](
const QString& text,
const QString& tooltip) -> QAction* {
29 auto* action =
new QAction(text,
this);
30 action->setToolTip(tooltip);
31 if (!toolbar->actions().empty())
32 toolbar->addSeparator();
33 toolbar->addAction(action);
37 auto* action = createAction(
"Save Picture",
"Save 3D real space view as .png file");
40 action = createAction(
"Default View",
"Reset view and zoom level to default");
43 action = createAction(
"Side View",
"View sample from the side at current zoom level");
46 action = createAction(
"Top View",
"View sample from the top at current zoom level");
49 action = createAction(
"Enlarge",
"Increase layer size");
52 action = createAction(
"Reduce",
"Decrease layer size");
55 auto* mainLayout =
new QVBoxLayout(
this);
56 mainLayout->setMargin(0);
57 mainLayout->setSpacing(0);
58 mainLayout->setContentsMargins(0, 0, 0, 0);
59 mainLayout->addWidget(toolbar);
65 return QSize(300, 300);
Defines class RealSpaceCanvas.
Defines class RealSpacePanel.
Provides 3D object generation for RealSpace presentation.
void changeLayerSize(double layerSizeChangeScale)
RealSpaceCanvas * canvas()
RealSpacePanel(QWidget *parent)
QSize sizeHint() const override
RealSpaceCanvas * m_canvas