File: FormfactorCatalog.h

package info (click to toggle)
bornagain 23.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,936 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (78 lines) | stat: -rw-r--r-- 2,330 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      GUI/Model/Sample/FormfactorCatalog.h
//! @brief     Defines class FormfactorCatalog.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2021
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORCATALOG_H
#define BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORCATALOG_H

#include "GUI/Model/Type/UiInfo.h"
#include <QVector>

class FormfactorItem;

class FormfactorCatalog {
public:
    // Do not change the numbering! It is serialized!
    enum class Type : uint8_t {
        BarGauss = 1,
        BarLorentz = 2,
        Bipyramid4 = 3,
        Box = 4,
        CantellatedCube = 5,
        Cone = 6,
        CosineRippleBox = 7,
        CosineRippleGauss = 8,
        CosineRippleLorentz = 9,
        Cylinder = 10,
        Dodecahedron = 11,
        EllipsoidalCylinder = 12,
        Sphere = 13,
        Spheroid = 14,
        HemiEllipsoid = 15,
        HorizontalCylinder = 16,
        Icosahedron = 17,
        PlatonicOctahedron = 18,
        PlatonicTetrahedron = 19,
        Prism3 = 20,
        Prism6 = 21,
        Pyramid2 = 22,
        Pyramid3 = 23,
        Pyramid4 = 24,
        Pyramid6 = 25,
        SawtoothRippleBox = 26,
        SawtoothRippleGauss = 27,
        SawtoothRippleLorentz = 28,
        TruncatedCube = 29,
        SphericalSegment = 30,
        SpheroidalSegment = 31
    };

    //! Creates the item of the given type.
    static FormfactorItem* create(Type type);

    //! List of available types, sorted as expected in the UI.
    static QVector<Type> types();

    static QVector<Type> hardParticleTypes();
    static QVector<Type> rippleTypes();

    //! UiInfo on the given type.
    static UiInfo uiInfo(Type t);

    //! Returns the enum type of the given item.
    static Type type(const FormfactorItem* item);

    static QString menuEntry(const FormfactorItem* item);
};

#endif // BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORCATALOG_H