20#ifndef LIBREPCB_EDITOR_CMDSTROKETEXTEDIT_H
21#define LIBREPCB_EDITOR_CMDSTROKETEXTEDIT_H
26#include "../undocommand.h"
61 void setText(const QString& text,
bool immediate) noexcept;
64 bool immediate) noexcept;
66 bool immediate) noexcept;
68 bool immediate) noexcept;
74 void rotate(const
Angle& angle, const
Point& center,
bool immediate) noexcept;
75 void setMirrored(
bool mirrored,
bool immediate) noexcept;
77 bool immediate) noexcept;
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 StrokeText class.
Definition stroketext.h:51
Represents the letter- or line spacing configuration of a stroke text.
Definition stroketextspacing.h:44
The CmdListElementInsert class.
Definition cmdlistelementinsert.h:46
The CmdListElementRemove class.
Definition cmdlistelementremove.h:46
The CmdListElementsSwap class.
Definition cmdlistelementsswap.h:46
The CmdStrokeTextEdit class.
Definition cmdstroketextedit.h:51
void performRedo() override
Redo the command.
Definition cmdstroketextedit.cpp:219
UnsignedLength mNewStrokeWidth
Definition cmdstroketextedit.h:113
void setHeight(const PositiveLength &height, bool immediate) noexcept
Definition cmdstroketextedit.cpp:88
void setPosition(const Point &pos, bool immediate) noexcept
Definition cmdstroketextedit.cpp:123
void setLayer(const Layer &layer, bool immediate) noexcept
Definition cmdstroketextedit.cpp:76
bool mNewAutoRotate
Definition cmdstroketextedit.h:123
Point mOldPosition
Definition cmdstroketextedit.h:106
StrokeTextSpacing mOldLineSpacing
Definition cmdstroketextedit.h:116
bool mOldMirrored
Definition cmdstroketextedit.h:120
void setMirrored(bool mirrored, bool immediate) noexcept
Definition cmdstroketextedit.cpp:153
void translate(const Point &delta, bool immediate) noexcept
Definition cmdstroketextedit.cpp:129
Angle mNewRotation
Definition cmdstroketextedit.h:109
void setAutoRotate(bool autoRotate, bool immediate) noexcept
Definition cmdstroketextedit.cpp:177
void performUndo() override
Undo the command.
Definition cmdstroketextedit.cpp:205
PositiveLength mNewHeight
Definition cmdstroketextedit.h:111
bool mNewMirrored
Definition cmdstroketextedit.h:121
StrokeTextSpacing mOldLetterSpacing
Definition cmdstroketextedit.h:114
void mirrorGeometry(Qt::Orientation orientation, const Point ¢er, bool immediate) noexcept
Definition cmdstroketextedit.cpp:159
CmdStrokeTextEdit()=delete
void setAlignment(const Alignment &align, bool immediate) noexcept
Definition cmdstroketextedit.cpp:116
void setText(const QString &text, bool immediate) noexcept
Definition cmdstroketextedit.cpp:82
Alignment mNewAlign
Definition cmdstroketextedit.h:119
bool mOldAutoRotate
Definition cmdstroketextedit.h:122
PositiveLength mOldHeight
Definition cmdstroketextedit.h:110
Alignment mOldAlign
Definition cmdstroketextedit.h:118
void snapToGrid(const PositiveLength &gridInterval, bool immediate) noexcept
Definition cmdstroketextedit.cpp:135
StrokeTextSpacing mNewLineSpacing
Definition cmdstroketextedit.h:117
QString mNewText
Definition cmdstroketextedit.h:105
CmdStrokeTextEdit(const CmdStrokeTextEdit &other)=delete
const Layer * mNewLayer
Definition cmdstroketextedit.h:103
StrokeTextSpacing mNewLetterSpacing
Definition cmdstroketextedit.h:115
void mirrorLayer(bool immediate) noexcept
Definition cmdstroketextedit.cpp:171
Point mNewPosition
Definition cmdstroketextedit.h:107
void setStrokeWidth(const UnsignedLength &strokeWidth, bool immediate) noexcept
Definition cmdstroketextedit.cpp:95
void setLetterSpacing(const StrokeTextSpacing &spacing, bool immediate) noexcept
Definition cmdstroketextedit.cpp:102
void setLineSpacing(const StrokeTextSpacing &spacing, bool immediate) noexcept
Definition cmdstroketextedit.cpp:109
~CmdStrokeTextEdit() noexcept
Definition cmdstroketextedit.cpp:66
bool performExecute() override
Execute the command the first time.
Definition cmdstroketextedit.cpp:188
UnsignedLength mOldStrokeWidth
Definition cmdstroketextedit.h:112
void rotate(const Angle &angle, const Point ¢er, bool immediate) noexcept
Definition cmdstroketextedit.cpp:147
Angle mOldRotation
Definition cmdstroketextedit.h:108
const Layer * mOldLayer
Definition cmdstroketextedit.h:102
StrokeText & mText
Definition cmdstroketextedit.h:99
QString mOldText
Definition cmdstroketextedit.h:104
void setRotation(const Angle &angle, bool immediate) noexcept
Definition cmdstroketextedit.cpp:140
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
CmdListElementsSwap< StrokeText, StrokeTextListNameProvider, StrokeText::Event > CmdStrokeTextsSwap
Definition cmdstroketextedit.h:138
CmdListElementRemove< StrokeText, StrokeTextListNameProvider, StrokeText::Event > CmdStrokeTextRemove
Definition cmdstroketextedit.h:135
CmdListElementInsert< StrokeText, StrokeTextListNameProvider, StrokeText::Event > CmdStrokeTextInsert
Definition cmdstroketextedit.h:132
Definition occmodel.cpp:76
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:155