BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
MaskEditorToolbar.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Mask/MaskEditorToolbar.h
6 //! @brief Defines class MaskEditorToolbar
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_MASK_MASKEDITORTOOLBAR_H
16 #define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORTOOLBAR_H
17 
19 #include <QToolBar>
20 
21 class MaskEditorActions;
22 class QButtonGroup;
23 
24 //! Main class to draw masks on top of intensity data map
25 
26 class MaskEditorToolbar : public QToolBar {
27  Q_OBJECT
28 public:
29  MaskEditorToolbar(MaskEditorActions* editorActions, QWidget* parent = nullptr);
30 
31 signals:
32  void activityModeChanged(MaskEditorFlags::Activity);
33  void presentationTypeRequest(MaskEditorFlags::PresentationType);
34  void maskValueChanged(MaskEditorFlags::MaskValue);
35 
36 public slots:
37  void onChangeActivityRequest(MaskEditorFlags::Activity value);
38 
39 private slots:
40  void onActivityGroupChange(int value);
41  void onMaskValueGroupChange(int value);
44 
45 private:
46  void setup_selection_group();
47  void setup_maskvalue_group();
48  void setup_shapes_group();
51  void add_separator();
52 
53  MaskEditorFlags::Activity currentActivity() const;
54  void setCurrentActivity(MaskEditorFlags::Activity value);
55 
57  QButtonGroup* m_activityButtonGroup;
58  QButtonGroup* m_maskValueGroup;
59  MaskEditorFlags::Activity m_previousActivity;
60 };
61 
62 #endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORTOOLBAR_H
Defines class MaskEditorFlags.
Defines actions for MaskEditor which are related to selected MaskItem (toggle mask value,...
Main class to draw masks on top of intensity data map.
void maskValueChanged(MaskEditorFlags::MaskValue)
QButtonGroup * m_activityButtonGroup
void setCurrentActivity(MaskEditorFlags::Activity value)
MaskEditorActions * m_editorActions
MaskEditorFlags::Activity currentActivity() const
MaskEditorFlags::Activity m_previousActivity
void onMaskValueGroupChange(int value)
void activityModeChanged(MaskEditorFlags::Activity)
void onChangeActivityRequest(MaskEditorFlags::Activity value)
Handles ZOOM requests from MaskGraphicsView while user press and holds space bar. As soon as space ba...
void onActivityGroupChange(int value)
QButtonGroup * m_maskValueGroup
MaskEditorToolbar(MaskEditorActions *editorActions, QWidget *parent=nullptr)
void presentationTypeRequest(MaskEditorFlags::PresentationType)