20#ifndef LIBREPCB_EDITOR_SCHEMATICEDITORFSM_H
21#define LIBREPCB_EDITOR_SCHEMATICEDITORFSM_H
46class SchematicEditorFsmAdapter;
47class SchematicEditorState;
48class SchematicGraphicsScene;
50struct GraphicsSceneKeyEvent;
51struct GraphicsSceneMouseEvent;
101 QObject* parent =
nullptr) noexcept;
112 const QString& format = QString(),
113 const QString& basename = QString()) 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 Schematic class represents one schematic page of a project and is always part of a circuit.
Definition schematic.h:81
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 schematic editor FSM.
Definition schematiceditorfsmadapter.h:62
The schematic editor finite state machine (FSM)
Definition schematiceditorfsm.h:60
bool processResetAllTexts() noexcept
Definition schematiceditorfsm.cpp:259
bool setNextState(State state) noexcept
Definition schematiceditorfsm.cpp:380
bool processDrawBus(std::optional< Uuid > busUuid=std::nullopt) noexcept
Definition schematiceditorfsm.cpp:160
bool processSelectAll() noexcept
Definition schematiceditorfsm.cpp:187
bool processDrawPolygon() noexcept
Definition schematiceditorfsm.cpp:132
bool processRemove() noexcept
Definition schematiceditorfsm.cpp:268
SchematicEditorFsm(const SchematicEditorFsm &other)=delete
bool processSelect() noexcept
Definition schematiceditorfsm.cpp:94
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept
Definition schematiceditorfsm.cpp:286
bool processAddImage(const QByteArray &data=QByteArray(), const QString &format=QString(), const QString &basename=QString()) noexcept
Definition schematiceditorfsm.cpp:140
bool processCopy() noexcept
Definition schematiceditorfsm.cpp:205
bool processEditProperties() noexcept
Definition schematiceditorfsm.cpp:277
State mPreviousState
Definition schematiceditorfsm.h:156
State
FSM States.
Definition schematiceditorfsm.h:74
@ DRAW_BUS
librepcb::editor::SchematicEditorState_DrawBus
Definition schematiceditorfsm.h:82
@ ADD_COMPONENT
librepcb::editor::SchematicEditorState_AddComponent
Definition schematiceditorfsm.h:86
@ MEASURE
librepcb::editor::SchematicEditorState_Measure
Definition schematiceditorfsm.h:94
@ SELECT
librepcb::editor::SchematicEditorState_Select
Definition schematiceditorfsm.h:78
@ ADD_IMAGE
librepcb::editor::SchematicEditorState_AddImage
Definition schematiceditorfsm.h:92
@ DRAW_WIRE
librepcb::editor::SchematicEditorState_DrawWire
Definition schematiceditorfsm.h:80
@ DRAW_POLYGON
librepcb::editor::SchematicEditorState_DrawPolygon
Definition schematiceditorfsm.h:88
@ ADD_LABEL
librepcb::editor::SchematicEditorState_AddLabel
Definition schematiceditorfsm.h:84
@ ADD_TEXT
librepcb::editor::SchematicEditorState_AddText
Definition schematiceditorfsm.h:90
@ IDLE
no state active
Definition schematiceditorfsm.h:76
bool processCut() noexcept
Definition schematiceditorfsm.cpp:196
bool leaveCurrentState() noexcept
Definition schematiceditorfsm.cpp:394
bool switchToPreviousState() noexcept
Definition schematiceditorfsm.cpp:426
bool processMeasure() noexcept
Definition schematiceditorfsm.cpp:172
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:346
bool processAbortCommand() noexcept
Definition schematiceditorfsm.cpp:176
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept
Definition schematiceditorfsm.cpp:296
bool processGridIntervalChanged(const PositiveLength &interval) noexcept
Definition schematiceditorfsm.cpp:362
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:316
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:336
bool processMove(const Point &delta) noexcept
Definition schematiceditorfsm.cpp:223
bool enterNextState(State state) noexcept
Definition schematiceditorfsm.cpp:416
State mCurrentState
Definition schematiceditorfsm.h:155
SchematicEditorFsm()=delete
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:306
bool processRotate(const Angle &rotation) noexcept
Definition schematiceditorfsm.cpp:232
bool processAddText() noexcept
Definition schematiceditorfsm.cpp:136
bool processDrawWire() noexcept
Definition schematiceditorfsm.cpp:156
bool processAddComponent(const QString &searchTerm=QString()) noexcept
Definition schematiceditorfsm.cpp:98
SchematicEditorState * getCurrentStateObj() const noexcept
Definition schematiceditorfsm.cpp:376
bool processMirror(Qt::Orientation orientation) noexcept
Definition schematiceditorfsm.cpp:241
bool processAddNetLabel() noexcept
Definition schematiceditorfsm.cpp:128
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition schematiceditorfsm.cpp:326
QMap< State, SchematicEditorState * > mStates
Definition schematiceditorfsm.h:154
bool processPaste() noexcept
Definition schematiceditorfsm.cpp:214
bool processSnapToGrid() noexcept
Definition schematiceditorfsm.cpp:250
The schematic editor state base class.
Definition schematiceditorstate.h:58
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
FSM Context.
Definition schematiceditorfsm.h:65
Schematic & schematic
Definition schematiceditorfsm.h:68
Workspace & workspace
Definition schematiceditorfsm.h:66
UndoStack & undoStack
Definition schematiceditorfsm.h:69
SchematicEditorFsmAdapter & adapter
Definition schematiceditorfsm.h:70
Project & project
Definition schematiceditorfsm.h:67