BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The roughness QGraphicsViewItem. More...
Public Member Functions | |
RoughnessElementView () | |
The constructor. More... | |
void | adaptH (bool choice) |
Adapt the height. More... | |
void | adaptW (bool choice) |
Adapt the width. More... | |
void | adaptX (bool choice) |
Adapt the x position. More... | |
void | adaptY (bool choice) |
Adapt the y position. More... | |
void | advance (int phase) override |
Advance method used by the scene adapter. More... | |
QRectF | boundingRect () const override |
The bounding rectangle of the handle. More... | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
The overriden paint method. More... | |
ModelView::SceneAdapterInterface * | sceneAdapter () const |
Get the conversion axes. More... | |
void | setBrush (QBrush brush) |
Set the brush. More... | |
void | setCenterBased (bool choice) |
Adapt the dimensions according to the center. More... | |
void | setLeftPath (QPainterPath left_path) |
Set the draw path for the left side. More... | |
void | setPen (QPen pen) |
Set the pen. More... | |
void | setRightPath (QPainterPath right_path) |
Set the draw path for the right side. More... | |
QPainterPath | shape () const override |
The shape. More... | |
void | stretchLeft (bool choice) |
Stretch the rectangle to the left limit of the viewport. More... | |
void | stretchRight (bool choice) |
Stretch the rectangle to the right limit of the viewport. More... | |
Protected Member Functions | |
QPainterPath | displayPath (QPainterPath real_path) const |
modify the path for display according to the scene adapter More... | |
QRectF | displayRect (const QRectF &real_rect) const |
modify the rectangle for display according to the scene adapter More... | |
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
The hoover enter event. More... | |
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
The hoover exit event. More... | |
void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
The mouse press event. More... | |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
The mouse release event. More... | |
QPointF | scenePos (QPointF pixel_pos) const |
modify the rectangle for display according to the scene adapter More... | |
Protected Attributes | |
QBrush | m_brush |
QPainterPath | m_left_path |
QPen | m_pen |
QPainterPath | m_right_path |
Private Member Functions | |
QRectF | displayRectCenterBased (const QRectF &real_rect) const |
Helper function for displayRect based on the center of real_rect. More... | |
QRectF | displayRectEdgeBased (const QRectF &real_rect) const |
Helper function for displayRect based on the edge of real_rect. More... | |
QRectF | stretchRectLeft (const QRectF &real_rect) const |
Stretch the rectangle to the left limit of the viewport. More... | |
QRectF | stretchRectRight (const QRectF &real_rect) const |
Stretch the rectangle to the right limit of the viewport. More... | |
Private Attributes | |
bool | m_adapt_height = true |
bool | m_adapt_width = true |
bool | m_adapt_x = true |
bool | m_adapt_y = true |
bool | m_center_based = true |
bool | m_stretch_left = false |
bool | m_stretch_right = false |
The roughness QGraphicsViewItem.
Definition at line 28 of file roughnesselementview.h.
gui2::RoughnessElementView::RoughnessElementView | ( | ) |
The constructor.
Definition at line 24 of file roughnesselementview.cpp.
|
inherited |
Adapt the height.
Definition at line 217 of file elementview.cpp.
References gui2::ElementView::m_adapt_height.
Referenced by gui2::HandleElementView::HandleElementView().
|
inherited |
Adapt the width.
Definition at line 211 of file elementview.cpp.
References gui2::ElementView::m_adapt_width.
Referenced by gui2::HandleElementView::HandleElementView().
|
inherited |
Adapt the x position.
Definition at line 199 of file elementview.cpp.
References gui2::ElementView::m_adapt_x.
|
inherited |
Adapt the y position.
Definition at line 205 of file elementview.cpp.
References gui2::ElementView::m_adapt_y.
|
overrideinherited |
Advance method used by the scene adapter.
Definition at line 44 of file elementview.cpp.
|
override |
The bounding rectangle of the handle.
Definition at line 54 of file roughnesselementview.cpp.
References gui2::ElementView::displayPath(), m_left_path, and m_right_path.
|
protectedinherited |
modify the path for display according to the scene adapter
Definition at line 168 of file elementview.cpp.
References gui2::ElementView::sceneAdapter().
Referenced by boundingRect(), paint(), and shape().
|
protectedinherited |
modify the rectangle for display according to the scene adapter
Definition at line 60 of file elementview.cpp.
References gui2::ElementView::displayRectCenterBased(), gui2::ElementView::displayRectEdgeBased(), gui2::ElementView::m_center_based, gui2::ElementView::m_stretch_left, gui2::ElementView::m_stretch_right, gui2::ElementView::sceneAdapter(), gui2::ElementView::stretchRectLeft(), and gui2::ElementView::stretchRectRight().
Referenced by gui2::HandleElementView::boundingRect(), gui2::SegmentElementView::boundingRect(), gui2::HandleElementView::paint(), gui2::SegmentElementView::paint(), gui2::HandleElementView::shape(), and gui2::SegmentElementView::shape().
|
privateinherited |
Helper function for displayRect based on the center of real_rect.
Definition at line 84 of file elementview.cpp.
References gui2::ElementView::m_adapt_height, gui2::ElementView::m_adapt_width, gui2::ElementView::m_adapt_x, gui2::ElementView::m_adapt_y, and gui2::ElementView::sceneAdapter().
Referenced by gui2::ElementView::displayRect().
|
privateinherited |
Helper function for displayRect based on the edge of real_rect.
Definition at line 115 of file elementview.cpp.
References gui2::ElementView::m_adapt_height, gui2::ElementView::m_adapt_width, gui2::ElementView::m_adapt_x, gui2::ElementView::m_adapt_y, and gui2::ElementView::sceneAdapter().
Referenced by gui2::ElementView::displayRect().
|
overrideprotectedinherited |
The hoover enter event.
Definition at line 235 of file elementview.cpp.
|
overrideprotectedinherited |
The hoover exit event.
Definition at line 243 of file elementview.cpp.
|
overrideprotectedinherited |
The mouse press event.
Definition at line 250 of file elementview.cpp.
|
overrideprotectedinherited |
The mouse release event.
Definition at line 258 of file elementview.cpp.
|
override |
The overriden paint method.
Definition at line 35 of file roughnesselementview.cpp.
References gui2::ElementView::displayPath(), m_brush, m_left_path, m_pen, m_right_path, and gui2::ElementView::sceneAdapter().
|
inherited |
Get the conversion axes.
Definition at line 34 of file elementview.cpp.
References gui2::GraphicsScene::sceneAdapter().
Referenced by gui2::ElementView::displayPath(), gui2::ElementView::displayRect(), gui2::ElementView::displayRectCenterBased(), gui2::ElementView::displayRectEdgeBased(), gui2::ElementView::paint(), gui2::HandleElementView::paint(), paint(), gui2::SegmentElementView::paint(), gui2::ElementView::scenePos(), gui2::ElementView::stretchRectLeft(), and gui2::ElementView::stretchRectRight().
|
protectedinherited |
modify the rectangle for display according to the scene adapter
Definition at line 183 of file elementview.cpp.
References gui2::ElementView::sceneAdapter().
Referenced by gui2::HandleElementView::mouseMoveEvent(), and gui2::SegmentElementView::mouseMoveEvent().
void gui2::RoughnessElementView::setBrush | ( | QBrush | brush | ) |
Set the brush.
Definition at line 77 of file roughnesselementview.cpp.
References m_brush.
Referenced by gui2::LayerElementController::updateRoughness().
|
inherited |
Adapt the dimensions according to the center.
Definition at line 193 of file elementview.cpp.
References gui2::ElementView::m_center_based.
void gui2::RoughnessElementView::setLeftPath | ( | QPainterPath | left_path | ) |
Set the draw path for the left side.
Definition at line 63 of file roughnesselementview.cpp.
References m_left_path.
Referenced by gui2::LayerElementController::updateRoughness().
void gui2::RoughnessElementView::setPen | ( | QPen | pen | ) |
Set the pen.
Definition at line 83 of file roughnesselementview.cpp.
References m_pen.
Referenced by gui2::LayerElementController::updateRoughness().
void gui2::RoughnessElementView::setRightPath | ( | QPainterPath | right_path | ) |
Set the draw path for the right side.
Definition at line 70 of file roughnesselementview.cpp.
References m_right_path.
Referenced by gui2::LayerElementController::updateRoughness().
|
override |
The shape.
Definition at line 45 of file roughnesselementview.cpp.
References gui2::ElementView::displayPath(), m_left_path, and m_right_path.
|
inherited |
Stretch the rectangle to the left limit of the viewport.
Definition at line 223 of file elementview.cpp.
References gui2::ElementView::m_stretch_left.
|
privateinherited |
Stretch the rectangle to the left limit of the viewport.
Definition at line 140 of file elementview.cpp.
References gui2::ElementView::sceneAdapter(), and ModelView::SceneAdapterInterface::viewportRectangle().
Referenced by gui2::ElementView::displayRect().
|
privateinherited |
Stretch the rectangle to the right limit of the viewport.
Definition at line 154 of file elementview.cpp.
References gui2::ElementView::sceneAdapter(), and ModelView::SceneAdapterInterface::viewportRectangle().
Referenced by gui2::ElementView::displayRect().
|
inherited |
Stretch the rectangle to the right limit of the viewport.
Definition at line 229 of file elementview.cpp.
References gui2::ElementView::m_stretch_right.
|
privateinherited |
Definition at line 67 of file elementview.h.
Referenced by gui2::ElementView::adaptH(), gui2::ElementView::displayRectCenterBased(), and gui2::ElementView::displayRectEdgeBased().
|
privateinherited |
Definition at line 66 of file elementview.h.
Referenced by gui2::ElementView::adaptW(), gui2::ElementView::displayRectCenterBased(), and gui2::ElementView::displayRectEdgeBased().
|
privateinherited |
Definition at line 64 of file elementview.h.
Referenced by gui2::ElementView::adaptX(), gui2::ElementView::displayRectCenterBased(), and gui2::ElementView::displayRectEdgeBased().
|
privateinherited |
Definition at line 65 of file elementview.h.
Referenced by gui2::ElementView::adaptY(), gui2::ElementView::displayRectCenterBased(), and gui2::ElementView::displayRectEdgeBased().
|
protected |
Definition at line 43 of file roughnesselementview.h.
Referenced by paint(), and setBrush().
|
privateinherited |
Definition at line 63 of file elementview.h.
Referenced by gui2::ElementView::displayRect(), and gui2::ElementView::setCenterBased().
|
protected |
Definition at line 41 of file roughnesselementview.h.
Referenced by boundingRect(), paint(), setLeftPath(), and shape().
|
protected |
Definition at line 44 of file roughnesselementview.h.
|
protected |
Definition at line 42 of file roughnesselementview.h.
Referenced by boundingRect(), paint(), setRightPath(), and shape().
|
privateinherited |
Definition at line 68 of file elementview.h.
Referenced by gui2::ElementView::displayRect(), and gui2::ElementView::stretchLeft().
|
privateinherited |
Definition at line 69 of file elementview.h.
Referenced by gui2::ElementView::displayRect(), and gui2::ElementView::stretchRight().