20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWPOLYGONBASE_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_DRAWPOLYGONBASE_H
48class PolygonGraphicsItem;
62 enum class Mode { LINE, ARC, RECT, POLYGON };
72 bool entry() noexcept override;
73 bool exit() noexcept override;
75 const noexcept override;
81 QGraphicsSceneMouseEvent& e) noexcept override;
83 QGraphicsSceneMouseEvent& e) noexcept override;
85 QGraphicsSceneMouseEvent& e) noexcept override;
96 bool start() noexcept;
97 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 PackageEditorState_DrawPolygonBase class.
Definition: packageeditorstate_drawpolygonbase.h:57
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:208
PackageEditorState_DrawPolygonBase()=delete
PackageEditorState_DrawPolygonBase(const PackageEditorState_DrawPolygonBase &other)=delete
const Layer * mLastLayer
Definition: packageeditorstate_drawpolygonbase.h:124
void requestLineWidth(const UnsignedLength &value)
bool abort(bool showErrMsgBox=true) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:289
Point mArcCenter
Definition: packageeditorstate_drawpolygonbase.h:120
bool mLastFill
Definition: packageeditorstate_drawpolygonbase.h:127
bool addNextSegment() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:312
Mode
Definition: packageeditorstate_drawpolygonbase.h:62
bool mArcInSecondState
Definition: packageeditorstate_drawpolygonbase.h:121
Mode mMode
Definition: packageeditorstate_drawpolygonbase.h:111
void updateCursorPosition(Qt::KeyboardModifiers modifiers) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:376
Angle mLastAngle
Definition: packageeditorstate_drawpolygonbase.h:126
QHash< const Layer *, UnsignedLength > mUsedLineWidths
Definition: packageeditorstate_drawpolygonbase.h:129
bool processAbortCommand() noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:233
bool processKeyPressed(const QKeyEvent &e) noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:188
void fillCheckBoxCheckedChanged(bool checked) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:609
void updateOverlayText() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:449
void grabAreaCheckBoxCheckedChanged(bool checked) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:617
bool mIsUndoCmdActive
Definition: packageeditorstate_drawpolygonbase.h:112
bool start() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:245
bool mLastGrabArea
Definition: packageeditorstate_drawpolygonbase.h:128
void angleEditValueChanged(const Angle &value) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:597
QScopedPointer< CmdPolygonEdit > mEditCmd
Definition: packageeditorstate_drawpolygonbase.h:113
void layerComboBoxValueChanged(const Layer &layer) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:571
bool exit() noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:162
std::shared_ptr< Polygon > mCurrentPolygon
Definition: packageeditorstate_drawpolygonbase.h:114
UnsignedLength mLastLineWidth
Definition: packageeditorstate_drawpolygonbase.h:125
virtual ~PackageEditorState_DrawPolygonBase() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:69
void updateStatusBarMessage() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:536
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:178
void lineWidthEditValueChanged(const UnsignedLength &value) noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:588
bool processKeyReleased(const QKeyEvent &e) noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:198
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:216
Point mLastScenePos
Definition: packageeditorstate_drawpolygonbase.h:116
Point mCursorPos
Definition: packageeditorstate_drawpolygonbase.h:117
bool entry() noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:76
std::shared_ptr< PolygonGraphicsItem > mCurrentGraphicsItem
Definition: packageeditorstate_drawpolygonbase.h:115
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition: packageeditorstate_drawpolygonbase.cpp:227
void updatePolygonPath() noexcept
Definition: packageeditorstate_drawpolygonbase.cpp:392
The PackageEditorState class is the base class of all package editor FSM states.
Definition: packageeditorstate.h:52
The PolygonGraphicsItem class.
Definition: polygongraphicsitem.h:48
Definition: occmodel.cpp:77
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:696
Definition: packageeditorfsm.h:90