BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
materialpropertycontroller.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/model/materialpropertycontroller.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 Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_MODEL_MATERIALPROPERTYCONTROLLER_H
16 #define BORNAGAIN_GUI2_MODEL_MATERIALPROPERTYCONTROLLER_H
17 
18 #include "darefl_export.h"
20 
21 namespace gui2 {
22 
23 class SampleModel;
24 class MaterialModel;
25 
26 //! Listens for all changes in material model and updates properties in SampleModel.
27 
28 class DAREFLCORE_EXPORT MaterialPropertyController
29  : public ModelView::ModelListener<MaterialModel> {
30 public:
31  MaterialPropertyController(MaterialModel* material_model, SampleModel* sample_model);
32 
33 private:
34  void update_all();
35 
36  SampleModel* m_sample_model{nullptr};
37 };
38 
39 } // namespace gui2
40 
41 #endif // BORNAGAIN_GUI2_MODEL_MATERIALPROPERTYCONTROLLER_H
Templated class for all objects willing to listen for changes in concrete SessionModel.
Definition: modellistener.h:26
Main model to hold sample items.
Definition: SampleModel.h:24
Model to hold MaterialItems.
Definition: materialmodel.h:35
Listens for all changes in material model and updates properties in SampleModel.
Model to hold layers and multi-layers.
Definition: samplemodel.h:24
Defines class CLASS?
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20