BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularDataCanvas.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/PlotSpecular/SpecularDataCanvas.h
6 //! @brief Defines class SpecularDataCanvas
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_PLOTSPECULAR_SPECULARDATACANVAS_H
16 #define BORNAGAIN_GUI_VIEW_PLOTSPECULAR_SPECULARDATACANVAS_H
17 
19 #include <QWidget>
20 
21 class SpecularDataItem;
22 class SpecularPlotCanvas;
23 class QCustomPlot;
24 
26  Q_OBJECT
27 public:
28  explicit SpecularDataCanvas(QWidget* parent = nullptr);
29 
30  void setItem(SessionItem* intensityItem) override;
31 
32  QSize sizeHint() const override;
33  QSize minimumSizeHint() const override;
34 
35  QList<QAction*> actionList() override;
36  QCustomPlot* customPlot();
37 
38  //! Enable or disable the onMousePress() handler.
39  //! For legacy reasons the onMousePress handler is enabled.
40  //! It is deprecated because of:
41  //! * mousepress is the wrong event to listen to for opening a context menu
42  //! * disables possibility to get context menu events for specific parts of the plot (e.g.
43  //! context menu for axis configuration)
44  void enableDeprecatedOnMousePress(bool b);
45 
46  void initScatter();
47 public slots:
48  void onResetViewAction();
49  void onSavePlotAction();
50  void onMousePress(QMouseEvent* event);
51 
52 private:
54  void initActions();
55 
59 };
60 
61 #endif // BORNAGAIN_GUI_VIEW_PLOTSPECULAR_SPECULARDATACANVAS_H
Defines class ItemComboWidget.
The SessionItemWidget class is a base for all widgets representing the content of SessionItem....
Base class for a GUI data item.
Definition: SessionItem.h:204
void setItem(SessionItem *intensityItem) override
QList< QAction * > actionList() override
SpecularPlotCanvas * m_plot_canvas
void onMousePress(QMouseEvent *event)
QSize minimumSizeHint() const override
SpecularDataCanvas(QWidget *parent=nullptr)
QCustomPlot * customPlot()
SpecularDataItem * specularDataItem()
void enableDeprecatedOnMousePress(bool b)
Enable or disable the onMousePress() handler. For legacy reasons the onMousePress handler is enabled....
QSize sizeHint() const override
The SpecularPlotCanvas class contains SpecularPlot for specular data presentation,...