BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
booleditor.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/booleditor.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_BOOLEDITOR_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_BOOLEDITOR_H
17 
19 
20 class QCheckBox;
21 
22 namespace ModelView {
23 
24 //! Custom editor for QVariant based on bool values.
25 
26 class MVVM_VIEWMODEL_EXPORT BoolEditor : public CustomEditor {
27  Q_OBJECT
28 
29 public:
30  explicit BoolEditor(QWidget* parent = nullptr);
31 
32  bool is_persistent() const override;
33 
34 private slots:
35  void onCheckBoxChange(bool value);
36 
37 private:
38  void update_components() override;
39  QCheckBox* m_checkBox;
40 };
41 
42 } // namespace ModelView
43 
44 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_EDITORS_BOOLEDITOR_H
Custom editor for QVariant based on bool values.
Definition: booleditor.h:26
QCheckBox * m_checkBox
Definition: booleditor.h:39
Base class for all custom variant editors.
Definition: customeditor.h:26
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.