BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
standardviewitems.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/viewmodel/standardviewitems.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_VIEWMODEL_STANDARDVIEWITEMS_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_STANDARDVIEWITEMS_H
17 
19 
20 namespace ModelView {
21 
22 class SessionItem;
23 
24 //! Represents root item.
25 
26 class MVVM_VIEWMODEL_EXPORT RootViewItem : public ViewItem {
27 public:
28  explicit RootViewItem(SessionItem* item);
29 };
30 
31 //! Represents empty cell of tree or table.
32 
33 class MVVM_VIEWMODEL_EXPORT ViewEmptyItem : public ViewItem {
34 public:
35  ViewEmptyItem();
36  QVariant data(int role) const override;
37 };
38 
39 //! Represents display name of SessionItem in any cell of Qt's trees and tables.
40 
41 class MVVM_VIEWMODEL_EXPORT ViewLabelItem : public ViewItem {
42 public:
43  explicit ViewLabelItem(SessionItem* item);
44 
45  QVariant data(int role) const override;
46 };
47 
48 //! Represents data role of SessionItem in any cell of Qt's trees and tables.
49 
50 class MVVM_VIEWMODEL_EXPORT ViewDataItem : public ViewItem {
51 public:
52  explicit ViewDataItem(SessionItem* item);
53 
54  Qt::ItemFlags flags() const override;
55 
56  QVariant data(int role) const override;
57 };
58 
59 } // namespace ModelView
60 
61 #endif // BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_STANDARDVIEWITEMS_H
Represents root item.
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
Represents data role of SessionItem in any cell of Qt's trees and tables.
Represents empty cell of tree or table.
Represents the view of SessionItem's data in a single cell of ViewModel.
Definition: viewitem.h:29
Represents display name of SessionItem in any cell of Qt's trees and tables.
materialitems.h Collection of materials to populate MaterialModel.
Defines class CLASS?