BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
graphviewportitem.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/graphviewportitem.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_GRAPHVIEWPORTITEM_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_GRAPHVIEWPORTITEM_H
17 
19 
20 namespace ModelView {
21 
22 class GraphItem;
23 
24 //! 2D viewport specialized for showing multiple GraphItem's.
25 //! Provides calculation of viewport's x-axis and y-axis range basing on GraphItem data.
26 //! Provides functionality to hide selected graphs.
27 
28 class MVVM_MODEL_EXPORT GraphViewportItem : public ViewportItem {
29 public:
31 
32  std::vector<GraphItem*> graphItems() const;
33 
34  std::vector<GraphItem*> visibleGraphItems() const;
35 
36  void setVisible(const std::vector<GraphItem*>& visible_graph_items);
37 
38  void setAllVisible();
39 
40 protected:
41  std::pair<double, double> data_xaxis_range() const override;
42  std::pair<double, double> data_yaxis_range() const override;
43 };
44 
45 } // namespace ModelView
46 
47 #endif // BORNAGAIN_MVVM_MODEL_MVVM_STANDARDITEMS_GRAPHVIEWPORTITEM_H
2D viewport specialized for showing multiple GraphItem's.
Base class to represent 2D viewport.
Definition: viewportitem.h:27
const model_type GraphViewportItemType
Definition: mvvm_types.h:54
materialitems.h Collection of materials to populate MaterialModel.
std::string model_type
Definition: types.h:23
Defines class CLASS?