20 #ifndef LIBREPCB_EDITOR_PRIMITIVETEXTGRAPHICSITEM_H 21 #define LIBREPCB_EDITOR_PRIMITIVETEXTGRAPHICSITEM_H 66 void setText(
const QString& text,
bool parseOverlines =
false) noexcept;
70 void setLayer(
const std::shared_ptr<GraphicsLayer>& layer) noexcept;
75 QPainterPath
shape()
const noexcept
override;
76 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option,
77 QWidget* widget = 0) noexcept
override;
89 std::shared_ptr<GraphicsLayer>
mLayer;
QVector< QLineF > mOverlines
Definition: primitivetextgraphicsitem.h:93
Alignment mAlignment
Definition: primitivetextgraphicsitem.h:95
void setPosition(const Point &pos) noexcept
Definition: primitivetextgraphicsitem.cpp:72
void setText(const QString &text, bool parseOverlines=false) noexcept
Definition: primitivetextgraphicsitem.cpp:89
QRectF boundingRect() const noexcept override
Definition: primitivetextgraphicsitem.h:74
PrimitiveTextGraphicsItem & operator=(const PrimitiveTextGraphicsItem &rhs)=delete
QString mText
Definition: primitivetextgraphicsitem.h:90
The Alignment class.
Definition: alignment.h:115
Definition: occmodel.cpp:77
bool mParseOverlines
Definition: primitivetextgraphicsitem.h:92
The PrimitiveTextGraphicsItem class is the graphical representation of a text.
Definition: primitivetextgraphicsitem.h:52
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
Definition: primitivetextgraphicsitem.h:106
QRectF mBoundingRect
Definition: primitivetextgraphicsitem.h:101
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
Definition: primitivetextgraphicsitem.cpp:155
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
void setShapeEnabled(bool enabled) noexcept
Definition: primitivetextgraphicsitem.h:71
QPainterPath shape() const noexcept override
Definition: primitivetextgraphicsitem.cpp:150
PositiveLength mHeight
Definition: primitivetextgraphicsitem.h:94
The GraphicsLayer class represents a graphical layer used in schematics and boards.
Definition: graphicslayer.h:53
Font
Definition: primitivetextgraphicsitem.h:55
void layerEdited(const GraphicsLayer &layer, GraphicsLayer::Event event) noexcept
Definition: primitivetextgraphicsitem.cpp:173
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:79
void setFont(Font font) noexcept
Definition: primitivetextgraphicsitem.cpp:111
bool mShapeEnabled
Definition: primitivetextgraphicsitem.h:103
QFont mFont
Definition: primitivetextgraphicsitem.h:97
QPen mPenHighlighted
Definition: primitivetextgraphicsitem.h:99
QPainterPath mShape
Definition: primitivetextgraphicsitem.h:102
std::shared_ptr< GraphicsLayer > mLayer
Definition: primitivetextgraphicsitem.h:89
int mTextFlags
Definition: primitivetextgraphicsitem.h:100
void setRotation(const Angle &rot) noexcept
Definition: primitivetextgraphicsitem.cpp:76
bool mRotate180
Definition: primitivetextgraphicsitem.h:96
QPen mPen
Definition: primitivetextgraphicsitem.h:98
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
QString mDisplayText
Definition: primitivetextgraphicsitem.h:91
void setLayer(const std::shared_ptr< GraphicsLayer > &layer) noexcept
Definition: primitivetextgraphicsitem.cpp:129
void setHeight(const PositiveLength &height) noexcept
Definition: primitivetextgraphicsitem.cpp:98
Event
Definition: graphicslayer.h:58
void updateBoundingRectAndShape() noexcept
Definition: primitivetextgraphicsitem.cpp:196
PrimitiveTextGraphicsItem(const PrimitiveTextGraphicsItem &other)=delete
void setAlignment(const Alignment &align) noexcept
Definition: primitivetextgraphicsitem.cpp:106
~PrimitiveTextGraphicsItem() noexcept
Definition: primitivetextgraphicsitem.cpp:65