20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORFSM_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORFSM_H
26#include "../../editorwidgetbase.h"
44class FootprintGraphicsItem;
47class PackageEditorState;
48class PackageEditorWidget;
49class PrimitiveTextGraphicsItem;
51struct GraphicsSceneKeyEvent;
52struct GraphicsSceneMouseEvent;
144 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 LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:62
The Package class represents a package of a component (including footprint and 3D model)
Definition package.h:59
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The GraphicsScene class.
Definition graphicsscene.h:64
The GraphicsView class.
Definition graphicsview.h:48
The PackageEditorFsm class is the finit state machine (FSM) of the package editor.
Definition packageeditorfsm.h:62
PackageEditorFsm()=delete
Context mContext
Definition packageeditorfsm.h:186
bool processStartAddingNames() noexcept
Definition packageeditorfsm.cpp:474
bool processStartAddingHoles() noexcept
Definition packageeditorfsm.cpp:510
bool setNextState(State state) noexcept
Definition packageeditorfsm.cpp:540
bool processStartAddingValues() noexcept
Definition packageeditorfsm.cpp:478
void statusBarMessageChanged(const QString &message, int timeoutMs=-1)
PackageEditorState * getCurrentState() const noexcept
Definition packageeditorfsm.cpp:536
bool processChangeCurrentFootprint(const std::shared_ptr< Footprint > &fpt) noexcept
Definition packageeditorfsm.cpp:203
EditorWidgetBase::Tool getCurrentTool() const noexcept
Definition packageeditorfsm.cpp:133
bool processStartSelecting() noexcept
Definition packageeditorfsm.cpp:446
bool processStartDrawLines() noexcept
Definition packageeditorfsm.cpp:482
bool processSelectAll() noexcept
Definition packageeditorfsm.cpp:321
bool processStartDrawRects() noexcept
Definition packageeditorfsm.cpp:490
bool processRemove() noexcept
Definition packageeditorfsm.cpp:405
QSet< EditorWidgetBase::Feature > mAvailableFeatures
Definition packageeditorfsm.h:191
bool processKeyPressed(const GraphicsSceneKeyEvent &e) noexcept
Definition packageeditorfsm.cpp:242
bool processCopy() noexcept
Definition packageeditorfsm.cpp:337
bool processStartAddingFootprintSmtPads(FootprintPad::Function function) noexcept
Definition packageeditorfsm.cpp:454
bool processEditProperties() noexcept
Definition packageeditorfsm.cpp:414
State mPreviousState
Definition packageeditorfsm.h:189
State
Definition packageeditorfsm.h:66
@ ADD_SMT_PADS_LOCAL_FIDUCIAL
@ ADD_SMT_PADS_GLOBAL_FIDUCIAL
@ ADD_SMT_PADS_EDGE_CONNECTOR
bool processCut() noexcept
Definition packageeditorfsm.cpp:329
QMap< State, PackageEditorState * > mStates
Definition packageeditorfsm.h:187
bool leaveCurrentState() noexcept
Definition packageeditorfsm.cpp:556
bool switchToPreviousState() noexcept
Definition packageeditorfsm.cpp:591
bool processStartDrawTexts() noexcept
Definition packageeditorfsm.cpp:502
bool processStartDxfImport() noexcept
Definition packageeditorfsm.cpp:514
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:303
bool processGenerateOutline() noexcept
Definition packageeditorfsm.cpp:422
bool processAbortCommand() noexcept
Definition packageeditorfsm.cpp:438
bool processKeyReleased(const GraphicsSceneKeyEvent &e) noexcept
Definition packageeditorfsm.cpp:252
bool processFlip(Qt::Orientation orientation) noexcept
Definition packageeditorfsm.cpp:380
void toolChanged(EditorWidgetBase::Tool newTool)
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:272
QScopedPointer< PrimitiveTextGraphicsItem > mSelectFootprintGraphicsItem
Definition packageeditorfsm.h:190
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:292
bool processStartDrawCircles() noexcept
Definition packageeditorfsm.cpp:498
bool processMove(const Point &delta) noexcept
Definition packageeditorfsm.cpp:353
void updateAvailableFeatures() noexcept
Definition packageeditorfsm.cpp:188
bool enterNextState(State state) noexcept
Definition packageeditorfsm.cpp:575
State mCurrentState
Definition packageeditorfsm.h:188
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:262
bool processRotate(const Angle &rotation) noexcept
Definition packageeditorfsm.cpp:362
const QSet< EditorWidgetBase::Feature > & getAvailableFeatures() const noexcept
Definition packageeditorfsm.h:115
bool processStartMeasure() noexcept
Definition packageeditorfsm.cpp:524
PackageEditorFsm(const PackageEditorFsm &other)=delete
std::shared_ptr< Footprint > getCurrentFootprint() const noexcept
Definition packageeditorfsm.cpp:179
virtual ~PackageEditorFsm() noexcept
Definition packageeditorfsm.cpp:123
bool processStartDrawZones() noexcept
Definition packageeditorfsm.cpp:506
bool processStartReNumberPads() noexcept
Definition packageeditorfsm.cpp:528
bool processMoveAlign() noexcept
Definition packageeditorfsm.cpp:389
bool processGenerateCourtyard() noexcept
Definition packageeditorfsm.cpp:430
bool processMirror(Qt::Orientation orientation) noexcept
Definition packageeditorfsm.cpp:371
void availableFeaturesChanged()
bool processStartDrawArcs() noexcept
Definition packageeditorfsm.cpp:486
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept
Definition packageeditorfsm.cpp:282
bool processStartAddingFootprintThtPads() noexcept
Definition packageeditorfsm.cpp:450
bool processStartDrawPolygons() noexcept
Definition packageeditorfsm.cpp:494
bool processPaste() noexcept
Definition packageeditorfsm.cpp:345
bool processSnapToGrid() noexcept
Definition packageeditorfsm.cpp:397
The PackageEditorState class is the base class of all package editor FSM states.
Definition packageeditorstate.h:53
The PrimitiveTextGraphicsItem class is the graphical representation of a text.
Definition primitivetextgraphicsitem.h:52
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77
Definition editorwidgetbase.h:67
Definition graphicsscene.h:52
Definition graphicsscene.h:45
Definition packageeditorfsm.h:92
LengthUnit & lengthUnit
Definition packageeditorfsm.h:98
PackageEditorWidget & editorWidget
Definition packageeditorfsm.h:94
Package & package
Definition packageeditorfsm.h:99
GraphicsView & graphicsView
Definition packageeditorfsm.h:97
std::shared_ptr< FootprintGraphicsItem > currentGraphicsItem
Definition packageeditorfsm.h:101
ToolBarProxy & commandToolBar
Definition packageeditorfsm.h:102
GraphicsScene & graphicsScene
Definition packageeditorfsm.h:96
EditorWidgetBase::Context & editorContext
Definition packageeditorfsm.h:93
std::shared_ptr< Footprint > currentFootprint
Definition packageeditorfsm.h:100
UndoStack & undoStack
Definition packageeditorfsm.h:95