BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
mvvm_types.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/model/mvvm_types.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_MODEL_MVVM_TYPES_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_MODEL_MVVM_TYPES_H
17 
18 #include "mvvm/core/types.h"
19 #include <string>
20 
21 namespace ModelView {
22 
23 class SessionItem;
24 class SessionModel;
25 
26 //! Defines constants to be used as SessionItem data role.
27 
28 namespace ItemDataRole {
29 const int IDENTIFIER = 0; //!< unique identifier
30 const int DATA = 1; //!< main data role
31 const int DISPLAY = 2; //!< display name
32 const int APPEARANCE = 3; //!< appearance flag
33 const int LIMITS = 4; //!< possibly limits on item's data
34 const int TOOLTIP = 5; //!< tooltip for item's data
35 const int EDITORTYPE = 6; //!< type of custom editor for the data role
36 } // namespace ItemDataRole
37 
38 enum Appearance {
39  NOFLAGS = 0x000,
40  ENABLED = 0x001, // enabled in Qt widgets; when disabled, will be shown in gray
41  EDITABLE = 0x002 // editable in Qt widgets; readonly otherwise
42 };
43 
44 namespace Constants {
45 const model_type BaseType = "SessionItem";
46 const model_type ColorMapItemType = "ColorMap";
47 const model_type ColorMapViewportItemType = "ColorMapViewport";
48 const model_type CompoundItemType = "Compound";
49 const model_type ContainerItemType = "Container";
50 const model_type Data1DItemType = "Data1D";
51 const model_type Data2DItemType = "Data2D";
52 const model_type FixedBinAxisItemType = "FixedBinAxis";
53 const model_type GraphItemType = "Graph";
54 const model_type GraphViewportItemType = "GraphViewport";
55 const model_type GroupItemType = "Group";
56 const model_type LinkedItemType = "Linked";
57 const model_type PenItemType = "Pen";
58 const model_type PointwiseAxisItemType = "PointwiseAxis";
59 const model_type PropertyType = "Property";
60 const model_type TextItemType = "Text";
61 const model_type VectorItemType = "Vector";
62 const model_type ViewportAxisItemType = "ViewportAxis";
63 } // namespace Constants
64 
65 } // namespace ModelView
66 
67 #endif // BORNAGAIN_MVVM_MODEL_MVVM_MODEL_MVVM_TYPES_H
const model_type TextItemType
Definition: mvvm_types.h:60
const model_type GraphViewportItemType
Definition: mvvm_types.h:54
const model_type PropertyType
Definition: mvvm_types.h:59
const model_type LinkedItemType
Definition: mvvm_types.h:56
const model_type BaseType
Definition: mvvm_types.h:45
const model_type ContainerItemType
Definition: mvvm_types.h:49
const model_type Data1DItemType
Definition: mvvm_types.h:50
const model_type PenItemType
Definition: mvvm_types.h:57
const model_type Data2DItemType
Definition: mvvm_types.h:51
const model_type CompoundItemType
Definition: mvvm_types.h:48
const model_type FixedBinAxisItemType
Definition: mvvm_types.h:52
const model_type ColorMapItemType
Definition: mvvm_types.h:46
const model_type ColorMapViewportItemType
Definition: mvvm_types.h:47
const model_type VectorItemType
Definition: mvvm_types.h:61
const model_type GraphItemType
Definition: mvvm_types.h:53
const model_type ViewportAxisItemType
Definition: mvvm_types.h:62
const model_type PointwiseAxisItemType
Definition: mvvm_types.h:58
const model_type GroupItemType
Definition: mvvm_types.h:55
const int TOOLTIP
tooltip for item's data
Definition: mvvm_types.h:34
const int EDITORTYPE
type of custom editor for the data role
Definition: mvvm_types.h:35
const int DATA
main data role
Definition: mvvm_types.h:30
const int APPEARANCE
appearance flag
Definition: mvvm_types.h:32
const int LIMITS
possibly limits on item's data
Definition: mvvm_types.h:33
const int DISPLAY
display name
Definition: mvvm_types.h:31
const int IDENTIFIER
unique identifier
Definition: mvvm_types.h:29
materialitems.h Collection of materials to populate MaterialModel.
std::string model_type
Definition: types.h:23
Defines class CLASS?