BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
PolygonPointView.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/PolygonPointView.h
6 //! @brief Defines PolygonPointView class
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_POLYGONPOINTVIEW_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_POLYGONPOINTVIEW_H
17 
19 
20 //! This is a View of polygon point for PolygonMaskItem
21 
23  Q_OBJECT
24 
25 public:
26  int type() const { return MaskEditorHelper::POLYGONPOINT; }
27 
29 
30  QRectF boundingRect() const;
31 
32  void updateParameterizedItem(const QPointF& pos);
33 
34 signals:
35  void closePolygonRequest(bool);
37 
38 protected slots:
39  virtual void update_view();
40  virtual void onPropertyChange(const QString&);
41 
42 protected:
43  void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*);
44  void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
45  void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
46  void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
47 
48 private:
49  bool m_on_hover;
50 };
51 
52 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_MASKWIDGETS_POLYGONPOINTVIEW_H
Defines interface IShape2DView.
Main interface class for views representing MaskItems, Projections on graphics scene.
Definition: IShape2DView.h:27
This is a View of polygon point for PolygonMaskItem.
virtual void update_view()
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
void closePolygonRequest(bool)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
QRectF boundingRect() const
void updateParameterizedItem(const QPointF &pos)
void propertyChanged()
virtual void onPropertyChange(const QString &)