20#ifndef LIBREPCB_EDITOR_CMDPOLYGONEDIT_H
21#define LIBREPCB_EDITOR_CMDPOLYGONEDIT_H
26#include "../undocommand.h"
62 void setIsFilled(
bool filled,
bool immediate) noexcept;
64 void setPath(const
Path& path,
bool immediate) noexcept;
67 void rotate(const
Angle& angle, const
Point& center,
bool immediate) noexcept;
69 bool immediate) noexcept;
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 Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition: path.h:58
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
The Polygon class.
Definition: polygon.h:45
The CmdListElementInsert class.
Definition: cmdlistelementinsert.h:46
The CmdListElementRemove class.
Definition: cmdlistelementremove.h:46
The CmdListElementsSwap class.
Definition: cmdlistelementsswap.h:46
The CmdPolygonEdit class.
Definition: cmdpolygonedit.h:51
void performRedo() override
Redo the command.
Definition: cmdpolygonedit.cpp:142
bool mNewIsFilled
Definition: cmdpolygonedit.h:98
void setLayer(const Layer &layer, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:64
void translate(const Point &deltaPos, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:95
void setIsGrabArea(bool grabArea, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:83
void setIsFilled(bool filled, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:77
void performUndo() override
Undo the command.
Definition: cmdpolygonedit.cpp:134
void setLineWidth(const UnsignedLength &width, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:70
Path mNewPath
Definition: cmdpolygonedit.h:102
bool mOldIsGrabArea
Definition: cmdpolygonedit.h:99
void mirrorGeometry(Qt::Orientation orientation, const Point ¢er, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:109
bool mNewIsGrabArea
Definition: cmdpolygonedit.h:100
UnsignedLength mOldLineWidth
Definition: cmdpolygonedit.h:95
void snapToGrid(const PositiveLength &gridInterval, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:99
~CmdPolygonEdit() noexcept
Definition: cmdpolygonedit.cpp:54
const Layer * mNewLayer
Definition: cmdpolygonedit.h:94
Path mOldPath
Definition: cmdpolygonedit.h:101
Polygon & mPolygon
Definition: cmdpolygonedit.h:90
CmdPolygonEdit(const CmdPolygonEdit &other)=delete
void mirrorLayer(bool immediate) noexcept
Definition: cmdpolygonedit.cpp:115
UnsignedLength mNewLineWidth
Definition: cmdpolygonedit.h:96
bool mOldIsFilled
Definition: cmdpolygonedit.h:97
void setPath(const Path &path, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:89
bool performExecute() override
Execute the command the first time.
Definition: cmdpolygonedit.cpp:123
void rotate(const Angle &angle, const Point ¢er, bool immediate) noexcept
Definition: cmdpolygonedit.cpp:104
const Layer * mOldLayer
Definition: cmdpolygonedit.h:93
The UndoCommand class represents a command which you can undo/redo.
Definition: undocommand.h:46
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: polygon.h:113