BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
HistogramPlot.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/PlotComparison/HistogramPlot.h
6 //! @brief Defines class HistogramPlot
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_PLOTCOMPARISON_HISTOGRAMPLOT_H
16 #define BORNAGAIN_GUI_VIEW_PLOTCOMPARISON_HISTOGRAMPLOT_H
17 
18 #include <QWidget>
19 #include <qcustomplot.h>
20 
21 class HistogramPlot : public QWidget {
22  Q_OBJECT
23 public:
24  explicit HistogramPlot(QWidget* parent = nullptr);
25 
26 public slots:
27  void addData(double x, double y);
28  void addData(const QVector<double>& x, const QVector<double>& y);
29  void setData(const QVector<double>& x, const QVector<double>& y);
30  void clearData();
31 
32 private:
33  void initGraph();
34 
35  QCustomPlot* m_customPlot;
36 };
37 
38 #endif // BORNAGAIN_GUI_VIEW_PLOTCOMPARISON_HISTOGRAMPLOT_H
void addData(double x, double y)
QCustomPlot * m_customPlot
Definition: HistogramPlot.h:35
HistogramPlot(QWidget *parent=nullptr)
void setData(const QVector< double > &x, const QVector< double > &y)