BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FootprintItemCatalog.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/Model/CatDevice/FootprintItemCatalog.h
6
//! @brief Defines class FootprintItemCatalog
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_CATDEVICE_FOOTPRINTITEMCATALOG_H
16
#define BORNAGAIN_GUI_MODEL_CATDEVICE_FOOTPRINTITEMCATALOG_H
17
18
#include <QString>
19
#include <QVector>
20
21
class
FootprintItem
;
22
23
class
FootprintItemCatalog
{
24
public
:
25
using
CatalogedType
=
FootprintItem
;
26
27
// Do not change the numbering! It is serialized!
28
enum class
Type
: uint8_t {
None
= 0,
Gaussian
= 1,
Square
= 2 };
29
30
struct
UiInfo
{
31
QString
menuEntry
;
32
QString
description
;
33
};
34
35
//! Creates the item of the given type.
36
static
FootprintItem
*
create
(
Type
type
);
37
38
//! Available types of items.
39
//!
40
//! Contains also type "None".
41
//! This list is sorted as expected in the UI (e.g. in combo box)
42
static
QVector<Type>
types
();
43
44
//! UiInfo on the given type.
45
static
UiInfo
uiInfo
(
Type
t);
46
47
//! Returns the enum type of the given item.
48
static
Type
type
(
const
FootprintItem
* item);
49
};
50
51
#endif
// BORNAGAIN_GUI_MODEL_CATDEVICE_FOOTPRINTITEMCATALOG_H
FootprintItemCatalog
Definition:
FootprintItemCatalog.h:23
FootprintItemCatalog::uiInfo
static UiInfo uiInfo(Type t)
UiInfo on the given type.
Definition:
FootprintItemCatalog.cpp:37
FootprintItemCatalog::type
static Type type(const FootprintItem *item)
Returns the enum type of the given item.
Definition:
FootprintItemCatalog.cpp:50
FootprintItemCatalog::Type
Type
Definition:
FootprintItemCatalog.h:28
FootprintItemCatalog::Type::None
@ None
FootprintItemCatalog::Type::Square
@ Square
FootprintItemCatalog::Type::Gaussian
@ Gaussian
FootprintItemCatalog::create
static FootprintItem * create(Type type)
Creates the item of the given type.
Definition:
FootprintItemCatalog.cpp:19
FootprintItemCatalog::types
static QVector< Type > types()
Available types of items.
Definition:
FootprintItemCatalog.cpp:32
FootprintItem
Definition:
FootprintItems.h:24
FootprintItemCatalog::UiInfo
Definition:
FootprintItemCatalog.h:30
FootprintItemCatalog::UiInfo::description
QString description
Definition:
FootprintItemCatalog.h:32
FootprintItemCatalog::UiInfo::menuEntry
QString menuEntry
Definition:
FootprintItemCatalog.h:31
GUI
Model
CatDevice
FootprintItemCatalog.h
Generated by
1.9.1