19 #include <QStyleOption>
26 , m_left_path(QPainterPath())
27 , m_right_path(QPainterPath())
37 painter->setClipRect(
sceneAdapter()->viewportRectangle());
38 painter->setPen(
m_pen);
59 return path.boundingRect();
65 prepareGeometryChange();
72 prepareGeometryChange();
The interface of any QGraphicsViewItem on GraphicsScene to the Sceneadapter.
QPainterPath displayPath(QPainterPath real_path) const
modify the path for display according to the scene adapter
ModelView::SceneAdapterInterface * sceneAdapter() const
Get the conversion axes.
void setRightPath(QPainterPath right_path)
Set the draw path for the right side.
QRectF boundingRect() const override
The bounding rectangle of the handle.
void setBrush(QBrush brush)
Set the brush.
QPainterPath shape() const override
The shape.
void setPen(QPen pen)
Set the pen.
RoughnessElementView()
The constructor.
QPainterPath m_right_path
void setLeftPath(QPainterPath left_path)
Set the draw path for the left side.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
The overriden paint method.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.