BornAgain  1.19.0
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/coregui/Views/IntensityDataWidgets/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_COREGUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
17 
18 #include "Device/Data/OutputData.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 = 0);
34 
35  void setItem(SessionItem* intensityItem);
36 
37  QSize sizeHint() const;
38  QSize minimumSizeHint() const;
39 
40  QList<QAction*> actionList();
41 
42 public slots:
43  void onResetViewAction();
44  void onSavePlotAction();
45  void onMousePress(QMouseEvent* event);
46 
47 protected:
48  void subscribeToItem();
49 
50 private:
52  void initActions();
53  void onPropertyChanged(const QString& name);
55 
58  QAction* m_savePlotAction;
59 };
60 
61 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
Defines and implements templated class OutputData.
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...
IntensityDataCanvas(QWidget *parent=0)
void setItem(SessionItem *intensityItem)
QList< QAction * > actionList()
void onMousePress(QMouseEvent *event)
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
The SessionItemWidget class is a base for all widgets representing the content of SessionItem.
QString const & name(EShape k)
Definition: particles.cpp:21