20#ifndef LIBREPCB_EDITOR_CMDTEXTEDIT_H
21#define LIBREPCB_EDITOR_CMDTEXTEDIT_H
26#include "../undocommand.h"
61 void setText(const QString& text,
bool immediate) noexcept;
68 void rotate(const
Angle& angle, const
Point& center,
bool immediate) noexcept;
69 void mirror(Qt::Orientation orientation, const
Point& center,
70 bool immediate) noexcept;
72 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 Text class.
Definition text.h:48
The CmdListElementInsert class.
Definition cmdlistelementinsert.h:46
The CmdListElementRemove class.
Definition cmdlistelementremove.h:46
The CmdListElementsSwap class.
Definition cmdlistelementsswap.h:46
The CmdTextEdit class.
Definition cmdtextedit.h:51
void performRedo() override
Redo the command.
Definition cmdtextedit.cpp:162
void setHeight(const PositiveLength &height, bool immediate) noexcept
Definition cmdtextedit.cpp:76
void setPosition(const Point &pos, bool immediate) noexcept
Definition cmdtextedit.cpp:90
void setLayer(const Layer &layer, bool immediate) noexcept
Definition cmdtextedit.cpp:64
void translate(const Point &deltaPos, bool immediate) noexcept
Definition cmdtextedit.cpp:96
Point mOldPosition
Definition cmdtextedit.h:99
Angle mNewRotation
Definition cmdtextedit.h:102
void performUndo() override
Undo the command.
Definition cmdtextedit.cpp:153
Text & mText
Definition cmdtextedit.h:92
PositiveLength mNewHeight
Definition cmdtextedit.h:104
void setAlignment(const Alignment &align, bool immediate) noexcept
Definition cmdtextedit.cpp:83
void setText(const QString &text, bool immediate) noexcept
Definition cmdtextedit.cpp:70
Alignment mNewAlign
Definition cmdtextedit.h:106
PositiveLength mOldHeight
Definition cmdtextedit.h:103
Alignment mOldAlign
Definition cmdtextedit.h:105
CmdTextEdit(const CmdTextEdit &other)=delete
void snapToGrid(const PositiveLength &gridInterval, bool immediate) noexcept
Definition cmdtextedit.cpp:102
QString mNewText
Definition cmdtextedit.h:98
const Layer * mNewLayer
Definition cmdtextedit.h:96
Point mNewPosition
Definition cmdtextedit.h:100
void mirror(Qt::Orientation orientation, const Point ¢er, bool immediate) noexcept
Definition cmdtextedit.cpp:119
~CmdTextEdit() noexcept
Definition cmdtextedit.cpp:54
bool performExecute() override
Execute the command the first time.
Definition cmdtextedit.cpp:141
void rotate(const Angle &angle, const Point ¢er, bool immediate) noexcept
Definition cmdtextedit.cpp:113
Angle mOldRotation
Definition cmdtextedit.h:101
const Layer * mOldLayer
Definition cmdtextedit.h:95
QString mOldText
Definition cmdtextedit.h:97
void setRotation(const Angle &angle, bool immediate) noexcept
Definition cmdtextedit.cpp:107
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
CmdListElementRemove< Text, TextListNameProvider, Text::Event > CmdTextRemove
Definition cmdtextedit.h:116
CmdListElementsSwap< Text, TextListNameProvider, Text::Event > CmdTextsSwap
Definition cmdtextedit.h:118
CmdListElementInsert< Text, TextListNameProvider, Text::Event > CmdTextInsert
Definition cmdtextedit.h:114
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810