BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SphericalAxisEditor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Instrument/SphericalAxisEditor.h
6 //! @brief Defines class SphericalAxisEditor
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_SPHERICALAXISEDITOR_H
16 #define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALAXISEDITOR_H
17 
18 #include <QWidget>
19 
20 class BasicAxisItem;
21 class QDoubleSpinBox;
22 class QFormLayout;
23 class QSpinBox;
24 
25 /// The form for a spherical axis: contains the bare bone widgets for the user to enter
26 /// the number of bins and to select the range in degrees (minimum & maximum)
27 /// The input widgets will be inserted in the form given in the constructor
28 
29 class SphericalAxisForm : public QObject {
30  Q_OBJECT
31 public:
32  SphericalAxisForm(QFormLayout* form, QWidget* parent);
33  void setItem(BasicAxisItem* item);
34  void setEnabled(bool enabled);
35 
36  //! Reload UI from data
37  void updateData();
38 
39 signals:
40  void dataChanged();
41 
42 private slots:
43  void onNbinsValueChanged(int value);
44  void onMinimumValueChanged(double value);
45  void onMaximumValueChanged(double value);
46 
47 private:
48  QSpinBox* m_nbinsSpinBox;
49  QDoubleSpinBox* m_minimumSpinBox;
50  QDoubleSpinBox* m_maximumSpinBox;
52 };
53 
54 #endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALAXISEDITOR_H
The form for a spherical axis: contains the bare bone widgets for the user to enter the number of bin...
QDoubleSpinBox * m_maximumSpinBox
void setEnabled(bool enabled)
QDoubleSpinBox * m_minimumSpinBox
void setItem(BasicAxisItem *item)
BasicAxisItem * m_item
void onMaximumValueChanged(double value)
void onNbinsValueChanged(int value)
void onMinimumValueChanged(double value)
SphericalAxisForm(QFormLayout *form, QWidget *parent)
void updateData()
Reload UI from data.