20 #ifndef LIBREPCB_EDITOR_PACKAGEEDITORFSM_H 21 #define LIBREPCB_EDITOR_PACKAGEEDITORFSM_H 26 #include "../../editorwidgetbase.h" 44 class FootprintGraphicsItem;
47 class PackageEditorState;
48 class PackageEditorWidget;
49 class PrimitiveTextGraphicsItem;
121 const std::shared_ptr<Footprint>& fpt) noexcept;
126 QGraphicsSceneMouseEvent& e) noexcept;
128 QGraphicsSceneMouseEvent& e) noexcept;
130 QGraphicsSceneMouseEvent& e) noexcept;
132 QGraphicsSceneMouseEvent& e) noexcept;
137 bool processMove(Qt::ArrowType direction) noexcept;
140 bool processFlip(Qt::Orientation orientation) noexcept;
bool processSnapToGrid() noexcept
Definition: packageeditorfsm.cpp:382
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept
Definition: packageeditorfsm.cpp:265
std::shared_ptr< Footprint > currentFootprint
Definition: packageeditorfsm.h:97
PackageEditorWidget & editorWidget
Definition: packageeditorfsm.h:91
bool processStartDrawZones() noexcept
Definition: packageeditorfsm.cpp:491
Definition: packageeditorfsm.h:89
ToolBarProxy & commandToolBar
Definition: packageeditorfsm.h:99
bool processAbortCommand() noexcept
Definition: packageeditorfsm.cpp:423
bool processStartDrawTexts() noexcept
Definition: packageeditorfsm.cpp:487
bool enterNextState(State state) noexcept
Definition: packageeditorfsm.cpp:554
std::shared_ptr< FootprintGraphicsItem > currentGraphicsItem
Definition: packageeditorfsm.h:98
The GraphicsView class.
Definition: graphicsview.h:51
bool processStartAddingFootprintSmtPads(FootprintPad::Function function) noexcept
Definition: packageeditorfsm.cpp:439
bool processStartMeasure() noexcept
Definition: packageeditorfsm.cpp:509
bool processStartDxfImport() noexcept
Definition: packageeditorfsm.cpp:499
Definition: occmodel.cpp:77
QMap< State, PackageEditorState * > mStates
Definition: packageeditorfsm.h:181
bool processStartDrawPolygons() noexcept
Definition: packageeditorfsm.cpp:479
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept
Definition: packageeditorfsm.cpp:285
void availableFeaturesChanged()
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition: packageeditorfsm.cpp:296
PackageEditorState * getCurrentState() const noexcept
Definition: packageeditorfsm.cpp:517
bool processStartDrawRects() noexcept
Definition: packageeditorfsm.cpp:475
LengthUnit & lengthUnit
Definition: packageeditorfsm.h:95
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:78
The Package class represents a package of a component (including footprint and 3D model) ...
Definition: package.h:59
bool switchToPreviousState() noexcept
Definition: packageeditorfsm.cpp:568
bool processRotate(const Angle &rotation) noexcept
Definition: packageeditorfsm.cpp:355
State
Definition: packageeditorfsm.h:64
Context mContext
Definition: packageeditorfsm.h:180
bool processGenerateCourtyard() noexcept
Definition: packageeditorfsm.cpp:415
bool processStartDrawLines() noexcept
Definition: packageeditorfsm.cpp:467
EditorWidgetBase::Context & editorContext
Definition: packageeditorfsm.h:90
bool setNextState(State state) noexcept
Definition: packageeditorfsm.cpp:521
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition: undostack.h:106
bool processStartSelecting() noexcept
Definition: packageeditorfsm.cpp:431
bool processStartDrawCircles() noexcept
Definition: packageeditorfsm.cpp:483
bool processSelectAll() noexcept
Definition: packageeditorfsm.cpp:314
bool processCopy() noexcept
Definition: packageeditorfsm.cpp:330
bool processKeyPressed(const QKeyEvent &e) noexcept
Definition: packageeditorfsm.cpp:237
bool processStartAddingValues() noexcept
Definition: packageeditorfsm.cpp:463
bool processRemove() noexcept
Definition: packageeditorfsm.cpp:390
UndoStack & undoStack
Definition: packageeditorfsm.h:92
GraphicsScene & graphicsScene
Definition: packageeditorfsm.h:93
bool processEditProperties() noexcept
Definition: packageeditorfsm.cpp:399
std::shared_ptr< Footprint > getCurrentFootprint() const noexcept
Definition: packageeditorfsm.cpp:173
void statusBarMessageChanged(const QString &message, int timeoutMs=-1)
bool processStartAddingFootprintThtPads() noexcept
Definition: packageeditorfsm.cpp:435
The GraphicsScene class.
Definition: graphicsscene.h:45
bool processGenerateOutline() noexcept
Definition: packageeditorfsm.cpp:407
bool leaveCurrentState() noexcept
Definition: packageeditorfsm.cpp:537
QSet< EditorWidgetBase::Feature > mAvailableFeatures
Definition: packageeditorfsm.h:185
PackageEditorFsm()=delete
bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept
Definition: packageeditorfsm.cpp:275
bool processCut() noexcept
Definition: packageeditorfsm.cpp:322
Package & package
Definition: packageeditorfsm.h:96
State mPreviousState
Definition: packageeditorfsm.h:183
PackageEditorFsm & operator=(const PackageEditorFsm &rhs)=delete
bool processKeyReleased(const QKeyEvent &e) noexcept
Definition: packageeditorfsm.cpp:246
void toolChanged(EditorWidgetBase::Tool newTool)
bool processStartAddingNames() noexcept
Definition: packageeditorfsm.cpp:459
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept
Definition: packageeditorfsm.cpp:255
EditorWidgetBase::Tool getCurrentTool() const noexcept
Definition: packageeditorfsm.cpp:129
virtual ~PackageEditorFsm() noexcept
Definition: packageeditorfsm.cpp:119
The PackageEditorFsm class is the finit state machine (FSM) of the package editor.
Definition: packageeditorfsm.h:60
QScopedPointer< PrimitiveTextGraphicsItem > mSelectFootprintGraphicsItem
Definition: packageeditorfsm.h:184
bool processStartAddingHoles() noexcept
Definition: packageeditorfsm.cpp:495
bool processStartDrawArcs() noexcept
Definition: packageeditorfsm.cpp:471
bool processMove(Qt::ArrowType direction) noexcept
Definition: packageeditorfsm.cpp:346
const QSet< EditorWidgetBase::Feature > & getAvailableFeatures() const noexcept
Definition: packageeditorfsm.h:112
bool processFlip(Qt::Orientation orientation) noexcept
Definition: packageeditorfsm.cpp:373
The PackageEditorState class is the base class of all package editor FSM states.
Definition: packageeditorstate.h:52
bool processChangeCurrentFootprint(const std::shared_ptr< Footprint > &fpt) noexcept
Definition: packageeditorfsm.cpp:197
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition: lengthunit.h:60
Definition: editorwidgetbase.h:68
void updateAvailableFeatures() noexcept
Definition: packageeditorfsm.cpp:182
bool processPaste() noexcept
Definition: packageeditorfsm.cpp:338
bool processMirror(Qt::Orientation orientation) noexcept
Definition: packageeditorfsm.cpp:364
GraphicsView & graphicsView
Definition: packageeditorfsm.h:94
State mCurrentState
Definition: packageeditorfsm.h:182