BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ProjectionsEditor.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Projection/ProjectionsEditor.h
6 //! @brief Defines class ProjectionsEditor
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_PROJECTION_PROJECTIONSEDITOR_H
16 #define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITOR_H
17 
18 #include <QMainWindow>
19 
20 class SessionModel;
21 class QModelIndex;
22 class IntensityDataItem;
23 class ProjectionsToolbar;
25 class ProjectionsActions;
27 class ProjectionsWidget;
28 class QItemSelectionModel;
30 class SessionItemWidget;
31 
32 //! Editor to draw projections on top of intensity plot. Part of
33 
34 class ProjectionsEditor : public QMainWindow {
35  Q_OBJECT
36 
37 public:
38  ProjectionsEditor(SessionItemWidget* upperSessionItemWidget = nullptr,
39  QWidget* parent = nullptr);
40 
41  void setContext(SessionModel* model, const QModelIndex& shapeContainerIndex,
42  IntensityDataItem* intensityItem);
43 
44  void resetContext();
45 
46  QList<QAction*> topToolbarActions();
47 
48 private:
49  void setup_connections();
50 
52  ProjectionsToolbar* m_toolbar; //! main tool bar with bottoms at the right
53  ProjectionsEditorCanvas* m_projectionsCanvas; //! canvas with color map at the top
54  ProjectionsWidget* m_projectionsWidget; //! bottom widget to draw projections plot
55  IntensityDataPropertyWidget* m_propertyPanel; //! panel at the right with properties
56  QItemSelectionModel* m_selectionModel;
57 };
58 
59 #endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITOR_H
Widget to edit properties of an IntensityDataItem.
Provides various actions for ProjectionsEditor.
Holds a graphics scene to draw projections on top of ColorMap. Being a part of ProjectionEditor,...
Editor to draw projections on top of intensity plot. Part of.
ProjectionsEditorCanvas * m_projectionsCanvas
main tool bar with bottoms at the right
ProjectionsEditor(SessionItemWidget *upperSessionItemWidget=nullptr, QWidget *parent=nullptr)
void setContext(SessionModel *model, const QModelIndex &shapeContainerIndex, IntensityDataItem *intensityItem)
IntensityDataPropertyWidget * m_propertyPanel
bottom widget to draw projections plot
QItemSelectionModel * m_selectionModel
panel at the right with properties
ProjectionsToolbar * m_toolbar
ProjectionsEditorActions * m_editorActions
QList< QAction * > topToolbarActions()
ProjectionsWidget * m_projectionsWidget
canvas with color map at the top
Toolbar with projections buttons (horizontal projections, vertical projections, select,...
Holds tabs of vertical and horizontal projections, located at the bottom of ProjectionsEditor.
The SessionItemWidget class is a base for all widgets representing the content of SessionItem....
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
Definition: SessionModel.h:42