BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RectangularDetectorItem.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/RectangularDetectorItem.h
6 //! @brief Defines class RectangularDetectorItem
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_COREGUI_MODELS_RECTANGULARDETECTORITEM_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_RECTANGULARDETECTORITEM_H
17 
18 #include "Base/Vector/Vectors3D.h"
20 
21 class BasicAxisItem;
22 
23 class BA_CORE_API_ RectangularDetectorItem : public DetectorItem {
24 public:
25  static const QString P_X_AXIS;
26  static const QString P_Y_AXIS;
27  static const QString P_ALIGNMENT;
28  static const QString P_NORMAL;
29  static const QString P_DIRECTION;
30  static const QString P_U0;
31  static const QString P_V0;
32  static const QString P_DBEAM_U0;
33  static const QString P_DBEAM_V0;
34  static const QString P_DISTANCE;
35 
37 
38  void setDetectorAlignment(const QString& alignment);
39 
40  int xSize() const override;
41  int ySize() const override;
42  void setXSize(int nx) override;
43  void setYSize(int ny) override;
44 
45  const BasicAxisItem* xAxisItem() const;
46  BasicAxisItem* xAxisItem();
47  const BasicAxisItem* yAxisItem() const;
48  BasicAxisItem* yAxisItem();
49 
50 private:
51  std::unique_ptr<IDetector2D> createDomainDetector() const override;
52  void update_properties_appearance();
53  kvector_t normalVector() const;
54  kvector_t directionVector() const;
55 
57 };
58 
59 #endif // BORNAGAIN_GUI_COREGUI_MODELS_RECTANGULARDETECTORITEM_H
Defines classes DetectorItems.
Defines basic vectors in Z^3, R^3, C^3.
virtual void setXSize(int nx)=0
sets the size of x-axis of the detector
virtual int xSize() const =0
returns the size of x-axis of the detector
virtual std::unique_ptr< IDetector2D > createDomainDetector() const =0
virtual int ySize() const =0
returns the size of y-axis of the detector
virtual void setYSize(int ny)=0
sets the size of y-axis of the detector
static const QString P_X_AXIS
static const QString P_DIRECTION
static const QString P_Y_AXIS
static const QString P_NORMAL
static const QString P_DBEAM_V0
static const QString P_DISTANCE
static const QString P_ALIGNMENT
static const QString P_DBEAM_U0