BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
experimentaldatamodel.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/model/experimentaldatamodel.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 Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_MODEL_EXPERIMENTALDATAMODEL_H
16 #define BORNAGAIN_GUI2_MODEL_EXPERIMENTALDATAMODEL_H
17 
18 #include "darefl_export.h"
20 #include <vector>
21 
22 namespace ModelView {
23 class SessionItem;
24 class GraphItem;
25 class GraphViewportItem;
26 } // namespace ModelView
27 
28 namespace gui2 {
29 
30 class CanvasContainerItem;
31 class ExperimentalDataContainerItem;
32 class CanvasItem;
33 struct GraphImportData;
34 
35 //! The model to store imported reflectometry data.
36 
37 class DAREFLCORE_EXPORT ExperimentalDataModel : public ModelView::SessionModel {
38 public:
39  ExperimentalDataModel(std::shared_ptr<ModelView::ItemPool> pool = {});
40 
41  CanvasContainerItem* canvasContainer() const;
42 
43  ExperimentalDataContainerItem* dataContainer() const;
44 
45  CanvasItem* addCanvas();
46 
47  ModelView::GraphItem* addGraph(const GraphImportData& graph_data, CanvasItem& target_canvas);
48 
49  void removeGraph(ModelView::GraphItem& graph);
50 
51  void removeCanvas(CanvasItem& canvas);
52 
53  void mergeCanvases(const std::vector<CanvasItem*>& canvases);
54 
55 private:
56  void init_model();
57 };
58 
59 } // namespace gui2
60 
61 #endif // BORNAGAIN_GUI2_MODEL_EXPERIMENTALDATAMODEL_H
One-dimensional graph representation of Data1DItem.
Definition: graphitem.h:29
Main class to hold hierarchy of SessionItem objects.
Definition: sessionmodel.h:37
Holds a collection of CanvasItem.
Holds a collection of GraphItem's for simultaneous plotting, as well as all information related to pl...
Holds a collection of Data1DItem's with raw data as imported by the user.
The model to store imported reflectometry data.
materialitems.h Collection of materials to populate MaterialModel.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20
Defines class CLASS?
Raw data to construct GraphItem and Data1DItem's.