BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
ProjectionsToolbar.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Projection/ProjectionsToolbar.h
6 //! @brief Defines class ProjectionsToolbar
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_PROJECTIONSTOOLBAR_H
16 #define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSTOOLBAR_H
17 
19 #include <QToolBar>
20 
22 class QButtonGroup;
23 
24 //! Toolbar with projections buttons (horizontal projections, vertical projections, select, zoom)
25 //! located at the right-hand side of ProjectionsEditor (part of JobProjectionsWidget).
26 
27 class ProjectionsToolbar : public QToolBar {
28  Q_OBJECT
29 
30 public:
31  ProjectionsToolbar(ProjectionsEditorActions* editorActions, QWidget* parent = nullptr);
32 
33 public slots:
34  void onChangeActivityRequest(MaskEditorFlags::Activity value);
35  void onProjectionTabChange(MaskEditorFlags::Activity value);
36 
37 signals:
38  void activityModeChanged(MaskEditorFlags::Activity);
39 
40 private slots:
41  void onActivityGroupChange(int);
42 
43 private:
44  void setup_selection_group();
45  void setup_shapes_group();
47  void add_separator();
48  MaskEditorFlags::Activity currentActivity() const;
49  void setCurrentActivity(MaskEditorFlags::Activity value);
50 
52  QButtonGroup* m_activityButtonGroup;
53  MaskEditorFlags::Activity m_previousActivity;
54 };
55 
56 #endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSTOOLBAR_H
Defines class MaskEditorFlags.
Provides various actions for ProjectionsEditor.
Toolbar with projections buttons (horizontal projections, vertical projections, select,...
ProjectionsEditorActions * m_editorActions
MaskEditorFlags::Activity currentActivity() const
void setCurrentActivity(MaskEditorFlags::Activity value)
void activityModeChanged(MaskEditorFlags::Activity)
void onProjectionTabChange(MaskEditorFlags::Activity value)
Change activity only if current activity is one of drawing mode (horizontal, vertical projections dra...
QButtonGroup * m_activityButtonGroup
MaskEditorFlags::Activity m_previousActivity
void onChangeActivityRequest(MaskEditorFlags::Activity value)
ProjectionsToolbar(ProjectionsEditorActions *editorActions, QWidget *parent=nullptr)