BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
graphinfoformatter.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/view/mvvm/plotting/graphinfoformatter.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_VIEW_MVVM_PLOTTING_GRAPHINFOFORMATTER_H
16 #define BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_GRAPHINFOFORMATTER_H
17 
19 
20 class QCustomPlot;
21 
22 namespace ModelView {
23 
24 //! Formats status string for current mouse position in QCustomPlot with QCPGraph's.
25 //! Includes coordinates of mouse pointer in viewport axes coordinates, add graph info if there is
26 //! one nearby.
27 
28 class MVVM_VIEW_EXPORT GraphInfoFormatter : public StatusStringFormatterInterface {
29 public:
30  //! Returns status string representing graph nearby.
31  //! @params x: mouse x-position given in axis viewport coordinates
32  //! @params y: mouse y-position given in axis viewport coordinates
33  std::string status_string(QCustomPlot* custom_plot, double x, double y) const override;
34 };
35 
36 } // namespace ModelView
37 
38 #endif // BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_GRAPHINFOFORMATTER_H
Formats status string for current mouse position in QCustomPlot with QCPGraph's.
Pure virtual interface to format string with status info corresponding to the current mouse position ...
materialitems.h Collection of materials to populate MaterialModel.