20 #ifndef LIBREPCB_CORE_TEXT_H 21 #define LIBREPCB_CORE_TEXT_H 26 #include "../serialization/serializableobjectlist.h" 27 #include "../types/alignment.h" 28 #include "../types/angle.h" 29 #include "../types/length.h" 30 #include "../types/point.h" 49 Q_DECLARE_TR_FUNCTIONS(
Text)
69 Text(
const Uuid& uuid,
const Layer& layer,
const QString& text,
86 bool setText(
const QString& text) noexcept;
121 static constexpr
const char* tagname =
"text";
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: text.cpp:146
bool operator==(const Text &rhs) const noexcept
Definition: text.cpp:162
bool setAlign(const Alignment &align) noexcept
Definition: text.cpp:132
Alignment mAlign
Definition: text.h:113
Uuid mUuid
Definition: text.h:107
The Alignment class.
Definition: alignment.h:115
PositiveLength mHeight
Definition: text.h:112
bool setLayer(const Layer &layer) noexcept
Definition: text.cpp:82
Definition: occmodel.cpp:76
The Layer class provides all supported geometry layers.
Definition: layer.h:40
const PositiveLength & getHeight() const noexcept
Definition: text.h:80
~Text() noexcept
Definition: text.cpp:75
bool setText(const QString &text) noexcept
Definition: text.cpp:92
bool setHeight(const PositiveLength &height) noexcept
Definition: text.cpp:122
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:76
bool setPosition(const Point &pos) noexcept
Definition: text.cpp:102
const Alignment & getAlign() const noexcept
Definition: text.h:81
const Layer * mLayer
Definition: text.h:108
const Point & getPosition() const noexcept
Definition: text.h:78
Event
Definition: text.h:53
Text & operator=(const Text &rhs) noexcept
Definition: text.cpp:173
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:78
bool operator!=(const Text &rhs) const noexcept
Definition: text.h:103
Slot< Text, Event > OnEditedSlot
Definition: text.h:63
const QString & getText() const noexcept
Definition: text.h:82
Point mPosition
Definition: text.h:110
bool setRotation(const Angle &rotation) noexcept
Definition: text.cpp:112
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
const Uuid & getUuid() const noexcept
Definition: text.h:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:785
QString mText
Definition: text.h:109
const Angle & getRotation() const noexcept
Definition: text.h:79
The Text class.
Definition: text.h:48
const Layer & getLayer() const noexcept
Definition: text.h:77
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:56
Angle mRotation
Definition: text.h:111
The SExpression class.
Definition: sexpression.h:66
Signal< Text, Event > onEdited
Definition: text.h:62