BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
toyitems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/tests/libtestmachinery/toyitems.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_TOYITEMS_H
16 #define BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_TOYITEMS_H
17 
19 #include "mvvm/model/groupitem.h"
20 #include "mvvm/model/itempool.h"
22 #include <string>
23 
24 //! Collection of toy items and models for testing purposes.
25 
26 namespace ToyItems {
27 
28 namespace Constants {
29 
34 
38 
40 } // namespace Constants
41 
42 //! Represents multilayer with collection of layers.
43 
45 public:
46  static inline const std::string T_LAYERS = "T_LAYERS";
48 };
49 
50 //! Represents a layer, with thickness and color, and possibly populated with particles.
51 
53 public:
54  static inline const std::string P_THICKNESS = "Thickness";
55  static inline const std::string P_COLOR = "Color";
56  static inline const std::string T_PARTICLES = "Particles";
57  LayerItem();
58 };
59 
60 //! Represents a particle, with a position, and a selection of possible shapes.
61 
63 public:
64  static inline const std::string P_POSITION = "Position";
65  static inline const std::string P_SHAPES = "Shapes";
66 
67  ParticleItem();
68 };
69 
70 //! Represents a lattice.
71 
73 public:
74  static inline const std::string P_ROTATION_ANLE = "Rotation";
75  static inline const std::string P_INTEGRATION = "Integration";
76  static inline const std::string P_LATTICE_TYPE = "Lattice type";
77 
78  LatticeItem();
79 
80  void activate() override;
81 
82 private:
83  void update_appearance();
84 };
85 
86 //! Represents a cylindrical shape.
87 
89 public:
90  static inline const std::string P_RADIUS = "Radius";
91  static inline const std::string P_HEIGHT = "Height";
92 
93  CylinderItem();
94 };
95 
96 //! Represents a shpere.
97 
99 public:
100  static inline const std::string P_RADIUS = "Radius";
101 
102  SphereItem();
103 };
104 
105 //! Represents an anysotropical pyramid.
106 
108 public:
109  static inline const std::string P_LENGTH = "Length";
110  static inline const std::string P_WIDTH = "Width";
111  static inline const std::string P_HEIGHT = "Height";
112  static inline const std::string P_ALPHA = "Alpha";
113 
115 };
116 
117 //! Represents a group item holding a collection of shapes.
118 
120 public:
121  ShapeGroupItem();
122 };
123 
124 } // namespace ToyItems
125 
126 #endif // BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_TOYITEMS_H
Complex item holding mixed SessionItem types (single properties and other CompountItems).
Definition: compounditem.h:28
Group item holds collection of predefined items.
Definition: groupitem.h:26
Represents an anysotropical pyramid.
Definition: toyitems.h:107
static const std::string P_HEIGHT
Definition: toyitems.h:111
static const std::string P_LENGTH
Definition: toyitems.h:109
static const std::string P_ALPHA
Definition: toyitems.h:112
static const std::string P_WIDTH
Definition: toyitems.h:110
Represents a cylindrical shape.
Definition: toyitems.h:88
static const std::string P_HEIGHT
Definition: toyitems.h:91
static const std::string P_RADIUS
Definition: toyitems.h:90
Represents a lattice.
Definition: toyitems.h:72
static const std::string P_ROTATION_ANLE
Definition: toyitems.h:74
void activate() override
Definition: toyitems.cpp:60
static const std::string P_LATTICE_TYPE
Definition: toyitems.h:76
static const std::string P_INTEGRATION
Definition: toyitems.h:75
Represents a layer, with thickness and color, and possibly populated with particles.
Definition: toyitems.h:52
static const std::string T_PARTICLES
Definition: toyitems.h:56
static const std::string P_COLOR
Definition: toyitems.h:55
static const std::string P_THICKNESS
Definition: toyitems.h:54
Represents multilayer with collection of layers.
Definition: toyitems.h:44
static const std::string T_LAYERS
Definition: toyitems.h:46
Represents a particle, with a position, and a selection of possible shapes.
Definition: toyitems.h:62
static const std::string P_SHAPES
Definition: toyitems.h:65
static const std::string P_POSITION
Definition: toyitems.h:64
Represents a group item holding a collection of shapes.
Definition: toyitems.h:119
Represents a shpere.
Definition: toyitems.h:98
static const std::string P_RADIUS
Definition: toyitems.h:100
Defines class CLASS?
Defines class CLASS?
Defines class CLASS?
std::string model_type
Definition: types.h:23
const ModelView::model_type LayerItemType
Definition: toyitems.h:31
const ModelView::model_type SphereItemType
Definition: toyitems.h:36
const ModelView::model_type CylinderItemType
Definition: toyitems.h:35
const ModelView::model_type MultiLayerItemType
Definition: toyitems.h:30
const ModelView::model_type LatticeItemType
Definition: toyitems.h:33
const ModelView::model_type ShapeGroupItemType
Definition: toyitems.h:39
const ModelView::model_type ParticleItemType
Definition: toyitems.h:32
const ModelView::model_type AnysoPyramidItemType
Definition: toyitems.h:37
Collection of toy items and models for testing purposes.
Definition: toyitems.h:26
Defines class CLASS?