20#ifndef LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWPOLYGONBASE_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_DRAWPOLYGONBASE_H
48class PolygonGraphicsItem;
62 enum class Mode { LINE, ARC, RECT, POLYGON };
74 bool entry() noexcept override;
75 bool exit() noexcept override;
77 const noexcept override;
81 QGraphicsSceneMouseEvent& e) noexcept override;
83 QGraphicsSceneMouseEvent& e) noexcept override;
85 QGraphicsSceneMouseEvent& e) noexcept override;
93 bool start() noexcept;
94 bool abort(
bool showErrMsgBox = true) 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 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 CmdPolygonEdit class.
Definition: cmdpolygonedit.h:51
The PolygonGraphicsItem class.
Definition: polygongraphicsitem.h:48
The SymbolEditorState_DrawPolygonBase class.
Definition: symboleditorstate_drawpolygonbase.h:57
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:205
const Layer * mLastLayer
Definition: symboleditorstate_drawpolygonbase.h:121
bool abort(bool showErrMsgBox=true) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:286
Point mArcCenter
Definition: symboleditorstate_drawpolygonbase.h:117
bool mLastFill
Definition: symboleditorstate_drawpolygonbase.h:124
bool addNextSegment() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:309
Mode
Definition: symboleditorstate_drawpolygonbase.h:62
bool mArcInSecondState
Definition: symboleditorstate_drawpolygonbase.h:118
Mode mMode
Definition: symboleditorstate_drawpolygonbase.h:108
void updateCursorPosition(Qt::KeyboardModifiers modifiers) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:373
Angle mLastAngle
Definition: symboleditorstate_drawpolygonbase.h:123
bool processAbortCommand() noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:230
bool processKeyPressed(const QKeyEvent &e) noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:185
void fillCheckBoxCheckedChanged(bool checked) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:596
void updateOverlayText() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:446
void grabAreaCheckBoxCheckedChanged(bool checked) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:604
bool mIsUndoCmdActive
Definition: symboleditorstate_drawpolygonbase.h:109
SymbolEditorState_DrawPolygonBase(const SymbolEditorState_DrawPolygonBase &other)=delete
bool start() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:242
bool mLastGrabArea
Definition: symboleditorstate_drawpolygonbase.h:125
void angleEditValueChanged(const Angle &value) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:584
QScopedPointer< CmdPolygonEdit > mEditCmd
Definition: symboleditorstate_drawpolygonbase.h:110
void layerComboBoxValueChanged(const Layer &layer) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:568
bool exit() noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:159
std::shared_ptr< Polygon > mCurrentPolygon
Definition: symboleditorstate_drawpolygonbase.h:111
UnsignedLength mLastLineWidth
Definition: symboleditorstate_drawpolygonbase.h:122
void updateStatusBarMessage() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:533
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:175
void lineWidthEditValueChanged(const UnsignedLength &value) noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:576
bool processKeyReleased(const QKeyEvent &e) noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:195
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:213
SymbolEditorState_DrawPolygonBase()=delete
Point mLastScenePos
Definition: symboleditorstate_drawpolygonbase.h:113
Point mCursorPos
Definition: symboleditorstate_drawpolygonbase.h:114
bool entry() noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:76
std::shared_ptr< PolygonGraphicsItem > mCurrentGraphicsItem
Definition: symboleditorstate_drawpolygonbase.h:112
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_drawpolygonbase.cpp:224
void updatePolygonPath() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:389
virtual ~SymbolEditorState_DrawPolygonBase() noexcept
Definition: symboleditorstate_drawpolygonbase.cpp:69
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition: symboleditorstate.h:54
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
Definition: symboleditorfsm.h:76