BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MaskItemCatalog.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/CatDevice/MaskItemCatalog.h
6 //! @brief Defines class MaskItemCatalog
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2022
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_MODEL_CATDEVICE_MASKITEMCATALOG_H
16 #define BORNAGAIN_GUI_MODEL_CATDEVICE_MASKITEMCATALOG_H
17 
18 #include <QString>
19 #include <QVector>
20 
21 class MaskItem;
22 
24 public:
26 
27  // Do not change the numbering! It is serialized!
28  enum class Type : uint8_t {
29  RegionOfInterest = 0,
30  Rectangle = 1,
31  Polygon = 2,
32  VerticalLine = 3,
33  HorizontalLine = 4,
34  MaskAll = 5
35  };
36 
37  //! Creates the item of the given type.
38  static MaskItem* create(Type type);
39 
40  //! Available types of items.
41  static QVector<Type> types();
42 
43  //! Returns the enum type of the given item.
44  static Type type(const MaskItem* item);
45 };
46 
47 #endif // BORNAGAIN_GUI_MODEL_CATDEVICE_MASKITEMCATALOG_H
static QVector< Type > types()
Available types of items.
static MaskItem * create(Type type)
Creates the item of the given type.
static Type type(const MaskItem *item)
Returns the enum type of the given item.
A base class for all mask items.
Definition: MaskItems.h:27