20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
47class CmdDragSelectedFootprintItems;
50class FootprintClipboardData;
79 bool exit() noexcept override;
81 const noexcept override;
85 QGraphicsSceneMouseEvent& e) noexcept override;
87 QGraphicsSceneMouseEvent& e) noexcept override;
89 QGraphicsSceneMouseEvent& e) noexcept override;
91 QGraphicsSceneMouseEvent& e) noexcept override;
93 QGraphicsSceneMouseEvent& e) noexcept override;
100 bool processMirror(Qt::Orientation orientation) noexcept override;
101 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
The PackageEditorState_Select class.
Definition packageeditorstate_select.h:59
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:143
bool processGenerateCourtyard() noexcept override
Definition packageeditorstate_select.cpp:606
void setState(SubState state) noexcept
Definition packageeditorstate_select.cpp:1696
bool moveAlignSelectedItems() noexcept
Definition packageeditorstate_select.cpp:1271
void clearSelectionRect(bool updateItemsSelectionState) noexcept
Definition packageeditorstate_select.cpp:1635
bool processEditProperties() noexcept override
Definition packageeditorstate_select.cpp:563
bool processMoveAlign() noexcept override
Definition packageeditorstate_select.cpp:528
bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:302
bool mirrorSelectedItems(Qt::Orientation orientation, bool flipLayers) noexcept
Definition packageeditorstate_select.cpp:1248
bool processGenerateOutline() noexcept override
Definition packageeditorstate_select.cpp:595
SubState mState
Definition packageeditorstate_select.h:151
bool copySelectedItemsToClipboard() noexcept
Definition packageeditorstate_select.cpp:996
bool processRemove() noexcept override
Definition packageeditorstate_select.cpp:552
bool rotateSelectedItems(const Angle &angle) noexcept
Definition packageeditorstate_select.cpp:1231
std::unique_ptr< CmdPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition packageeditorstate_select.h:160
~PackageEditorState_Select() noexcept
Definition packageeditorstate_select.cpp:86
bool generateCourtyard() noexcept
Definition packageeditorstate_select.cpp:1409
bool processAbortCommand() noexcept override
Definition packageeditorstate_select.cpp:700
bool processPaste() noexcept override
Definition packageeditorstate_select.cpp:431
bool pasteGeometryFromClipboard(std::unique_ptr< FootprintClipboardData > data) noexcept
Definition packageeditorstate_select.cpp:1089
std::unique_ptr< CmdZoneEdit > mCmdZoneEdit
The zone edit command (nullptr if not editing)
Definition packageeditorstate_select.h:167
void removeZoneVertices(std::shared_ptr< Zone > zone, const QVector< int > vertices) noexcept
Definition packageeditorstate_select.cpp:1586
bool removeSelectedItems() noexcept
Definition packageeditorstate_select.cpp:1312
bool canPasteGeometry(const std::unique_ptr< FootprintClipboardData > &data) const noexcept
Definition packageeditorstate_select.cpp:1062
bool openPropertiesDialogOfItem(std::shared_ptr< QGraphicsItem > item) noexcept
Definition packageeditorstate_select.cpp:928
bool processRotate(const Angle &rotation) noexcept override
Definition packageeditorstate_select.cpp:487
std::shared_ptr< Polygon > mSelectedPolygon
The current polygon selected for editing (nullptr if none)
Definition packageeditorstate_select.h:156
bool processSelectAll() noexcept override
Definition packageeditorstate_select.cpp:385
bool findZoneVerticesAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1676
bool processImportDxf() noexcept override
Definition packageeditorstate_select.cpp:617
bool openContextMenuAtPos(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:739
void startAddingPolygonVertex(std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1565
bool openPropertiesDialogOfItemAtPos(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:985
bool startPaste(std::unique_ptr< FootprintClipboardData > data, const std::optional< Point > &fixedPosition)
Definition packageeditorstate_select.cpp:1188
PackageEditorState_Select(const PackageEditorState_Select &other)=delete
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1655
bool processCut() noexcept override
Definition packageeditorstate_select.cpp:405
void startAddingZoneVertex(std::shared_ptr< Zone > zone, int vertex, const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1607
QVector< int > mSelectedZoneVertices
The zone vertex indices selected for editing (empty if none)
Definition packageeditorstate_select.h:165
bool exit() noexcept override
Definition packageeditorstate_select.cpp:94
QVector< int > mSelectedPolygonVertices
The polygon vertex indices selected for editing (empty if none)
Definition packageeditorstate_select.h:158
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition(const Point &pos) noexcept
Definition packageeditorstate_select.cpp:1644
bool processSnapToGrid() noexcept override
Definition packageeditorstate_select.cpp:539
PackageEditorState_Select()=delete
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:369
Point mStartPos
Definition packageeditorstate_select.h:152
void setSelectionRect(const Point &p1, const Point &p2) noexcept
Definition packageeditorstate_select.cpp:1628
bool processFlip(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_select.cpp:514
bool processMirror(Qt::Orientation orientation) noexcept override
Definition packageeditorstate_select.cpp:500
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition packageeditorstate_select.cpp:104
void removePolygonVertices(std::shared_ptr< Polygon > polygon, const QVector< int > vertices) noexcept
Definition packageeditorstate_select.cpp:1539
std::unique_ptr< CmdDragSelectedFootprintItems > mCmdDragSelectedItems
Definition packageeditorstate_select.h:153
bool snapSelectedItemsToGrid() noexcept
Definition packageeditorstate_select.cpp:1300
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:204
SubState
Definition packageeditorstate_select.h:62
bool processMove(const Point &delta) noexcept override
Definition packageeditorstate_select.cpp:463
bool processCopy() noexcept override
Definition packageeditorstate_select.cpp:420
std::shared_ptr< Zone > mSelectedZone
The current zone selected for editing (nullptr if none)
Definition packageeditorstate_select.h:163
bool generateOutline() noexcept
Definition packageeditorstate_select.cpp:1321
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition packageeditorstate_select.cpp:354
The PackageEditorState class is the base class of all package editor FSM states.
Definition packageeditorstate.h:52
Definition occmodel.cpp:76
Definition packageeditorfsm.h:90