BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
itemlistener.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/itemlistener.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_ITEMLISTENER_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_ITEMLISTENER_H
17 
19 
20 namespace ModelView {
21 
22 class SessionItem;
23 
24 //! Base class to subscribe to signals generated by SessionItem of certin type.
25 
26 template <typename T> class ItemListener : public ItemListenerBase {
27 public:
28  T* currentItem() const { return static_cast<T*>(item()); }
29 };
30 
31 } // namespace ModelView
32 
33 #endif // BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_ITEMLISTENER_H
Provides sets of methods to subscribe to various signals generated by SessionItem.
SessionItem * item() const
For necessary manipulations on unsubscription.
Base class to subscribe to signals generated by SessionItem of certin type.
Definition: itemlistener.h:26
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.