BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
rowstrategyinterface.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/interfaces/rowstrategyinterface.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_INTERFACES_ROWSTRATEGYINTERFACE_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_ROWSTRATEGYINTERFACE_H
17 
18 #include "mvvm/viewmodel_export.h"
19 #include <QStringList>
20 #include <memory>
21 #include <vector>
22 
23 namespace ModelView {
24 
25 class SessionItem;
26 class ViewItem;
27 
28 //! Base class to construct row of ViewItem's from given SessionItem.
29 //! Used in context of AbstractViewModel while exposing SessionModel to Qt.
30 
31 class MVVM_VIEWMODEL_EXPORT RowStrategyInterface {
32 public:
33  virtual ~RowStrategyInterface() = default;
34 
35  virtual QStringList horizontalHeaderLabels() const = 0;
36 
37  virtual std::vector<std::unique_ptr<ViewItem>> constructRow(SessionItem*) = 0;
38 };
39 
40 } // namespace ModelView
41 
42 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_INTERFACES_ROWSTRATEGYINTERFACE_H
Base class to construct row of ViewItem's from given SessionItem.
virtual QStringList horizontalHeaderLabels() const =0
virtual ~RowStrategyInterface()=default
virtual std::vector< std::unique_ptr< ViewItem > > constructRow(SessionItem *)=0
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
materialitems.h Collection of materials to populate MaterialModel.