BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
modellistener.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/model/mvvm/signals/modellistener.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_MODEL_MVVM_SIGNALS_MODELLISTENER_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_MODELLISTENER_H
17 
19 
20 namespace ModelView {
21 
22 class SessionItem;
23 
24 //! Templated class for all objects willing to listen for changes in concrete SessionModel.
25 
26 template <typename T> class ModelListener : public ModelListenerBase {
27 public:
28  ModelListener(T* session_model) : ModelListenerBase(session_model) {}
29 
30  T* model() const { return static_cast<T*>(m_model); }
31 };
32 
33 } // namespace ModelView
34 
35 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_MODELLISTENER_H
Provides sets of methods to subscribe to various signals generated by SessionModel.
Templated class for all objects willing to listen for changes in concrete SessionModel.
Definition: modellistener.h:26
ModelListener(T *session_model)
Definition: modellistener.h:28
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.