20#ifndef LIBREPCB_EDITOR_BOARDEDITORFSM_H
21#define LIBREPCB_EDITOR_BOARDEDITORFSM_H
35class ComponentInstance;
43class BoardEditorFsmAdapter;
44class BoardEditorState;
45class GraphicsLayerList;
47struct GraphicsSceneKeyEvent;
48struct GraphicsSceneMouseEvent;
101 QObject* parent =
nullptr) noexcept;
113 const
Uuid& footprint) noexcept;
127 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 Board class represents a PCB of a project and is always part of a circuit.
Definition board.h:73
The ComponentInstance class.
Definition componentinstance.h:54
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The Project class represents a whole (opened) project with all its content.
Definition project.h:71
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
Interface for the integration of the board editor FSM.
Definition boardeditorfsmadapter.h:63
The board editor finite state machine.
Definition boardeditorfsm.h:57
bool processResetAllTexts() noexcept
Definition boardeditorfsm.cpp:250
State getCurrentState() const noexcept
Definition boardeditorfsm.h:105
bool processDrawPlane() noexcept
Definition boardeditorfsm.cpp:123
bool setNextState(State state) noexcept
Definition boardeditorfsm.cpp:361
bool processAddStrokeText() noexcept
Definition boardeditorfsm.cpp:95
BoardEditorState * getCurrentStateObj() const noexcept
Definition boardeditorfsm.cpp:357
bool processSelectAll() noexcept
Definition boardeditorfsm.cpp:160
bool processAddDevice(ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
Definition boardeditorfsm.cpp:103
bool processDrawPolygon() noexcept
Definition boardeditorfsm.cpp:119
bool processRemove() noexcept
Definition boardeditorfsm.cpp:259
bool processSelect() noexcept
Definition boardeditorfsm.cpp:87
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:277
bool processCopy() noexcept
Definition boardeditorfsm.cpp:178
bool processDrawTrace() noexcept
Definition boardeditorfsm.cpp:131
bool processEditProperties() noexcept
Definition boardeditorfsm.cpp:268
State mPreviousState
Definition boardeditorfsm.h:160
State
FSM States.
Definition boardeditorfsm.h:62
@ MEASURE
librepcb::editor::BoardEditorState_Measure
Definition boardeditorfsm.h:84
@ SELECT
librepcb::editor::BoardEditorState_Select
Definition boardeditorfsm.h:66
@ ADD_STROKE_TEXT
librepcb::editor::BoardEditorState_AddStrokeText
Definition boardeditorfsm.h:70
@ ADD_VIA
librepcb::editor::BoardEditorState_AddVia
Definition boardeditorfsm.h:72
@ DRAW_PLANE
librepcb::editor::BoardEditorState_DrawPlane
Definition boardeditorfsm.h:78
@ DRAW_POLYGON
librepcb::editor::BoardEditorState_DrawPolygon
Definition boardeditorfsm.h:76
@ DRAW_TRACE
librepcb::editor::BoardEditorState_DrawTrace
Definition boardeditorfsm.h:82
@ ADD_DEVICE
librepcb::editor::BoardEditorState_AddDevice
Definition boardeditorfsm.h:74
@ DRAW_ZONE
librepcb::editor::BoardEditorState_DrawZone
Definition boardeditorfsm.h:80
@ ADD_HOLE
librepcb::editor::BoardEditorState_AddHole
Definition boardeditorfsm.h:68
@ IDLE
No state active.
Definition boardeditorfsm.h:64
bool processCut() noexcept
Definition boardeditorfsm.cpp:169
bool processImportDxf() noexcept
Definition boardeditorfsm.cpp:135
bool leaveCurrentState() noexcept
Definition boardeditorfsm.cpp:371
bool switchToPreviousState() noexcept
Definition boardeditorfsm.cpp:404
bool processMeasure() noexcept
Definition boardeditorfsm.cpp:145
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:337
bool processAbortCommand() noexcept
Definition boardeditorfsm.cpp:149
bool processAddVia() noexcept
Definition boardeditorfsm.cpp:99
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:287
BoardEditorFsm(const BoardEditorFsm &other)=delete
bool processFlip(Qt::Orientation orientation) noexcept
Definition boardeditorfsm.cpp:214
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:307
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:327
bool processMove(const Point &delta) noexcept
Definition boardeditorfsm.cpp:196
bool enterNextState(State state) noexcept
Definition boardeditorfsm.cpp:394
State mCurrentState
Definition boardeditorfsm.h:159
bool processSetLocked(bool locked) noexcept
Definition boardeditorfsm.cpp:232
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:297
bool processRotate(const Angle &rotation) noexcept
Definition boardeditorfsm.cpp:205
bool processAddHole() noexcept
Definition boardeditorfsm.cpp:91
bool processChangeLineWidth(int step) noexcept
Definition boardeditorfsm.cpp:241
bool processDrawZone() noexcept
Definition boardeditorfsm.cpp:127
QMap< State, BoardEditorState * > mStates
Definition boardeditorfsm.h:158
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:317
bool processPaste() noexcept
Definition boardeditorfsm.cpp:187
bool processSnapToGrid() noexcept
Definition boardeditorfsm.cpp:223
The board editor state base class.
Definition boardeditorstate.h:60
The GraphicsLayerList class.
Definition graphicslayerlist.h:48
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77
FSM Context.
Definition boardeditorfsm.h:88
GraphicsLayerList & layers
Definition boardeditorfsm.h:93
BoardEditorFsmAdapter & adapter
Definition boardeditorfsm.h:94
Workspace & workspace
Definition boardeditorfsm.h:89
Board & board
Definition boardeditorfsm.h:91
UndoStack & undoStack
Definition boardeditorfsm.h:92
Project & project
Definition boardeditorfsm.h:90
Definition graphicsscene.h:52
Definition graphicsscene.h:45