20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
46class CmdDragSelectedFootprintItems;
49class FootprintClipboardData;
78 bool entry() noexcept override;
79 bool exit() noexcept override;
98 bool processMirror(Qt::Orientation orientation) noexcept override;
99 bool processFlip(Qt::Orientation orientation) noexcept override;
125 const
std::optional<
Point>& fixedPosition);
128 bool flipLayers) noexcept;
135 const QVector<
int> vertices) noexcept;
137 const
Point& pos) noexcept;
139 const QVector<
int> vertices) noexcept;
141 const
Point& pos) noexcept;
145 const
Point& pos) 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 Polygon class.
Definition polygon.h:45
The Zone class.
Definition zone.h:43
The CmdPolygonEdit class.
Definition cmdpolygonedit.h:51
The CmdZoneEdit class.
Definition cmdzoneedit.h:48
Interface for the integration of the Package editor FSM.
Definition packageeditorfsmadapter.h:64
The PackageEditorState_Select class.
Definition packageeditorstate_select.h:58
bool processGenerateCourtyard() noexcept override
Definition packageeditorstate_select.cpp:592
void setState(SubState state) noexcept
Definition packageeditorstate_select.cpp:1689
bool moveAlignSelectedItems() noexcept
Definition packageeditorstate_select.cpp:1252
void clearSelectionRect(bool updateItemsSelectionState) noexcept
Definition packageeditorstate_select.cpp:1623
bool processEditProperties() noexcept override
Definition packageeditorstate_select.cpp:549
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:132
bool processMoveAlign() noexcept override
Definition packageeditorstate_select.cpp:514
bool processGridIntervalChanged(const PositiveLength &interval) noexcept override
Definition packageeditorstate_select.cpp:708
bool mirrorSelectedItems(Qt::Orientation orientation, bool flipLayers) noexcept
Definition packageeditorstate_select.cpp:1226
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:356
bool processGenerateOutline() noexcept override
Definition packageeditorstate_select.cpp:581
SubState mState
Definition packageeditorstate_select.h:153
bool copySelectedItemsToClipboard() noexcept
Definition packageeditorstate_select.cpp:977
bool processRemove() noexcept override
Definition packageeditorstate_select.cpp:538
bool rotateSelectedItems(const Angle &angle) noexcept
Definition packageeditorstate_select.cpp:1206
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:292
std::unique_ptr< CmdPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition packageeditorstate_select.h:162
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:195
~PackageEditorState_Select() noexcept
Definition packageeditorstate_select.cpp:83
bool generateCourtyard() noexcept
Definition packageeditorstate_select.cpp:1396
bool processAbortCommand() noexcept override
Definition packageeditorstate_select.cpp:673
bool processPaste() noexcept override
Definition packageeditorstate_select.cpp:418
bool pasteGeometryFromClipboard(std::unique_ptr< FootprintClipboardData > data) noexcept
Definition packageeditorstate_select.cpp:1066
std::unique_ptr< CmdZoneEdit > mCmdZoneEdit
The zone edit command (nullptr if not editing)
Definition packageeditorstate_select.h:169
void removeZoneVertices(std::shared_ptr< Zone > zone, const QVector< int > vertices) noexcept
Definition packageeditorstate_select.cpp:1571
bool removeSelectedItems() noexcept
Definition packageeditorstate_select.cpp:1299
bool canPasteGeometry(const std::unique_ptr< FootprintClipboardData > &data) const noexcept
Definition packageeditorstate_select.cpp:1039
bool openPropertiesDialogOfItem(std::shared_ptr< QGraphicsItem > item) noexcept
Definition packageeditorstate_select.cpp:911
bool processRotate(const Angle &rotation) noexcept override
Definition packageeditorstate_select.cpp:473
std::shared_ptr< Polygon > mSelectedPolygon
The current polygon selected for editing (nullptr if none)
Definition packageeditorstate_select.h:158
bool processSelectAll() noexcept override
Definition packageeditorstate_select.cpp:372
bool findZoneVerticesAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1667
std::unique_ptr< QTimer > mUpdateAvailableFeaturesTimer
Delay timer for updateAvailableFeatures(), only when in this state.
Definition packageeditorstate_select.h:175
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:341
bool processImportDxf() noexcept override
Definition packageeditorstate_select.cpp:603
bool openContextMenuAtPos(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:719
void startAddingPolygonVertex(std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1550
bool openPropertiesDialogOfItemAtPos(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:966
bool startPaste(std::unique_ptr< FootprintClipboardData > data, const std::optional< Point > &fixedPosition)
Definition packageeditorstate_select.cpp:1165
QList< QMetaObject::Connection > mConnections
Signal/slot connections only when in this state.
Definition packageeditorstate_select.h:172
PackageEditorState_Select(const PackageEditorState_Select &other)=delete
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1644
bool processCut() noexcept override
Definition packageeditorstate_select.cpp:392
void startAddingZoneVertex(std::shared_ptr< Zone > zone, int vertex, const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1592
QVector< int > mSelectedZoneVertices
The zone vertex indices selected for editing (empty if none)
Definition packageeditorstate_select.h:167
bool exit() noexcept override
Definition packageeditorstate_select.cpp:111
void scheduleUpdateAvailableFeatures() noexcept
Definition packageeditorstate_select.cpp:1696
QVector< int > mSelectedPolygonVertices
The polygon vertex indices selected for editing (empty if none)
Definition packageeditorstate_select.h:160
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1634
bool processSnapToGrid() noexcept override
Definition packageeditorstate_select.cpp:525
PackageEditorState_Select()=delete
PackageEditorFsmAdapter::Features updateAvailableFeatures() noexcept
Definition packageeditorstate_select.cpp:1701
Point mStartPos
Definition packageeditorstate_select.h:154
void setSelectionRect(const Point &p1, const Point &p2) noexcept
Definition packageeditorstate_select.cpp:1613
bool processFlip(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_select.cpp:500
bool processMirror(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_select.cpp:486
void removePolygonVertices(std::shared_ptr< Polygon > polygon, const QVector< int > vertices) noexcept
Definition packageeditorstate_select.cpp:1524
std::unique_ptr< CmdDragSelectedFootprintItems > mCmdDragSelectedItems
Definition packageeditorstate_select.h:155
bool snapSelectedItemsToGrid() noexcept
Definition packageeditorstate_select.cpp:1284
SubState
Definition packageeditorstate_select.h:61
bool processMove(const Point &delta) noexcept override
Definition packageeditorstate_select.cpp:450
bool processCopy() noexcept override
Definition packageeditorstate_select.cpp:407
std::shared_ptr< Zone > mSelectedZone
The current zone selected for editing (nullptr if none)
Definition packageeditorstate_select.h:165
bool entry() noexcept override
Definition packageeditorstate_select.cpp:91
bool generateOutline() noexcept
Definition packageeditorstate_select.cpp:1310
The PackageEditorState class is the base class of all package editor FSM states.
Definition packageeditorstate.h:52
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
Definition graphicsscene.h:45
Definition packageeditorfsm.h:89