BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealSpace::Widget3D Class Reference
Inheritance diagram for RealSpace::Widget3D:
[legend]
Collaboration diagram for RealSpace::Widget3D:
[legend]

Public Member Functions

 Widget3D ()
 
 ~Widget3D ()
 
Cameracam ()
 
void defaultView ()
 
Modelmodel ()
 
void setBackground (QColor const &)
 
void setModel (Model *)
 
void sideView ()
 
void topView ()
 

Private Attributes

Canvascanvas
 

Detailed Description

Definition at line 29 of file widget.h.

Constructor & Destructor Documentation

◆ Widget3D()

RealSpace::Widget3D::Widget3D ( )

Definition at line 25 of file widget.cpp.

25  : canvas(nullptr)
26 {
27  auto box = new QHBoxLayout;
28  setLayout(box);
29  box->setMargin(0);
30  box->addWidget((canvas = new Canvas));
31 }
Canvas * canvas
Definition: widget.h:47

References canvas.

◆ ~Widget3D()

RealSpace::Widget3D::~Widget3D ( )
default

Member Function Documentation

◆ cam()

Camera & RealSpace::Widget3D::cam ( )

Definition at line 35 of file widget.cpp.

36 {
37  return *canvas->cam();
38 }
Camera * cam()
Definition: canvas.h:59

References RealSpace::Canvas::cam(), and canvas.

Referenced by RealSpaceView::getCamera().

Here is the call graph for this function:

◆ defaultView()

void RealSpace::Widget3D::defaultView ( )

Definition at line 50 of file widget.cpp.

51 {
53 }
void defaultView()
Definition: canvas.cpp:315

References canvas, and RealSpace::Canvas::defaultView().

Referenced by RealSpaceView::defaultView().

Here is the call graph for this function:

◆ model()

Model * RealSpace::Widget3D::model ( )

Definition at line 65 of file widget.cpp.

66 {
67  return canvas->getModel();
68 }
Model * getModel()
Definition: canvas.cpp:110

References canvas, and RealSpace::Canvas::getModel().

Referenced by setModel().

Here is the call graph for this function:

◆ setBackground()

void RealSpace::Widget3D::setBackground ( QColor const &  color)

Definition at line 40 of file widget.cpp.

41 {
42  canvas->setBgColor(color);
43 }
void setBgColor(QColor const &)
Definition: canvas.cpp:70

References canvas, and RealSpace::Canvas::setBgColor().

Here is the call graph for this function:

◆ setModel()

void RealSpace::Widget3D::setModel ( Model model)

Definition at line 45 of file widget.cpp.

46 {
48 }
void setModel(Model *)
Definition: canvas.cpp:92
Model * model()
Definition: widget.cpp:65

References canvas, model(), and RealSpace::Canvas::setModel().

Referenced by RealSpaceView::setModel().

Here is the call graph for this function:

◆ sideView()

void RealSpace::Widget3D::sideView ( )

Definition at line 55 of file widget.cpp.

56 {
57  canvas->sideView();
58 }

References canvas, and RealSpace::Canvas::sideView().

Referenced by RealSpaceView::sideView().

Here is the call graph for this function:

◆ topView()

void RealSpace::Widget3D::topView ( )

Definition at line 60 of file widget.cpp.

61 {
62  canvas->topView();
63 }

References canvas, and RealSpace::Canvas::topView().

Referenced by RealSpaceView::topView().

Here is the call graph for this function:

Member Data Documentation

◆ canvas

Canvas* RealSpace::Widget3D::canvas
private

Definition at line 47 of file widget.h.

Referenced by Widget3D(), cam(), defaultView(), model(), setBackground(), setModel(), sideView(), and topView().


The documentation for this class was generated from the following files: