BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
DetectorAlignmentEditor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Instrument/DetectorAlignmentEditor.h
6 //! @brief A widget for editing the alignment of a detector
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_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
16 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
17 
18 #include <QWidget>
19 
20 class DetectorAlignmentForm;
22 class QFormLayout;
23 class DoubleSpinBox;
24 class DoubleDescriptor;
25 class VectorDescriptor;
26 
27 /// Widget for selecting the alignment of a detector (combo box) and input of the corresponding
28 /// values
29 
30 class DetectorAlignmentEditor : public QWidget {
31  Q_OBJECT
32 public:
33  DetectorAlignmentEditor(QWidget* parent, RectangularDetectorItem* item);
34 
35 signals:
36  void dataChanged();
37 
38 private:
39  void createAligmentWidgets();
40  DoubleSpinBox* createSpinBox(QFormLayout* parentFormLayout, const DoubleDescriptor& d);
41  DoubleSpinBox* createSpinBox(QWidget* parent, const DoubleDescriptor& d);
42  void addVector(QFormLayout* parentLayout, const VectorDescriptor& d);
43 
44 private:
46  QFormLayout* m_formLayout;
47 };
48 
49 #endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
Widget for selecting the alignment of a detector (combo box) and input of the corresponding values.
RectangularDetectorItem * m_item
DetectorAlignmentEditor(QWidget *parent, RectangularDetectorItem *item)
DoubleSpinBox * createSpinBox(QFormLayout *parentFormLayout, const DoubleDescriptor &d)
void addVector(QFormLayout *parentLayout, const VectorDescriptor &d)
Describes properties of a double value which are necessary to allow GUI representation,...
SpinBox for DoubleDescriptors, supporting units.
Definition: DoubleSpinBox.h:22
Describes properties of a 3D vector, consisting of three double values.