BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ProjectionsEditorActions.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Projection/ProjectionsEditorActions.h
6 //! @brief Defines class ProjectionsEditorActions
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_PROJECTIONSEDITORACTIONS_H
16 #define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
17 
18 #include <QList>
19 #include <QModelIndex>
20 #include <QObject>
21 
22 class SessionModel;
23 class QItemSelectionModel;
24 class QAction;
25 class IntensityDataItem;
26 
27 //! Provides various actions for ProjectionsEditor.
28 
29 class ProjectionsEditorActions : public QObject {
30  Q_OBJECT
31 
32 public:
33  ProjectionsEditorActions(QWidget* parent = nullptr);
34 
35  void setContext(SessionModel* model, const QModelIndex& shapeContainerIndex,
36  IntensityDataItem* intensityItem);
37 
38  void setSelectionModel(QItemSelectionModel* selectionModel);
39 
40  QList<QAction*> topToolbarActions();
41 
42 public slots:
43  void onDeleteAction();
44  void onSaveAction();
45 
46 signals:
49 
50 private:
53  QAction* m_deleteAction;
55  QModelIndex m_containerIndex; //!< Index of container with projections
57  QItemSelectionModel* m_selectionModel;
58  QWidget* m_parent;
59 };
60 
61 #endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
Provides various actions for ProjectionsEditor.
void setContext(SessionModel *model, const QModelIndex &shapeContainerIndex, IntensityDataItem *intensityItem)
void setSelectionModel(QItemSelectionModel *selectionModel)
QList< QAction * > topToolbarActions()
IntensityDataItem * m_intensityDataItem
QModelIndex m_containerIndex
Index of container with projections.
ProjectionsEditorActions(QWidget *parent=nullptr)
void onSaveAction()
Performs saving of projections in ascii file.
QItemSelectionModel * m_selectionModel
Base class for a GUI data collection. A collection is e.g. all real data (RealDataModel)....
Definition: SessionModel.h:42