20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITORFSM_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITORFSM_H
45class SchematicEditorState;
95 QObject* parent =
nullptr) noexcept;
125 QGraphicsSceneMouseEvent& e) noexcept;
127 QGraphicsSceneMouseEvent& e) noexcept;
129 QGraphicsSceneMouseEvent& e) noexcept;
131 QGraphicsSceneMouseEvent& e) noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
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 GraphicsView class.
Definition graphicsview.h:52
The ProjectEditor class.
Definition projecteditor.h:66
The schematic editor finite state machine (FSM)
Definition schematiceditorfsm.h:56
bool processResetAllTexts() noexcept
Definition schematiceditorfsm.cpp:209
State getCurrentState() const noexcept
Definition schematiceditorfsm.h:99
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:294
bool processKeyReleased(const QKeyEvent &e) noexcept
Definition schematiceditorfsm.cpp:245
bool setNextState(State state) noexcept
Definition schematiceditorfsm.cpp:327
bool processKeyPressed(const QKeyEvent &e) noexcept
Definition schematiceditorfsm.cpp:236
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:284
void statusBarMessageChanged(const QString &message, int timeoutMs=-1)
bool processSelectAll() noexcept
Definition schematiceditorfsm.cpp:146
bool processDrawPolygon() noexcept
Definition schematiceditorfsm.cpp:119
bool processRemove() noexcept
Definition schematiceditorfsm.cpp:218
SchematicEditorFsm(const SchematicEditorFsm &other)=delete
bool processSelect() noexcept
Definition schematiceditorfsm.cpp:81
bool processCopy() noexcept
Definition schematiceditorfsm.cpp:164
bool processEditProperties() noexcept
Definition schematiceditorfsm.cpp:227
State mPreviousState
Definition schematiceditorfsm.h:168
State
FSM States.
Definition schematiceditorfsm.h:61
@ ADD_COMPONENT
librepcb::editor::SchematicEditorState_AddComponent
Definition schematiceditorfsm.h:71
@ MEASURE
librepcb::editor::SchematicEditorState_Measure
Definition schematiceditorfsm.h:77
@ SELECT
librepcb::editor::SchematicEditorState_Select
Definition schematiceditorfsm.h:65
@ DRAW_WIRE
librepcb::editor::SchematicEditorState_DrawWire
Definition schematiceditorfsm.h:67
@ DRAW_POLYGON
librepcb::editor::SchematicEditorState_DrawPolygon
Definition schematiceditorfsm.h:73
@ ADD_NETLABEL
librepcb::editor::SchematicEditorState_AddNetLabel
Definition schematiceditorfsm.h:69
@ ADD_TEXT
librepcb::editor::SchematicEditorState_AddText
Definition schematiceditorfsm.h:75
@ IDLE
no state active
Definition schematiceditorfsm.h:63
bool processCut() noexcept
Definition schematiceditorfsm.cpp:155
bool leaveCurrentState() noexcept
Definition schematiceditorfsm.cpp:337
bool switchToPreviousState() noexcept
Definition schematiceditorfsm.cpp:371
bool processMeasure() noexcept
Definition schematiceditorfsm.cpp:131
bool processAbortCommand() noexcept
Definition schematiceditorfsm.cpp:135
bool processSwitchToSchematicPage(int index) noexcept
Definition schematiceditorfsm.cpp:310
bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:274
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:264
bool processMove(const Point &delta) noexcept
Definition schematiceditorfsm.cpp:182
void stateChanged(State newState)
bool enterNextState(State state) noexcept
Definition schematiceditorfsm.cpp:360
State mCurrentState
Definition schematiceditorfsm.h:167
SchematicEditorFsm()=delete
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:254
bool processRotate(const Angle &rotation) noexcept
Definition schematiceditorfsm.cpp:191
bool processAddText() noexcept
Definition schematiceditorfsm.cpp:123
bool processDrawWire() noexcept
Definition schematiceditorfsm.cpp:127
bool processAddComponent(const QString &searchTerm=QString()) noexcept
Definition schematiceditorfsm.cpp:85
SchematicEditorState * getCurrentStateObj() const noexcept
Definition schematiceditorfsm.cpp:323
bool processMirror(Qt::Orientation orientation) noexcept
Definition schematiceditorfsm.cpp:200
bool processAddNetLabel() noexcept
Definition schematiceditorfsm.cpp:115
QMap< State, SchematicEditorState * > mStates
Definition schematiceditorfsm.h:166
bool processPaste() noexcept
Definition schematiceditorfsm.cpp:173
The SchematicEditor class.
Definition schematiceditor.h:73
The schematic editor state base class.
Definition schematiceditorstate.h:57
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:76
FSM Context.
Definition schematiceditorfsm.h:81
GraphicsView & editorGraphicsView
Definition schematiceditorfsm.h:86
ToolBarProxy & commandToolBar
Definition schematiceditorfsm.h:87
SchematicEditor & editor
Definition schematiceditorfsm.h:85
Workspace & workspace
Definition schematiceditorfsm.h:82
UndoStack & undoStack
Definition schematiceditorfsm.h:88
Project & project
Definition schematiceditorfsm.h:83
ProjectEditor & projectEditor
Definition schematiceditorfsm.h:84