BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
roughnesselementview.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/sldeditor/roughnesselementview.h
6 //! @brief Defines class 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 2020
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_SLDEDITOR_ROUGHNESSELEMENTVIEW_H
16 #define BORNAGAIN_GUI2_SLDEDITOR_ROUGHNESSELEMENTVIEW_H
17 
18 #include "darefl_export.h"
20 
21 #include <QBrush>
22 #include <QPainterPath>
23 #include <QPen>
24 
25 namespace gui2 {
26 
27 //! The roughness QGraphicsViewItem
28 class DAREFLCORE_EXPORT RoughnessElementView : public ElementView {
29 public:
31  QRectF boundingRect() const override;
32  QPainterPath shape() const override;
33  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
34 
35  void setLeftPath(QPainterPath left_path);
36  void setRightPath(QPainterPath right_path);
37  void setBrush(QBrush brush);
38  void setPen(QPen pen);
39 
40 protected:
41  QPainterPath m_left_path;
42  QPainterPath m_right_path;
43  QBrush m_brush;
44  QPen m_pen;
45 };
46 
47 } // namespace gui2
48 
49 #endif // BORNAGAIN_GUI2_SLDEDITOR_ROUGHNESSELEMENTVIEW_H
The interface of any QGraphicsViewItem on GraphicsScene to the Sceneadapter.
Definition: elementview.h:26
The roughness QGraphicsViewItem.
Defines class CLASS?
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20