20#ifndef LIBREPCB_EDITOR_BOARDEDITORFSM_H
21#define LIBREPCB_EDITOR_BOARDEDITORFSM_H
37class ComponentInstance;
45class BoardEditorFsmAdapter;
46class BoardEditorState;
47class GraphicsLayerList;
49struct GraphicsSceneKeyEvent;
50struct GraphicsSceneMouseEvent;
112 QObject* parent =
nullptr) noexcept;
126 const
Uuid& footprint) noexcept;
140 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:74
The ComponentInstance class.
Definition componentinstance.h:54
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 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:64
The board editor finite state machine.
Definition boardeditorfsm.h:59
bool processResetAllTexts() noexcept
Definition boardeditorfsm.cpp:306
State getCurrentState() const noexcept
Definition boardeditorfsm.h:116
bool processDrawPlane() noexcept
Definition boardeditorfsm.cpp:179
bool setNextState(State state) noexcept
Definition boardeditorfsm.cpp:417
bool processAddStrokeText() noexcept
Definition boardeditorfsm.cpp:128
BoardEditorState * getCurrentStateObj() const noexcept
Definition boardeditorfsm.cpp:413
bool processSelectAll() noexcept
Definition boardeditorfsm.cpp:216
bool processAddDevice(ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
Definition boardeditorfsm.cpp:159
bool processDrawPolygon() noexcept
Definition boardeditorfsm.cpp:175
bool processRemove() noexcept
Definition boardeditorfsm.cpp:315
bool processSelect() noexcept
Definition boardeditorfsm.cpp:120
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:333
bool processCopy() noexcept
Definition boardeditorfsm.cpp:234
bool processDrawTrace() noexcept
Definition boardeditorfsm.cpp:187
bool processEditProperties() noexcept
Definition boardeditorfsm.cpp:324
State mPreviousState
Definition boardeditorfsm.h:173
bool processAddSmtPad(Pad::Function function) noexcept
Definition boardeditorfsm.cpp:140
State
FSM States.
Definition boardeditorfsm.h:64
@ ADD_SMT_PAD_GLOBAL_FIDUCIAL
Definition boardeditorfsm.h:83
@ MEASURE
librepcb::editor::BoardEditorState_Measure
Definition boardeditorfsm.h:95
@ SELECT
librepcb::editor::BoardEditorState_Select
Definition boardeditorfsm.h:68
@ ADD_STROKE_TEXT
librepcb::editor::BoardEditorState_AddStrokeText
Definition boardeditorfsm.h:72
@ ADD_VIA
librepcb::editor::BoardEditorState_AddVia
Definition boardeditorfsm.h:74
@ ADD_SMT_PAD_TEST
Definition boardeditorfsm.h:81
@ DRAW_PLANE
librepcb::editor::BoardEditorState_DrawPlane
Definition boardeditorfsm.h:89
@ ADD_THT_PAD
librepcb::editor::BoardEditorState_AddPad
Definition boardeditorfsm.h:76
@ ADD_SMT_PAD_EDGE_CONNECTOR
Definition boardeditorfsm.h:80
@ DRAW_POLYGON
librepcb::editor::BoardEditorState_DrawPolygon
Definition boardeditorfsm.h:87
@ ADD_SMT_PAD_LOCAL_FIDUCIAL
Definition boardeditorfsm.h:82
@ ADD_SMT_PAD_THERMAL
Definition boardeditorfsm.h:78
@ ADD_SMT_PAD_STANDARD
Definition boardeditorfsm.h:77
@ DRAW_TRACE
librepcb::editor::BoardEditorState_DrawTrace
Definition boardeditorfsm.h:93
@ ADD_DEVICE
librepcb::editor::BoardEditorState_AddDevice
Definition boardeditorfsm.h:85
@ DRAW_ZONE
librepcb::editor::BoardEditorState_DrawZone
Definition boardeditorfsm.h:91
@ ADD_SMT_PAD_BGA
Definition boardeditorfsm.h:79
@ ADD_HOLE
librepcb::editor::BoardEditorState_AddHole
Definition boardeditorfsm.h:70
@ IDLE
No state active.
Definition boardeditorfsm.h:66
bool processCut() noexcept
Definition boardeditorfsm.cpp:225
bool processImportDxf() noexcept
Definition boardeditorfsm.cpp:191
bool leaveCurrentState() noexcept
Definition boardeditorfsm.cpp:427
bool processAddThtPad() noexcept
Definition boardeditorfsm.cpp:136
bool switchToPreviousState() noexcept
Definition boardeditorfsm.cpp:460
bool processMeasure() noexcept
Definition boardeditorfsm.cpp:201
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:393
bool processAbortCommand() noexcept
Definition boardeditorfsm.cpp:205
bool processAddVia() noexcept
Definition boardeditorfsm.cpp:132
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:343
BoardEditorFsm(const BoardEditorFsm &other)=delete
bool processFlip(Qt::Orientation orientation) noexcept
Definition boardeditorfsm.cpp:270
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:363
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:383
bool processMove(const Point &delta) noexcept
Definition boardeditorfsm.cpp:252
bool enterNextState(State state) noexcept
Definition boardeditorfsm.cpp:450
State mCurrentState
Definition boardeditorfsm.h:172
bool processSetLocked(bool locked) noexcept
Definition boardeditorfsm.cpp:288
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:353
bool processRotate(const Angle &rotation) noexcept
Definition boardeditorfsm.cpp:261
bool processAddHole() noexcept
Definition boardeditorfsm.cpp:124
bool processChangeLineWidth(int step) noexcept
Definition boardeditorfsm.cpp:297
bool processDrawZone() noexcept
Definition boardeditorfsm.cpp:183
QMap< State, BoardEditorState * > mStates
Definition boardeditorfsm.h:171
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:373
bool processPaste() noexcept
Definition boardeditorfsm.cpp:243
bool processSnapToGrid() noexcept
Definition boardeditorfsm.cpp:279
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:99
GraphicsLayerList & layers
Definition boardeditorfsm.h:104
BoardEditorFsmAdapter & adapter
Definition boardeditorfsm.h:105
Workspace & workspace
Definition boardeditorfsm.h:100
Board & board
Definition boardeditorfsm.h:102
UndoStack & undoStack
Definition boardeditorfsm.h:103
Project & project
Definition boardeditorfsm.h:101
Definition graphicsscene.h:52
Definition graphicsscene.h:45