BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ProfileItems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Sample/ProfileItems.h
6 //! @brief Defines Profile1DItem's classes
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_MODEL_SAMPLE_PROFILEITEMS_H
16 #define BORNAGAIN_GUI_MODEL_SAMPLE_PROFILEITEMS_H
17 
20 #include "Sample/Correlations/Profiles1D.h"
21 #include "Sample/Correlations/Profiles2D.h"
22 #include <memory>
23 
24 class Streamer;
25 
27 private:
28  static constexpr auto P_OMEGA{"Omega"};
29 
30 public:
31  virtual std::unique_ptr<IProfile1D> createProfile() const = 0;
32  virtual ~Profile1DItem() = default;
33  virtual void serialize(Streamer& s);
34 
35  DoubleDescriptor omega() const;
36 
37  virtual DoubleDescriptors valueDescriptors() const;
38 
39 protected:
40  Profile1DItem();
41 
43 };
44 
46 public:
47  std::unique_ptr<IProfile1D> createProfile() const override;
48 };
49 
51 public:
52  std::unique_ptr<IProfile1D> createProfile() const override;
53 };
54 
56 public:
57  std::unique_ptr<IProfile1D> createProfile() const override;
58 };
59 
61 public:
62  std::unique_ptr<IProfile1D> createProfile() const override;
63 };
64 
66 public:
67  std::unique_ptr<IProfile1D> createProfile() const override;
68 };
69 
71 public:
73  std::unique_ptr<IProfile1D> createProfile() const override;
74  void serialize(Streamer& s) override;
75 
76  DoubleDescriptor eta() const;
77  DoubleDescriptors valueDescriptors() const override;
78 
79 private:
81 };
82 
83 // --------------------------------------------------------------------------------------------- //
84 
86 public:
87  virtual ~Profile2DItem() = default;
88  virtual std::unique_ptr<IProfile2D> createProfile() const = 0;
89  virtual void serialize(Streamer& s);
90 
91  DoubleDescriptor omegaX() const;
92  void setOmegaX(double omega_x);
93  DoubleDescriptor omegaY() const;
94  void setOmegaY(double omega_y);
95 
96  DoubleDescriptor gamma() const;
97  void setGamma(double gamma);
98 
99  virtual DoubleDescriptors valueDescriptors() const;
100 
101 protected:
102  Profile2DItem();
103 
107 };
108 
110 public:
111  std::unique_ptr<IProfile2D> createProfile() const override;
112 };
113 
115 public:
116  std::unique_ptr<IProfile2D> createProfile() const override;
117 };
118 
120 public:
121  std::unique_ptr<IProfile2D> createProfile() const override;
122 };
123 
125 public:
126  std::unique_ptr<IProfile2D> createProfile() const override;
127 };
128 
130 public:
132  std::unique_ptr<IProfile2D> createProfile() const override;
133  void serialize(Streamer& s) override;
134 
135  DoubleDescriptor eta() const;
136  void setEta(double eta);
137 
138  DoubleDescriptors valueDescriptors() const override;
139 
140 private:
142 };
143 
144 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_PROFILEITEMS_H
Defines class DoubleDescriptor.
QList< DoubleDescriptor > DoubleDescriptors
Defines class DoubleProperty.
Describes properties of a double value which are necessary to allow GUI representation,...
Class for representing a double value, its attributes and its accessors.
std::unique_ptr< IProfile1D > createProfile() const override
std::unique_ptr< IProfile1D > createProfile() const override
std::unique_ptr< IProfile1D > createProfile() const override
std::unique_ptr< IProfile1D > createProfile() const override
virtual DoubleDescriptors valueDescriptors() const
virtual std::unique_ptr< IProfile1D > createProfile() const =0
virtual void serialize(Streamer &s)
DoubleProperty m_omega
Definition: ProfileItems.h:42
static constexpr auto P_OMEGA
Definition: ProfileItems.h:28
virtual ~Profile1DItem()=default
DoubleDescriptor omega() const
std::unique_ptr< IProfile1D > createProfile() const override
std::unique_ptr< IProfile1D > createProfile() const override
DoubleDescriptor eta() const
DoubleProperty m_eta
Definition: ProfileItems.h:80
void serialize(Streamer &s) override
DoubleDescriptors valueDescriptors() const override
std::unique_ptr< IProfile2D > createProfile() const override
std::unique_ptr< IProfile2D > createProfile() const override
std::unique_ptr< IProfile2D > createProfile() const override
std::unique_ptr< IProfile2D > createProfile() const override
virtual DoubleDescriptors valueDescriptors() const
DoubleProperty m_omegaX
Definition: ProfileItems.h:104
DoubleDescriptor omegaX() const
void setOmegaX(double omega_x)
DoubleDescriptor gamma() const
virtual ~Profile2DItem()=default
DoubleProperty m_omegaY
Definition: ProfileItems.h:105
void setOmegaY(double omega_y)
virtual std::unique_ptr< IProfile2D > createProfile() const =0
DoubleProperty m_gamma
Definition: ProfileItems.h:106
virtual void serialize(Streamer &s)
DoubleDescriptor omegaY() const
void setGamma(double gamma)
DoubleDescriptors valueDescriptors() const override
void serialize(Streamer &s) override
void setEta(double eta)
DoubleDescriptor eta() const
std::unique_ptr< IProfile2D > createProfile() const override
DoubleProperty m_eta
Definition: ProfileItems.h:141
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36