BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealSpacePanel.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SampleDesigner/RealSpacePanel.cpp
6 //! @brief Implements class RealSpacePanel
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
17 #include <QVBoxLayout>
18 
19 RealSpacePanel::RealSpacePanel(SampleModel* sampleModel, QItemSelectionModel* selectionModel,
20  QWidget* parent)
21  : QWidget(parent), m_realSpaceWidget(nullptr)
22 {
23  setWindowTitle("Real Space");
24  setObjectName("Sample3DPanel");
25 
26  auto layout = new QVBoxLayout;
27  layout->setMargin(0);
28  layout->setSpacing(0);
29  layout->setContentsMargins(0, 0, 0, 0);
30 
31  m_realSpaceWidget = new RealSpaceWidget(sampleModel, selectionModel, this);
32  layout->addWidget(m_realSpaceWidget);
33  setLayout(layout);
34 }
35 
37 {
38  return QSize(300, 300);
39 }
Defines class RealSpacePanel.
Defines class RealSpaceWidget.
RealSpaceWidget * m_realSpaceWidget
RealSpacePanel(SampleModel *sampleModel, QItemSelectionModel *selectionModel, QWidget *parent)
QSize sizeHint() const override
Prototype of real space widget to present sample structure in 3D view.
Main model to hold sample items.
Definition: SampleModel.h:24