BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealSpaceView.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/RealSpaceWidgets/RealSpaceView.cpp
6 //! @brief Implements class RealSpaceView
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 
16 #include "GUI/ba3d/widget.h"
18 #include <QVBoxLayout>
19 
20 RealSpaceView::RealSpaceView(QWidget* parent) : QWidget(parent), m_3dview(new RealSpace::Widget3D)
21 {
22  QVBoxLayout* layout = new QVBoxLayout;
23  layout->setMargin(0);
24  layout->setSpacing(0);
25 
26  layout->addWidget(m_3dview);
27  setLayout(layout);
28 }
29 
31 {
32  m_3dview->setModel(model);
33 }
34 
36 {
38 }
39 
41 {
42  m_3dview->sideView();
43 }
44 
46 {
47  m_3dview->topView();
48 }
49 
51 {
52  return m_3dview->cam();
53 }
Defines RealSpaceModel namespace.
Defines class RealSpaceView.
RealSpace::Camera & getCamera()
RealSpaceView(QWidget *parent=0)
void setModel(RealSpaceModel *model)
RealSpace::Widget3D * m_3dview
Definition: RealSpaceView.h:44
void setModel(Model *)
Definition: widget.cpp:45
Camera & cam()
Definition: widget.cpp:35
void defaultView()
Definition: widget.cpp:50
Defines Widget class.