BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
instrumentitems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/model/instrumentitems.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 Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_MODEL_INSTRUMENTITEMS_H
16 #define BORNAGAIN_GUI2_MODEL_INSTRUMENTITEMS_H
17 
18 //! @file gui2/model/instrumentitems.h
19 //! Collection of items to construct specular instrument.
20 
21 #include "darefl_export.h"
23 #include "mvvm/model/groupitem.h"
24 
25 namespace ModelView {
26 class GraphItem;
27 }
28 
29 namespace gui2 {
30 
31 //! Represents base type for beam scan parameters.
32 
33 class DAREFLCORE_EXPORT BasicSpecularScanItem : public ModelView::CompoundItem {
34 public:
35  BasicSpecularScanItem(const std::string& model_type);
36  virtual std::vector<double> qScanValues() const = 0;
37 };
38 
39 //! Represents Q-space specular scan with fixed bin size.
40 
41 class DAREFLCORE_EXPORT QSpecScanItem : public BasicSpecularScanItem {
42 public:
43  static inline const std::string P_NBINS = "P_NBINS";
44  static inline const std::string P_QMIN = "P_QMIN";
45  static inline const std::string P_QMAX = "P_QMAX";
46  QSpecScanItem();
47 
48  std::vector<double> qScanValues() const override;
49 };
50 
51 //! Represents scan according to imported experimental data.
52 
53 class DAREFLCORE_EXPORT ExperimentalScanItem : public BasicSpecularScanItem {
54 public:
55  static inline const std::string P_IMPORTED_DATA = "P_IMPORTED_DATA";
57 
58  void setGraphItem(ModelView::GraphItem* graph);
59 
60  ModelView::GraphItem* graphItem() const;
61 
62  std::vector<double> qScanValues() const override;
63 };
64 
65 //! Represent selection of possible specular scans.
66 
67 class DAREFLCORE_EXPORT SpecularScanGroupItem : public ModelView::GroupItem {
68 public:
70 };
71 
72 //! Represents specular beam, contains settings of scan parameters.
73 
74 class DAREFLCORE_EXPORT SpecularBeamItem : public ModelView::CompoundItem {
75 public:
76  static inline const std::string P_INTENSITY = "P_INTENSITY";
77  static inline const std::string P_SCAN_GROUP = "P_SCAN_GROUP";
78 
80 
81  std::vector<double> qScanValues() const;
82 
83  double intensity() const;
84 
85  ModelView::GraphItem* experimentalGraphItem() const;
86 };
87 
88 //! Represents specular instrument.
89 
90 class DAREFLCORE_EXPORT SpecularInstrumentItem : public ModelView::CompoundItem {
91 public:
92  static inline const std::string P_BEAM = "P_BEAM";
93 
95 
96  SpecularBeamItem* beamItem() const;
97 };
98 
99 } // namespace gui2
100 
101 #endif // BORNAGAIN_GUI2_MODEL_INSTRUMENTITEMS_H
Complex item holding mixed SessionItem types (single properties and other CompountItems).
Definition: compounditem.h:28
One-dimensional graph representation of Data1DItem.
Definition: graphitem.h:29
Group item holds collection of predefined items.
Definition: groupitem.h:26
Represents base type for beam scan parameters.
virtual std::vector< double > qScanValues() const =0
Represents scan according to imported experimental data.
Represents Q-space specular scan with fixed bin size.
Represents specular beam, contains settings of scan parameters.
Represents specular instrument.
Represent selection of possible specular scans.
Defines class CLASS?
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.
std::string model_type
Definition: types.h:23
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20