BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
mockinterfaces.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/tests/libtestmachinery/mockinterfaces.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_TESTS_LIBTESTMACHINERY_MOCKINTERFACES_H
16 #define BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_MOCKINTERFACES_H
17 
18 #include "mvvm/model/tagrow.h"
19 #include <string>
20 
21 //! Various common utils for unit tests.
22 
23 namespace ModelView {
24 class SessionItem;
25 class SessionModel;
26 } // namespace ModelView
27 
28 //! Interface for testing callbacks comming from SessionItem within gmock framework.
29 
31 public:
32  virtual ~ItemTestWidgetInterface() = default;
33 
34  virtual void onItemDestroy(ModelView::SessionItem* item) = 0;
35  virtual void onDataChange(ModelView::SessionItem* item, int role) = 0;
36  virtual void onPropertyChange(ModelView::SessionItem* item, std::string name) = 0;
39 };
40 
41 //! Interface for testing callbacks comming from SessionModel within gmock framework.
42 
44 public:
45  virtual ~ModelTestWidgetInterface() = default;
46 
50  virtual void onDataChange(ModelView::SessionItem*, int) = 0;
54 };
55 
56 #endif // BORNAGAIN_MVVM_TESTS_LIBTESTMACHINERY_MOCKINTERFACES_H
Interface for testing callbacks comming from SessionItem within gmock framework.
virtual void onDataChange(ModelView::SessionItem *item, int role)=0
virtual void onItemDestroy(ModelView::SessionItem *item)=0
virtual void onItemInserted(ModelView::SessionItem *item, ModelView::TagRow)=0
virtual ~ItemTestWidgetInterface()=default
virtual void onPropertyChange(ModelView::SessionItem *item, std::string name)=0
virtual void onAboutToRemoveItem(ModelView::SessionItem *item, ModelView::TagRow)=0
Interface for testing callbacks comming from SessionModel within gmock framework.
virtual void onModelAboutToBeReset(ModelView::SessionModel *)=0
virtual void onDataChange(ModelView::SessionItem *, int)=0
virtual void onItemRemoved(ModelView::SessionItem *, ModelView::TagRow)=0
virtual ~ModelTestWidgetInterface()=default
virtual void onModelDestroyed(ModelView::SessionModel *)=0
virtual void onItemInserted(ModelView::SessionItem *, ModelView::TagRow)=0
virtual void onAboutToRemoveItem(ModelView::SessionItem *, ModelView::TagRow)=0
virtual void onModelReset(ModelView::SessionModel *)=0
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
Aggregate to hold (tag, row) information for SessionModel.
Definition: tagrow.h:25
materialitems.h Collection of materials to populate MaterialModel.
QString const & name(EShape k)
Definition: particles.cpp:21
Defines class CLASS?