20#ifndef LIBREPCB_EDITOR_BOARDEDITORFSM_H
21#define LIBREPCB_EDITOR_BOARDEDITORFSM_H
35class ComponentInstance;
44class BoardEditorState;
102 QObject* parent =
nullptr) noexcept;
114 const
Uuid& footprint) noexcept;
128 bool processFlip(Qt::Orientation orientation) noexcept;
139 QGraphicsSceneMouseEvent& e) noexcept;
141 QGraphicsSceneMouseEvent& e) noexcept;
143 QGraphicsSceneMouseEvent& e) noexcept;
145 QGraphicsSceneMouseEvent& e) noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
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
The board editor finite state machine.
Definition boardeditorfsm.h:57
bool processResetAllTexts() noexcept
Definition boardeditorfsm.cpp:256
State getCurrentState() const noexcept
Definition boardeditorfsm.h:106
bool processDrawPlane() noexcept
Definition boardeditorfsm.cpp:129
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:341
bool processKeyReleased(const QKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:292
bool setNextState(State state) noexcept
Definition boardeditorfsm.cpp:374
bool processSwitchToBoard(int index) noexcept
Definition boardeditorfsm.cpp:357
bool processAddStrokeText() noexcept
Definition boardeditorfsm.cpp:101
BoardEditorState * getCurrentStateObj() const noexcept
Definition boardeditorfsm.cpp:370
bool processKeyPressed(const QKeyEvent &e) noexcept
Definition boardeditorfsm.cpp:283
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:331
void statusBarMessageChanged(const QString &message, int timeoutMs=-1)
bool processSelectAll() noexcept
Definition boardeditorfsm.cpp:166
bool processAddDevice(ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
Definition boardeditorfsm.cpp:109
bool processDrawPolygon() noexcept
Definition boardeditorfsm.cpp:125
bool processRemove() noexcept
Definition boardeditorfsm.cpp:265
bool processSelect() noexcept
Definition boardeditorfsm.cpp:93
bool processCopy() noexcept
Definition boardeditorfsm.cpp:184
bool processDrawTrace() noexcept
Definition boardeditorfsm.cpp:137
bool processEditProperties() noexcept
Definition boardeditorfsm.cpp:274
State mPreviousState
Definition boardeditorfsm.h:181
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:175
bool processImportDxf() noexcept
Definition boardeditorfsm.cpp:141
bool leaveCurrentState() noexcept
Definition boardeditorfsm.cpp:384
bool switchToPreviousState() noexcept
Definition boardeditorfsm.cpp:419
bool processMeasure() noexcept
Definition boardeditorfsm.cpp:151
bool processAbortCommand() noexcept
Definition boardeditorfsm.cpp:155
bool processAddVia() noexcept
Definition boardeditorfsm.cpp:105
BoardEditorFsm(const BoardEditorFsm &other)=delete
bool processFlip(Qt::Orientation orientation) noexcept
Definition boardeditorfsm.cpp:220
bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:321
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:311
bool processMove(const Point &delta) noexcept
Definition boardeditorfsm.cpp:202
void stateChanged(State newState)
bool enterNextState(State state) noexcept
Definition boardeditorfsm.cpp:408
State mCurrentState
Definition boardeditorfsm.h:180
bool processSetLocked(bool locked) noexcept
Definition boardeditorfsm.cpp:238
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept
Definition boardeditorfsm.cpp:301
bool processRotate(const Angle &rotation) noexcept
Definition boardeditorfsm.cpp:211
bool processAddHole() noexcept
Definition boardeditorfsm.cpp:97
bool processChangeLineWidth(int step) noexcept
Definition boardeditorfsm.cpp:247
bool processDrawZone() noexcept
Definition boardeditorfsm.cpp:133
QMap< State, BoardEditorState * > mStates
Definition boardeditorfsm.h:179
bool processPaste() noexcept
Definition boardeditorfsm.cpp:193
bool processSnapToGrid() noexcept
Definition boardeditorfsm.cpp:229
The BoardEditor class.
Definition boardeditor.h:79
The board editor state base class.
Definition boardeditorstate.h:59
The GraphicsView class.
Definition graphicsview.h:52
The ProjectEditor class.
Definition projecteditor.h:66
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:76
FSM Context.
Definition boardeditorfsm.h:88
GraphicsView & editorGraphicsView
Definition boardeditorfsm.h:93
BoardEditor & editor
Definition boardeditorfsm.h:92
ToolBarProxy & commandToolBar
Definition boardeditorfsm.h:94
Workspace & workspace
Definition boardeditorfsm.h:89
UndoStack & undoStack
Definition boardeditorfsm.h:95
Project & project
Definition boardeditorfsm.h:90
ProjectEditor & projectEditor
Definition boardeditorfsm.h:91