BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
statusstringreporter.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/statusstringreporter.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_STATUSSTRINGREPORTER_H
16 #define BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_STATUSSTRINGREPORTER_H
17 
18 #include "mvvm/view_export.h"
19 #include <functional>
20 #include <memory>
21 #include <string>
22 
23 class QCustomPlot;
24 
25 namespace ModelView {
26 
27 class StatusStringFormatterInterface;
28 
29 //! Reports back status string composed for current mouse position in QCustomPlot.
30 //! Doesn't report if cursor is outside of the axes range.
31 
32 class MVVM_VIEW_EXPORT StatusStringReporter {
33 public:
34  using callback_t = std::function<void(const std::string&)>;
35  StatusStringReporter(QCustomPlot* custom_plot, callback_t callback,
36  std::unique_ptr<StatusStringFormatterInterface> formatter);
38 
39 private:
41  std::unique_ptr<StatusStringReporterImpl> p_impl;
42 };
43 
44 } // namespace ModelView
45 
46 #endif // BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_STATUSSTRINGREPORTER_H
Reports back status string composed for current mouse position in QCustomPlot.
std::function< void(const std::string &)> callback_t
std::unique_ptr< StatusStringReporterImpl > p_impl
materialitems.h Collection of materials to populate MaterialModel.