20#ifndef LIBREPCB_EDITOR_CMDDEVICEINSTANCEEDIT_H
21#define LIBREPCB_EDITOR_CMDDEVICEINSTANCEEDIT_H
26#include "../../undocommand.h"
44class CmdDeviceInstanceEditAll;
64 void rotate(
const Angle& angle,
const Point& center,
bool immediate)
noexcept;
66 void mirror(
const Point& center, Qt::Orientation orientation,
bool immediate);
68 void setModel(
const std::optional<Uuid>& uuid)
noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The BI_Device class.
Definition bi_device.h:57
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The CmdDeviceInstanceEditAll class.
Definition cmddeviceinstanceeditall.h:51
The CmdDeviceInstanceEdit class.
Definition cmddeviceinstanceedit.h:53
void performRedo() override
Redo the command.
Definition cmddeviceinstanceedit.cpp:161
bool mOldLocked
Definition cmddeviceinstanceedit.h:94
void setPosition(const Point &pos, bool immediate) noexcept
Definition cmddeviceinstanceedit.cpp:71
BI_Device & mDevice
Definition cmddeviceinstanceedit.h:85
void translate(const Point &deltaPos, bool immediate) noexcept
Definition cmddeviceinstanceedit.cpp:78
void setLocked(bool locked)
Definition cmddeviceinstanceedit.cpp:122
Point mOldPos
Definition cmddeviceinstanceedit.h:88
void setMirrored(bool mirrored, bool immediate)
Definition cmddeviceinstanceedit.cpp:103
bool mOldMirrored
Definition cmddeviceinstanceedit.h:92
Angle mNewRotation
Definition cmddeviceinstanceedit.h:91
void performUndo() override
Undo the command.
Definition cmddeviceinstanceedit.cpp:147
bool mNewMirrored
Definition cmddeviceinstanceedit.h:93
std::optional< Uuid > mOldModelUuid
Definition cmddeviceinstanceedit.h:96
Point mNewPos
Definition cmddeviceinstanceedit.h:89
void snapToGrid(const PositiveLength &gridInterval, bool immediate) noexcept
Definition cmddeviceinstanceedit.cpp:85
void setModel(const std::optional< Uuid > &uuid) noexcept
Definition cmddeviceinstanceedit.cpp:127
void mirror(const Point ¢er, Qt::Orientation orientation, bool immediate)
Definition cmddeviceinstanceedit.cpp:111
std::optional< Uuid > mNewModelUuid
Definition cmddeviceinstanceedit.h:97
bool performExecute() override
Execute the command the first time.
Definition cmddeviceinstanceedit.cpp:136
void rotate(const Angle &angle, const Point ¢er, bool immediate) noexcept
Definition cmddeviceinstanceedit.cpp:97
Angle mOldRotation
Definition cmddeviceinstanceedit.h:90
~CmdDeviceInstanceEdit() noexcept
Definition cmddeviceinstanceedit.cpp:55
bool mNewLocked
Definition cmddeviceinstanceedit.h:95
void setRotation(const Angle &angle, bool immediate) noexcept
Definition cmddeviceinstanceedit.cpp:90
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810