BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularBeamInclinationItem.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Device/SpecularBeamInclinationItem.h
6 //! @brief Declares the class SpecularBeamInclinationItem
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_DEVICE_SPECULARBEAMINCLINATIONITEM_H
16 #define BORNAGAIN_GUI_MODEL_DEVICE_SPECULARBEAMINCLINATIONITEM_H
17 
20 
21 //! BeamInclinationAxisItem contains inclination angle axis for specular/off-specular
22 //! simulations and also provides distribution functionality.
23 //! Considering distribution, differs from BeamInclinationAngleItem
24 //! by any distribution mean value being always zero.
25 
27 public:
28  explicit SpecularBeamInclinationItem(const InstrumentItem* owningInstrument);
29 
30  void serialize(Streamer& s) override;
31  double scaleFactor() const override;
32 
33  //! The currently selected axis
34  BasicAxisItem* alphaAxis() const;
35 
36  //! True if a pointwise axis was defined.
37  //!
38  //! It still is no necessarily the selected axis!
39  //! Not to be confused with pointwiseAlphaAxisSelected
40  bool pointwiseAlphaAxisDefined() const;
41 
42  //! True if pointwise axis is selected.
43  //!
44  //! Not to be confused with pointwiseAlphaAxisDefined
45  bool pointwiseAlphaAxisSelected() const;
46 
47  //! True if uniform axis is selected.
48  bool uniformAlphaAxisSelected() const;
49 
50  void selectUniformAxis();
51  void selectPointwiseAxis();
52 
53  void initUniformAxis(const IAxis& axis);
54  void initPointwiseAxis(const IAxis& axis, QString units);
55 
56 private:
57  std::unique_ptr<BasicAxisItem> m_uniformAlphaAxis;
58  std::unique_ptr<PointwiseAxisItem> m_pointwiseAlphaAxis;
60 
62 };
63 
64 #endif // BORNAGAIN_GUI_MODEL_DEVICE_SPECULARBEAMINCLINATIONITEM_H
Defines class BeamDistributionItem.
Defines pointwise axis item.
The BeamDistributionItem handles wavelength, inclination and azimuthal parameter distribution for Bea...
Abstract base class for instrument-specific item classes.
BeamInclinationAxisItem contains inclination angle axis for specular/off-specular simulations and als...
const InstrumentItem * m_owningInstrument
bool uniformAlphaAxisSelected() const
True if uniform axis is selected.
BasicAxisItem * alphaAxis() const
The currently selected axis.
bool pointwiseAlphaAxisDefined() const
True if a pointwise axis was defined.
std::unique_ptr< BasicAxisItem > m_uniformAlphaAxis
bool pointwiseAlphaAxisSelected() const
True if pointwise axis is selected.
SpecularBeamInclinationItem(const InstrumentItem *owningInstrument)
void serialize(Streamer &s) override
std::unique_ptr< PointwiseAxisItem > m_pointwiseAlphaAxis
void initPointwiseAxis(const IAxis &axis, QString units)
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36