BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
integereditor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/viewmodel/mvvm/editors/integereditor.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_INTEGEREDITOR_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_INTEGEREDITOR_H
17 
19 
20 class QSpinBox;
21 
22 namespace ModelView {
23 
24 //! Custom editor for QVariant based on integer with possibility to set limits.
25 
26 class MVVM_VIEWMODEL_EXPORT IntegerEditor : public CustomEditor {
27  Q_OBJECT
28 
29 public:
30  explicit IntegerEditor(QWidget* parent = nullptr);
31 
32  void setRange(int minimum, int maximum);
33 
34 private slots:
35  void onEditingFinished();
36 
37 private:
38  void update_components() override;
39  QSpinBox* m_intEditor;
40 };
41 
42 } // namespace ModelView
43 
44 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_INTEGEREDITOR_H
Base class for all custom variant editors.
Definition: customeditor.h:26
Custom editor for QVariant based on integer with possibility to set limits.
Definition: integereditor.h:26
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.