BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MaskDrawingContext.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/MaskWidgets/MaskDrawingContext.h
6 //! @brief Defines class MaskDrawingContext
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_MASKWIDGETS_MASKDRAWINGCONTEXT_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_MASKDRAWINGCONTEXT_H
17 
19 
20 //! Helper class for MaskGraphicsScene to hold drawing conditions
21 
23 public:
25 
26  MaskEditorFlags::Activity getActivityType() const;
27  void setActivityType(MaskEditorFlags::Activity value);
28  void setMaskValue(MaskEditorFlags::MaskValue value);
29 
30  bool isSelectionMode() const;
31  bool isInZoomMode() const;
32  bool isRectangleShapeMode() const;
33  bool isRectangleMode() const;
34  bool isEllipseMode() const;
35  bool isPolygonMode() const;
36  bool isLineMode() const;
37  bool isVerticalLineMode() const;
38  bool isHorizontalLineMode() const;
39  bool isMaskAllMode() const;
40  bool isROIMode() const;
41 
42  bool isDrawingInProgress() const;
43  void setDrawingInProgress(bool value);
44 
45  bool getMaskValue() const;
46 
47  bool isActivityRequiresDrawingCancel(MaskEditorFlags::Activity proposed_new_activity);
48 
49  QString activityToModelType() const;
50  int activityToRow() const;
51 
52 private:
53  MaskEditorFlags::Activity m_current_activity;
54  MaskEditorFlags::MaskValue m_mask_value;
56 };
57 
58 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_MASKDRAWINGCONTEXT_H
Defines class MaskEditorFlags.
Helper class for MaskGraphicsScene to hold drawing conditions.
QString activityToModelType() const
Returns model type corresponding to current activity.
MaskEditorFlags::MaskValue m_mask_value
int activityToRow() const
Returns model row corresponding to given activity.
void setDrawingInProgress(bool value)
MaskEditorFlags::Activity getActivityType() const
void setActivityType(MaskEditorFlags::Activity value)
bool isVerticalLineMode() const
bool isRectangleShapeMode() const
bool isActivityRequiresDrawingCancel(MaskEditorFlags::Activity proposed_new_activity)
return true, if proposed activity requires the cancel of drawing i.e.
bool isHorizontalLineMode() const
bool isRectangleMode() const
MaskEditorFlags::Activity m_current_activity
bool isDrawingInProgress() const
void setMaskValue(MaskEditorFlags::MaskValue value)
bool isSelectionMode() const