20#ifndef LIBREPCB_CORE_STROKETEXT_H
21#define LIBREPCB_CORE_STROKETEXT_H
26#include "../geometry/path.h"
27#include "../serialization/serializableobjectlist.h"
28#include "../types/alignment.h"
29#include "../types/angle.h"
30#include "../types/length.h"
31#include "../types/point.h"
32#include "../types/stroketextspacing.h"
82 bool mirrored,
bool autoRotate)
noexcept;
105 const QString& text)
const noexcept;
109 bool setText(
const QString& text)
noexcept;
132 return !(*
this == rhs);
156 static constexpr const char*
tagname =
"stroke_text";
The Alignment class.
Definition: alignment.h:115
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
The Layer class provides all supported geometry layers.
Definition: layer.h:42
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The SExpression class.
Definition: sexpression.h:69
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
The StrokeFont class.
Definition: strokefont.h:56
The StrokeText class.
Definition: stroketext.h:51
bool getMirrored() const noexcept
Definition: stroketext.h:100
bool setText(const QString &text) noexcept
Definition: stroketext.cpp:132
const Angle & getRotation() const noexcept
Definition: stroketext.h:90
Slot< StrokeText, Event > OnEditedSlot
Definition: stroketext.h:71
bool setPosition(const Point &pos) noexcept
Definition: stroketext.cpp:142
bool setLineSpacing(const StrokeTextSpacing &spacing) noexcept
Definition: stroketext.cpp:192
bool getAutoRotate() const noexcept
Definition: stroketext.h:101
Uuid mUuid
Definition: stroketext.h:137
StrokeText & operator=(const StrokeText &rhs) noexcept
Definition: stroketext.cpp:275
Event
Definition: stroketext.h:56
UnsignedLength mStrokeWidth
Definition: stroketext.h:143
const PositiveLength & getHeight() const noexcept
Definition: stroketext.h:91
QString mText
Definition: stroketext.h:139
const Layer & getLayer() const noexcept
Definition: stroketext.h:88
bool setLetterSpacing(const StrokeTextSpacing &spacing) noexcept
Definition: stroketext.cpp:182
QVector< Path > generatePaths(const StrokeFont &font) const noexcept
Definition: stroketext.cpp:107
const Alignment & getAlign() const noexcept
Definition: stroketext.h:99
const QString & getText() const noexcept
Definition: stroketext.h:102
Signal< StrokeText, Event > onEdited
Definition: stroketext.h:70
bool setStrokeWidth(const UnsignedLength &strokeWidth) noexcept
Definition: stroketext.cpp:172
Angle mRotation
Definition: stroketext.h:141
bool setLayer(const Layer &layer) noexcept
Definition: stroketext.cpp:122
bool mAutoRotate
Definition: stroketext.h:148
bool setHeight(const PositiveLength &height) noexcept
Definition: stroketext.cpp:162
bool setMirrored(bool mirrored) noexcept
Definition: stroketext.cpp:212
const Point & getPosition() const noexcept
Definition: stroketext.h:89
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: stroketext.cpp:236
const StrokeTextSpacing & getLineSpacing() const noexcept
Definition: stroketext.h:96
PositiveLength mHeight
Definition: stroketext.h:142
const Uuid & getUuid() const noexcept
Definition: stroketext.h:87
bool operator!=(const StrokeText &rhs) const noexcept
Definition: stroketext.h:131
const StrokeTextSpacing & getLetterSpacing() const noexcept
Definition: stroketext.h:93
Alignment mAlign
Definition: stroketext.h:146
bool setRotation(const Angle &rotation) noexcept
Definition: stroketext.cpp:152
const Layer * mLayer
Definition: stroketext.h:138
StrokeTextSpacing mLineSpacing
Definition: stroketext.h:145
const UnsignedLength & getStrokeWidth() const noexcept
Definition: stroketext.h:92
~StrokeText() noexcept
Definition: stroketext.cpp:100
bool setAutoRotate(bool autoRotate) noexcept
Definition: stroketext.cpp:222
bool mMirrored
Definition: stroketext.h:147
bool operator==(const StrokeText &rhs) const noexcept
Definition: stroketext.cpp:259
Point mPosition
Definition: stroketext.h:140
bool setAlign(const Alignment &align) noexcept
Definition: stroketext.cpp:202
StrokeTextSpacing mLetterSpacing
Definition: stroketext.h:144
Represents the letter- or line spacing configuration of a stroke text.
Definition: stroketextspacing.h:44
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:812
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
Definition: stroketext.h:155
static constexpr const char * tagname
Definition: stroketext.h:156