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"
83 bool mirrored,
bool autoRotate,
bool locked)
noexcept;
107 const QString& text)
const noexcept;
111 bool setText(
const QString& text)
noexcept;
135 return !(*
this == rhs);
160 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:76
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:78
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 Slot class is used to receive signals from non-QObject derived classes.
Definition signalslot.h:170
The StrokeFont class.
Definition strokefont.h:56
The StrokeText class.
Definition stroketext.h:51
bool mLocked
Definition stroketext.h:152
bool getMirrored() const noexcept
Definition stroketext.h:101
bool setText(const QString &text) noexcept
Definition stroketext.cpp:135
const Angle & getRotation() const noexcept
Definition stroketext.h:91
Slot< StrokeText, Event > OnEditedSlot
Definition stroketext.h:72
bool setPosition(const Point &pos) noexcept
Definition stroketext.cpp:145
bool setLineSpacing(const StrokeTextSpacing &spacing) noexcept
Definition stroketext.cpp:195
bool getAutoRotate() const noexcept
Definition stroketext.h:102
Uuid mUuid
Definition stroketext.h:140
StrokeText & operator=(const StrokeText &rhs) noexcept
Definition stroketext.cpp:290
Event
Definition stroketext.h:56
UnsignedLength mStrokeWidth
Definition stroketext.h:146
const PositiveLength & getHeight() const noexcept
Definition stroketext.h:92
QString mText
Definition stroketext.h:142
const Layer & getLayer() const noexcept
Definition stroketext.h:89
bool setLetterSpacing(const StrokeTextSpacing &spacing) noexcept
Definition stroketext.cpp:185
QVector< Path > generatePaths(const StrokeFont &font) const noexcept
Definition stroketext.cpp:110
bool isLocked() const noexcept
Definition stroketext.h:103
const Alignment & getAlign() const noexcept
Definition stroketext.h:100
const QString & getText() const noexcept
Definition stroketext.h:104
Signal< StrokeText, Event > onEdited
Definition stroketext.h:71
bool setStrokeWidth(const UnsignedLength &strokeWidth) noexcept
Definition stroketext.cpp:175
Angle mRotation
Definition stroketext.h:144
bool setLayer(const Layer &layer) noexcept
Definition stroketext.cpp:125
bool mAutoRotate
Definition stroketext.h:151
bool setHeight(const PositiveLength &height) noexcept
Definition stroketext.cpp:165
bool setMirrored(bool mirrored) noexcept
Definition stroketext.cpp:215
const Point & getPosition() const noexcept
Definition stroketext.h:90
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition stroketext.cpp:249
const StrokeTextSpacing & getLineSpacing() const noexcept
Definition stroketext.h:97
PositiveLength mHeight
Definition stroketext.h:145
const Uuid & getUuid() const noexcept
Definition stroketext.h:88
bool operator!=(const StrokeText &rhs) const noexcept
Definition stroketext.h:134
const StrokeTextSpacing & getLetterSpacing() const noexcept
Definition stroketext.h:94
Alignment mAlign
Definition stroketext.h:149
bool setRotation(const Angle &rotation) noexcept
Definition stroketext.cpp:155
const Layer * mLayer
Definition stroketext.h:141
StrokeTextSpacing mLineSpacing
Definition stroketext.h:148
const UnsignedLength & getStrokeWidth() const noexcept
Definition stroketext.h:93
~StrokeText() noexcept
Definition stroketext.cpp:103
bool setLocked(bool locked) noexcept
Definition stroketext.cpp:235
bool setAutoRotate(bool autoRotate) noexcept
Definition stroketext.cpp:225
bool mMirrored
Definition stroketext.h:150
bool operator==(const StrokeText &rhs) const noexcept
Definition stroketext.cpp:273
Point mPosition
Definition stroketext.h:143
bool setAlign(const Alignment &align) noexcept
Definition stroketext.cpp:205
StrokeTextSpacing mLetterSpacing
Definition stroketext.h:147
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:56
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
Definition stroketext.h:159
static constexpr const char * tagname
Definition stroketext.h:160