20 #ifndef LIBREPCB_EDITOR_LINEGRAPHICSITEM_H 21 #define LIBREPCB_EDITOR_LINEGRAPHICSITEM_H 63 void setLayer(
const std::shared_ptr<GraphicsLayer>& layer) noexcept;
67 QPainterPath
shape()
const noexcept
override;
68 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
69 QWidget* widget = 0) noexcept
override;
80 std::shared_ptr<GraphicsLayer>
mLayer;
void layerEdited(const GraphicsLayer &layer, GraphicsLayer::Event event) noexcept
Definition: linegraphicsitem.cpp:120
virtual ~LineGraphicsItem() noexcept
Definition: linegraphicsitem.cpp:54
QPainterPath mShape
Definition: linegraphicsitem.h:85
Definition: occmodel.cpp:77
std::shared_ptr< GraphicsLayer > mLayer
Definition: linegraphicsitem.h:80
void setLineWidth(const UnsignedLength &width) noexcept
Definition: linegraphicsitem.cpp:74
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
Definition: linegraphicsitem.cpp:104
QRectF boundingRect() const noexcept override
Definition: linegraphicsitem.h:66
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
QPen mPen
Definition: linegraphicsitem.h:81
void setLayer(const std::shared_ptr< GraphicsLayer > &layer) noexcept
Definition: linegraphicsitem.cpp:80
The GraphicsLayer class represents a graphical layer used in schematics and boards.
Definition: graphicslayer.h:53
QLineF mLine
Definition: linegraphicsitem.h:83
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:79
LineGraphicsItem & operator=(const LineGraphicsItem &rhs)=delete
LineGraphicsItem(const LineGraphicsItem &other)=delete
QPen mPenHighlighted
Definition: linegraphicsitem.h:82
void setRotation(const Angle &rot) noexcept
Definition: linegraphicsitem.cpp:65
The LineGraphicsItem class.
Definition: linegraphicsitem.h:50
void updateBoundingRectAndShape() noexcept
Definition: linegraphicsitem.cpp:142
void setPosition(const Point &pos) noexcept
Definition: linegraphicsitem.cpp:61
QPainterPath shape() const noexcept override
Definition: linegraphicsitem.cpp:100
Event
Definition: graphicslayer.h:58
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
Definition: linegraphicsitem.h:88
void setLine(const Point &p1, const Point &p2) noexcept
Definition: linegraphicsitem.cpp:69
QRectF mBoundingRect
Definition: linegraphicsitem.h:84
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696