BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RegionOfInterestView.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/MaskWidgets/RegionOfInterestView.cpp
6 //! @brief Defines RegionOfInterestView 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 
16 #include <QPainter>
17 
18 //! Paints two-color tiny frame without filling.
19 
20 void RegionOfInterestView::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*)
21 {
22  painter->setPen(QPen(QColor(34, 67, 255)));
23  painter->drawRect(m_mask_rect);
24 
25  QRectF secondRect = m_mask_rect.marginsAdded(QMarginsF(1, 1, 1, 1));
26  painter->setPen(QPen(QColor(255, 255, 245)));
27  painter->drawRect(secondRect);
28 }
Defines RegionOfInterestView class.
QRectF m_mask_rect
mask rectangle in scene coordinates
void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
Paints two-color tiny frame without filling.