BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
IntensityDataCanvas.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Plot2D/IntensityDataCanvas.h
6 //! @brief Defines class IntensityDataCanvas
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_PLOT2D_INTENSITYDATACANVAS_H
16 #define BORNAGAIN_GUI_VIEW_PLOT2D_INTENSITYDATACANVAS_H
17 
18 #include "Device/Data/Datafield.h"
20 #include <memory>
21 
22 class SessionItem;
23 class IntensityDataItem;
24 class ColorMapCanvas;
25 class QAction;
26 
27 //! The IntensityDataCanvas class represents IntensityDataItem as color map,
28 //! provides standard actions (reset view, save as) for external toolbars and context menus.
29 
31  Q_OBJECT
32 public:
33  explicit IntensityDataCanvas(QWidget* parent = nullptr);
34 
35  void setItem(SessionItem* intensityItem) override;
36 
37  QSize sizeHint() const override;
38  QSize minimumSizeHint() const override;
39 
40  QList<QAction*> actionList() override;
41 
42 public slots:
43  void onResetViewAction();
44  void onSavePlotAction();
45  void onMousePress(QMouseEvent* event);
46 
47 protected:
48  void subscribeToItem() override;
49  void rotateData();
50 
51 private:
53  void initActions();
54  void initRotation();
55  void onPropertyChanged(const QString& name);
57 
61  QAction* m_savePlotAction;
62 };
63 
64 #endif // BORNAGAIN_GUI_VIEW_PLOT2D_INTENSITYDATACANVAS_H
Defines class ItemComboWidget.
The ColorMapCanvas class contains ColorMap for intensity data presentation, and provide control of fo...
The IntensityDataCanvas class represents IntensityDataItem as color map, provides standard actions (r...
QSize minimumSizeHint() const override
void onMousePress(QMouseEvent *event)
IntensityDataCanvas(QWidget *parent=nullptr)
QSize sizeHint() const override
QList< QAction * > actionList() override
void setItem(SessionItem *intensityItem) override
void onPropertyChanged(const QString &name)
Reads gradient/ interpolation settings from IntensityDataItem and writes to persistant project settin...
void applyPersistentSettings()
Apply persistent settings (gradient, interpolation) to IntensityDataItem.
IntensityDataItem * intensityDataItem()
ColorMapCanvas * m_colorMap
void subscribeToItem() override
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
QString const & name(EShape k)
Definition: particles.cpp:20