20#ifndef LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWPOLYGONBASE_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWPOLYGONBASE_H
41class PolygonGraphicsItem;
67 bool entry() noexcept override;
68 bool exit() noexcept override;
111 bool start() noexcept;
112 bool abort(
bool showErrMsgBox = true) noexcept;
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 Polygon class.
Definition polygon.h:45
bool isFilled() const noexcept
Definition polygon.h:74
const Layer & getLayer() const noexcept
Definition polygon.h:72
const UnsignedLength & getLineWidth() const noexcept
Definition polygon.h:73
bool isGrabArea() const noexcept
Definition polygon.h:75
The CmdPolygonEdit class.
Definition cmdpolygonedit.h:51
The PolygonGraphicsItem class.
Definition polygongraphicsitem.h:48
The SymbolEditorState_DrawPolygonBase class.
Definition symboleditorstate_drawpolygonbase.h:50
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:119
void angleChanged(const Angle &angle)
bool getGrabArea() const noexcept
Definition symboleditorstate_drawpolygonbase.h:91
bool abort(bool showErrMsgBox=true) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:267
Point mArcCenter
Definition symboleditorstate_drawpolygonbase.h:127
void setLayer(const Layer &layer) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:161
bool addNextSegment() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:290
Mode
Definition symboleditorstate_drawpolygonbase.h:55
bool mArcInSecondState
Definition symboleditorstate_drawpolygonbase.h:128
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:127
void updateCursorPosition(Qt::KeyboardModifiers modifiers) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:354
Angle mLastAngle
Definition symboleditorstate_drawpolygonbase.h:122
bool processAbortCommand() noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:144
const Layer & getLayer() const noexcept
Definition symboleditorstate_drawpolygonbase.h:81
QSet< const Layer * > getAvailableLayers() const noexcept
Definition symboleditorstate_drawpolygonbase.cpp:156
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:138
void updateOverlayText() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:426
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:99
const UnsignedLength & getLineWidth() const noexcept
Definition symboleditorstate_drawpolygonbase.h:85
bool mIsUndoCmdActive
Definition symboleditorstate_drawpolygonbase.h:124
SymbolEditorState_DrawPolygonBase(const SymbolEditorState_DrawPolygonBase &other)=delete
bool start() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:221
Polygon mCurrentProperties
Definition symboleditorstate_drawpolygonbase.h:131
void setFilled(bool filled) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:182
bool exit() noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:82
std::shared_ptr< Polygon > mCurrentPolygon
Definition symboleditorstate_drawpolygonbase.h:135
void setGrabArea(bool grabArea) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:192
void setAngle(const Angle &angle) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:202
const Mode mMode
Definition symboleditorstate_drawpolygonbase.h:120
std::unique_ptr< CmdPolygonEdit > mCurrentEditCmd
Definition symboleditorstate_drawpolygonbase.h:136
void setLineWidth(const UnsignedLength &width) noexcept
Definition symboleditorstate_drawpolygonbase.cpp:171
void filledChanged(bool filled)
void grabAreaChanged(bool grabArea)
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:109
void updateStatusBarMessage() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:513
void layerChanged(const Layer &layer)
bool getFilled() const noexcept
Definition symboleditorstate_drawpolygonbase.h:89
SymbolEditorState_DrawPolygonBase & operator=(const SymbolEditorState_DrawPolygonBase &rhs)=delete
SymbolEditorState_DrawPolygonBase()=delete
Point mLastScenePos
Definition symboleditorstate_drawpolygonbase.h:121
void lineWidthChanged(const UnsignedLength &width)
Point mCursorPos
Definition symboleditorstate_drawpolygonbase.h:123
bool entry() noexcept override
Definition symboleditorstate_drawpolygonbase.cpp:71
std::shared_ptr< PolygonGraphicsItem > mCurrentGraphicsItem
Definition symboleditorstate_drawpolygonbase.h:137
void updatePolygonPath() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:369
virtual ~SymbolEditorState_DrawPolygonBase() noexcept
Definition symboleditorstate_drawpolygonbase.cpp:64
virtual void notifyToolEnter() noexcept=0
const Angle & getAngle() const noexcept
Definition symboleditorstate_drawpolygonbase.h:93
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition symboleditorstate.h:56
Definition occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
Definition graphicsscene.h:52
Definition graphicsscene.h:45
Definition symboleditorfsm.h:75