BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorItemCatalog.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/Model/CatSample/FormFactorItemCatalog.h
6
//! @brief Defines class FormFactorItemCatalog
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2021
11
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#ifndef BORNAGAIN_GUI_MODEL_CATSAMPLE_FORMFACTORITEMCATALOG_H
16
#define BORNAGAIN_GUI_MODEL_CATSAMPLE_FORMFACTORITEMCATALOG_H
17
18
#include <QString>
19
#include <QVector>
20
21
class
FormFactorItem
;
22
23
class
FormFactorItemCatalog
{
24
public
:
25
using
CatalogedType
=
FormFactorItem
;
26
27
// Do not change the numbering! It is serialized!
28
enum class
Type
: uint8_t {
29
BarGauss
= 1,
30
BarLorentz
= 2,
31
Bipyramid4
= 3,
32
Box
= 4,
33
CantellatedCube
= 5,
34
Cone
= 6,
35
CosineRippleBox
= 7,
36
CosineRippleGauss
= 8,
37
CosineRippleLorentz
= 9,
38
Cylinder
= 10,
39
Dodecahedron
= 11,
40
EllipsoidalCylinder
= 12,
41
Sphere
= 13,
42
Spheroid
= 14,
43
HemiEllipsoid
= 15,
44
HorizontalCylinder
= 16,
45
Icosahedron
= 17,
46
PlatonicOctahedron
= 18,
47
PlatonicTetrahedron
= 19,
48
Prism3
= 20,
49
Prism6
= 21,
50
Pyramid2
= 22,
51
Pyramid3
= 23,
52
Pyramid4
= 24,
53
Pyramid6
= 25,
54
SawtoothRippleBox
= 26,
55
SawtoothRippleGauss
= 27,
56
SawtoothRippleLorentz
= 28,
57
TruncatedCube
= 29,
58
TruncatedSphere
= 30,
59
TruncatedSpheroid
= 31
60
};
61
62
struct
UiInfo
{
63
QString
menuEntry
;
64
QString
description
;
65
QString
iconPath
;
66
};
67
68
69
//! Creates the item of the given type.
70
//!
71
//! If type is "None", a nullptr is returned.
72
static
FormFactorItem
*
create
(
Type
type
);
73
74
//! Available types of interference items.
75
//!
76
//! Contains also type "None".
77
//! This list is sorted as expected in the UI (e.g. in combo box)
78
static
QVector<Type>
types
();
79
80
static
QVector<Type>
hardParticleTypes
();
81
static
QVector<Type>
rippleTypes
();
82
83
84
//! UiInfo on the given type.
85
static
UiInfo
uiInfo
(
Type
t);
86
87
//! Returns the enum type of the given item.
88
static
Type
type
(
const
FormFactorItem
* item);
89
90
static
QString
menuEntry
(
const
FormFactorItem
* item);
91
};
92
93
#endif
// BORNAGAIN_GUI_MODEL_CATSAMPLE_FORMFACTORITEMCATALOG_H
FormFactorItemCatalog
Definition:
FormFactorItemCatalog.h:23
FormFactorItemCatalog::types
static QVector< Type > types()
Available types of interference items.
Definition:
FormFactorItemCatalog.cpp:64
FormFactorItemCatalog::menuEntry
static QString menuEntry(const FormFactorItem *item)
Definition:
FormFactorItemCatalog.cpp:316
FormFactorItemCatalog::create
static FormFactorItem * create(Type type)
Creates the item of the given type.
Definition:
FormFactorItemCatalog.cpp:19
FormFactorItemCatalog::hardParticleTypes
static QVector< Type > hardParticleTypes()
Definition:
FormFactorItemCatalog.cpp:99
FormFactorItemCatalog::uiInfo
static UiInfo uiInfo(Type t)
UiInfo on the given type.
Definition:
FormFactorItemCatalog.cpp:134
FormFactorItemCatalog::type
static Type type(const FormFactorItem *item)
Returns the enum type of the given item.
Definition:
FormFactorItemCatalog.cpp:273
FormFactorItemCatalog::Type
Type
Definition:
FormFactorItemCatalog.h:28
FormFactorItemCatalog::Type::Bipyramid4
@ Bipyramid4
FormFactorItemCatalog::Type::Prism6
@ Prism6
FormFactorItemCatalog::Type::TruncatedSphere
@ TruncatedSphere
FormFactorItemCatalog::Type::Cylinder
@ Cylinder
FormFactorItemCatalog::Type::Box
@ Box
FormFactorItemCatalog::Type::CosineRippleLorentz
@ CosineRippleLorentz
FormFactorItemCatalog::Type::PlatonicTetrahedron
@ PlatonicTetrahedron
FormFactorItemCatalog::Type::Pyramid6
@ Pyramid6
FormFactorItemCatalog::Type::TruncatedCube
@ TruncatedCube
FormFactorItemCatalog::Type::CantellatedCube
@ CantellatedCube
FormFactorItemCatalog::Type::HorizontalCylinder
@ HorizontalCylinder
FormFactorItemCatalog::Type::Prism3
@ Prism3
FormFactorItemCatalog::Type::CosineRippleGauss
@ CosineRippleGauss
FormFactorItemCatalog::Type::Pyramid3
@ Pyramid3
FormFactorItemCatalog::Type::SawtoothRippleLorentz
@ SawtoothRippleLorentz
FormFactorItemCatalog::Type::SawtoothRippleBox
@ SawtoothRippleBox
FormFactorItemCatalog::Type::BarLorentz
@ BarLorentz
FormFactorItemCatalog::Type::HemiEllipsoid
@ HemiEllipsoid
FormFactorItemCatalog::Type::SawtoothRippleGauss
@ SawtoothRippleGauss
FormFactorItemCatalog::Type::Pyramid2
@ Pyramid2
FormFactorItemCatalog::Type::Sphere
@ Sphere
FormFactorItemCatalog::Type::CosineRippleBox
@ CosineRippleBox
FormFactorItemCatalog::Type::Cone
@ Cone
FormFactorItemCatalog::Type::Pyramid4
@ Pyramid4
FormFactorItemCatalog::Type::PlatonicOctahedron
@ PlatonicOctahedron
FormFactorItemCatalog::Type::Dodecahedron
@ Dodecahedron
FormFactorItemCatalog::Type::TruncatedSpheroid
@ TruncatedSpheroid
FormFactorItemCatalog::Type::BarGauss
@ BarGauss
FormFactorItemCatalog::Type::Icosahedron
@ Icosahedron
FormFactorItemCatalog::Type::Spheroid
@ Spheroid
FormFactorItemCatalog::Type::EllipsoidalCylinder
@ EllipsoidalCylinder
FormFactorItemCatalog::rippleTypes
static QVector< Type > rippleTypes()
Definition:
FormFactorItemCatalog.cpp:127
FormFactorItem
Definition:
FormFactorItems.h:34
FormFactorItemCatalog::UiInfo
Definition:
FormFactorItemCatalog.h:62
FormFactorItemCatalog::UiInfo::iconPath
QString iconPath
Definition:
FormFactorItemCatalog.h:65
FormFactorItemCatalog::UiInfo::menuEntry
QString menuEntry
Definition:
FormFactorItemCatalog.h:63
FormFactorItemCatalog::UiInfo::description
QString description
Definition:
FormFactorItemCatalog.h:64
GUI
Model
CatSample
FormFactorItemCatalog.h
Generated by
1.9.1