20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORFSM_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORFSM_H
43class FootprintGraphicsItem;
44class GraphicsLayerList;
45class PackageEditorFsmAdapter;
46class PackageEditorState;
48struct GraphicsSceneKeyEvent;
49struct GraphicsSceneMouseEvent;
137 bool processFlip(Qt::Orientation orientation) noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:62
The Package class represents a package of a component (including footprint and 3D model)
Definition package.h:59
Base class for pads, extended in derived classes.
Definition pad.h:53
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The GraphicsLayerList class.
Definition graphicslayerlist.h:48
Interface for the integration of the Package editor FSM.
Definition packageeditorfsmadapter.h:64
The PackageEditorFsm class is the finit state machine (FSM) of the package editor.
Definition packageeditorfsm.h:59
PackageEditorFsm()=delete
Context mContext
Definition packageeditorfsm.h:175
bool processStartAddingNames() noexcept
Definition packageeditorfsm.cpp:391
bool processStartAddingHoles() noexcept
Definition packageeditorfsm.cpp:427
bool setNextState(State state) noexcept
Definition packageeditorfsm.cpp:467
bool processStartAddingValues() noexcept
Definition packageeditorfsm.cpp:395
PackageEditorState * getCurrentState() const noexcept
Definition packageeditorfsm.cpp:463
bool processStartSelecting() noexcept
Definition packageeditorfsm.cpp:363
bool processStartDrawLines() noexcept
Definition packageeditorfsm.cpp:399
bool processSelectAll() noexcept
Definition packageeditorfsm.cpp:230
bool processStartAddingFootprintSmtPads(Pad::Function function) noexcept
Definition packageeditorfsm.cpp:371
bool processStartDrawRects() noexcept
Definition packageeditorfsm.cpp:407
const std::shared_ptr< FootprintGraphicsItem > & getCurrentGraphicsItem() noexcept
Definition packageeditorfsm.cpp:121
bool processRemove() noexcept
Definition packageeditorfsm.cpp:314
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept
Definition packageeditorfsm.cpp:151
bool processCopy() noexcept
Definition packageeditorfsm.cpp:246
bool processEditProperties() noexcept
Definition packageeditorfsm.cpp:323
State mPreviousState
Definition packageeditorfsm.h:178
State
Definition packageeditorfsm.h:63
@ ADD_SMT_PADS_LOCAL_FIDUCIAL
@ ADD_SMT_PADS_GLOBAL_FIDUCIAL
@ ADD_SMT_PADS_EDGE_CONNECTOR
bool processCut() noexcept
Definition packageeditorfsm.cpp:238
QMap< State, PackageEditorState * > mStates
Definition packageeditorfsm.h:176
bool leaveCurrentState() noexcept
Definition packageeditorfsm.cpp:481
bool switchToPreviousState() noexcept
Definition packageeditorfsm.cpp:510
bool processStartDrawTexts() noexcept
Definition packageeditorfsm.cpp:419
bool processChangeCurrentFootprint(const std::shared_ptr< Footprint > &fpt, const std::shared_ptr< FootprintGraphicsItem > &item) noexcept
Definition packageeditorfsm.cpp:129
bool processStartDxfImport() noexcept
Definition packageeditorfsm.cpp:431
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:212
bool processGenerateOutline() noexcept
Definition packageeditorfsm.cpp:331
bool processAbortCommand() noexcept
Definition packageeditorfsm.cpp:355
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept
Definition packageeditorfsm.cpp:161
bool processGridIntervalChanged(const PositiveLength &interval) noexcept
Definition packageeditorfsm.cpp:449
bool processFlip(Qt::Orientation orientation) noexcept
Definition packageeditorfsm.cpp:289
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:181
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:201
bool processStartDrawCircles() noexcept
Definition packageeditorfsm.cpp:415
bool processMove(const Point &delta) noexcept
Definition packageeditorfsm.cpp:262
bool enterNextState(State state) noexcept
Definition packageeditorfsm.cpp:497
State mCurrentState
Definition packageeditorfsm.h:177
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:171
bool processRotate(const Angle &rotation) noexcept
Definition packageeditorfsm.cpp:271
bool processAcceptCommand() noexcept
Definition packageeditorfsm.cpp:347
bool processStartMeasure() noexcept
Definition packageeditorfsm.cpp:441
PackageEditorFsm(const PackageEditorFsm &other)=delete
const std::shared_ptr< Footprint > & getCurrentFootprint() noexcept
Definition packageeditorfsm.cpp:116
~PackageEditorFsm() noexcept
Definition packageeditorfsm.cpp:109
bool processStartDrawZones() noexcept
Definition packageeditorfsm.cpp:423
bool processStartReNumberPads() noexcept
Definition packageeditorfsm.cpp:445
bool processMoveAlign() noexcept
Definition packageeditorfsm.cpp:298
bool processGenerateCourtyard() noexcept
Definition packageeditorfsm.cpp:339
bool processMirror(Qt::Orientation orientation) noexcept
Definition packageeditorfsm.cpp:280
bool processStartDrawArcs() noexcept
Definition packageeditorfsm.cpp:403
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:191
bool processStartAddingFootprintThtPads() noexcept
Definition packageeditorfsm.cpp:367
bool processStartDrawPolygons() noexcept
Definition packageeditorfsm.cpp:411
bool processPaste() noexcept
Definition packageeditorfsm.cpp:254
bool processSnapToGrid() noexcept
Definition packageeditorfsm.cpp:306
The PackageEditorState class is the base class of all package editor FSM states.
Definition packageeditorstate.h:52
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
Definition graphicsscene.h:52
Definition graphicsscene.h:45
Definition packageeditorfsm.h:89
const bool readOnly
Definition packageeditorfsm.h:92
LengthUnit & lengthUnit
Definition packageeditorfsm.h:93
Package & package
Definition packageeditorfsm.h:90
PackageEditorFsmAdapter & adapter
Definition packageeditorfsm.h:95
std::shared_ptr< FootprintGraphicsItem > currentGraphicsItem
Definition packageeditorfsm.h:99
const GraphicsLayerList & layers
Definition packageeditorfsm.h:94
std::shared_ptr< Footprint > currentFootprint
Definition packageeditorfsm.h:98
UndoStack & undoStack
Definition packageeditorfsm.h:91