BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
data2ditem.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/standarditems/data2ditem.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_STANDARDITEMS_DATA2DITEM_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_DATA2DITEM_H
17 
19 #include <vector>
20 
21 namespace ModelView {
22 
23 class BinnedAxisItem;
24 
25 //! Represents two-dimensional data (axes definition and 2d array of values).
26 //! Values are stored in Data2DItem itself, axes are attached as children. Corresponding plot
27 //! properties will be served by ColorMapItem.
28 
29 class MVVM_MODEL_EXPORT Data2DItem : public CompoundItem {
30 public:
31  static inline const std::string T_XAXIS = "T_XAXIS";
32  static inline const std::string T_YAXIS = "T_YAXIS";
33 
34  Data2DItem();
35 
36  void setAxes(std::unique_ptr<BinnedAxisItem> x_axis, std::unique_ptr<BinnedAxisItem> y_axis);
37 
38  BinnedAxisItem* xAxis() const;
39 
40  BinnedAxisItem* yAxis() const;
41 
42  void setContent(const std::vector<double>& data);
43 
44  std::vector<double> content() const;
45 
46 private:
47  void insert_axis(std::unique_ptr<BinnedAxisItem> axis, const std::string& tag);
48 };
49 
50 } // namespace ModelView
51 
52 #endif // BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_DATA2DITEM_H
Item to represent an axis with arbitrary binning.
Definition: axisitems.h:61
Complex item holding mixed SessionItem types (single properties and other CompountItems).
Definition: compounditem.h:28
Represents two-dimensional data (axes definition and 2d array of values).
Definition: data2ditem.h:29
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.