20#ifndef LIBREPCB_EDITOR_BOARDEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_BOARDEDITORSTATE_SELECT_H
55class BoardClipboardData;
56class CmdBoardPlaneEdit;
57class CmdBoardPolygonEdit;
58class CmdBoardZoneEdit;
59class CmdDragSelectedBoardItems;
60class UndoCommandGroup;
85 virtual
bool entry() noexcept override;
86 virtual
bool exit() noexcept override;
96 virtual
bool processFlip(Qt::Orientation orientation) noexcept override;
105 QGraphicsSceneMouseEvent& e) noexcept override;
107 QGraphicsSceneMouseEvent& e) noexcept override;
109 QGraphicsSceneMouseEvent& e) noexcept override;
111 QGraphicsSceneMouseEvent& e) noexcept override;
113 QGraphicsSceneMouseEvent& e) noexcept override;
122 const
Point& startPos) noexcept;
132 const QVector<
int> vertices) noexcept;
134 const QVector<
int> vertices) noexcept;
137 const
Point& pos) noexcept;
139 const
Point& pos) noexcept;
141 const
Point& pos) noexcept;
145 const
std::optional<
Point>& fixedPosition);
176 bool directionBackwards,
178 QSet<
Uuid>& visitedNetLines,
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The BI_Device class.
Definition bi_device.h:57
The BI_Hole class.
Definition bi_hole.h:46
The BI_NetLine class.
Definition bi_netline.h:71
The BI_Plane class.
Definition bi_plane.h:52
The BI_Polygon class.
Definition bi_polygon.h:46
The BI_StrokeText class.
Definition bi_stroketext.h:49
The BI_Via class.
Definition bi_via.h:44
The BI_Zone class.
Definition bi_zone.h:46
The ComponentInstance class.
Definition componentinstance.h:54
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The BoardClipboardData class.
Definition boardclipboarddata.h:64
The "select" state/tool of the board editor (default state)
Definition boardeditorstate_select.h:69
virtual bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition boardeditorstate_select.cpp:481
std::unique_ptr< CmdDragSelectedBoardItems > mSelectedItemsDragCommand
When dragging items, this undo command will be active.
Definition boardeditorstate_select.h:197
void openPlanePropertiesDialog(BI_Plane &plane) noexcept
Definition boardeditorstate_select.cpp:1839
bool startPaste(BoardGraphicsScene &scene, std::unique_ptr< BoardClipboardData > data, const std::optional< Point > &fixedPosition)
Definition boardeditorstate_select.cpp:1576
bool startMovingSelectedItems(BoardGraphicsScene &scene, const Point &startPos) noexcept
Definition boardeditorstate_select.cpp:1217
virtual bool processEditProperties() noexcept override
Definition boardeditorstate_select.cpp:423
QVector< int > mSelectedPlaneVertices
The plane vertex indices selected for editing (empty if none)
Definition boardeditorstate_select.h:209
virtual bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition boardeditorstate_select.cpp:627
std::unique_ptr< CmdBoardPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition boardeditorstate_select.h:204
bool findPlaneVerticesAtPosition(const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1671
bool copySelectedItemsToClipboard() noexcept
Definition boardeditorstate_select.cpp:1559
virtual bool processRemove() noexcept override
Definition boardeditorstate_select.cpp:412
bool rotateSelectedItems(const Angle &angle) noexcept
Definition boardeditorstate_select.cpp:1241
BoardEditorState_Select(const BoardEditorState_Select &other)=delete
virtual bool processChangeLineWidth(int step) noexcept override
Definition boardeditorstate_select.cpp:390
void measureLengthInDirection(BoardGraphicsScene &scene, bool directionBackwards, const BI_NetLine &netline, QSet< Uuid > &visitedNetLines, UnsignedLength &totalLength)
Internal helper method used by measureSelectedItems.
Definition boardeditorstate_select.cpp:1761
BI_Polygon * mSelectedPolygon
The current polygon selected for editing (nullptr if none)
Definition boardeditorstate_select.h:200
virtual bool processSwitchToBoard(int index) noexcept override
Definition boardeditorstate_select.cpp:1207
bool changeWidthOfSelectedItems(int step) noexcept
Definition boardeditorstate_select.cpp:1309
bool openPropertiesDialog(std::shared_ptr< QGraphicsItem > item)
Definition boardeditorstate_select.cpp:1797
virtual bool processAbortCommand() noexcept override
Definition boardeditorstate_select.cpp:473
void openDevicePropertiesDialog(BI_Device &device) noexcept
Definition boardeditorstate_select.cpp:1824
virtual bool processPaste() noexcept override
Definition boardeditorstate_select.cpp:277
void removePolygonVertices(BI_Polygon &polygon, const QVector< int > vertices) noexcept
Definition boardeditorstate_select.cpp:1429
void openZonePropertiesDialog(BI_Zone &zone) noexcept
Definition boardeditorstate_select.cpp:1856
void openViaPropertiesDialog(BI_Via &via) noexcept
Definition boardeditorstate_select.cpp:1832
std::unique_ptr< CmdBoardPlaneEdit > mCmdPlaneEdit
The plane edit command (nullptr if not editing)
Definition boardeditorstate_select.h:211
bool removeSelectedItems() noexcept
Definition boardeditorstate_select.cpp:1414
void startAddingPlaneVertex(BI_Plane &plane, int vertex, const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1523
void openStrokeTextPropertiesDialog(BI_StrokeText &text) noexcept
Definition boardeditorstate_select.cpp:1871
BI_Plane * mSelectedPlane
The current plane selected for editing (nullptr if none)
Definition boardeditorstate_select.h:207
virtual bool processResetAllTexts() noexcept override
Definition boardeditorstate_select.cpp:401
virtual ~BoardEditorState_Select() noexcept
Definition boardeditorstate_select.cpp:120
void removePlaneVertices(BI_Plane &plane, const QVector< int > vertices) noexcept
Definition boardeditorstate_select.cpp:1457
virtual bool processRotate(const Angle &rotation) noexcept override
Definition boardeditorstate_select.cpp:345
virtual bool processSelectAll() noexcept override
Definition boardeditorstate_select.cpp:236
bool findZoneVerticesAtPosition(const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1692
virtual bool processImportDxf() noexcept override
Definition boardeditorstate_select.cpp:153
bool abortCommand(bool showErrMsgBox) noexcept
Definition boardeditorstate_select.cpp:1614
bool mIsUndoCmdActive
An undo command will be active while dragging pasted items.
Definition boardeditorstate_select.h:194
BI_Zone * mSelectedZone
The current zone selected for editing (nullptr if none)
Definition boardeditorstate_select.h:214
void openPolygonPropertiesDialog(BI_Polygon &polygon) noexcept
Definition boardeditorstate_select.cpp:1863
void startAddingZoneVertex(BI_Zone &zone, int vertex, const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1541
QList< DeviceMenuItem > getDeviceMenuItems(const ComponentInstance &cmpInst) const noexcept
Definition boardeditorstate_select.cpp:1887
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1649
virtual bool processCut() noexcept override
Definition boardeditorstate_select.cpp:250
bool resetAllTextsOfSelectedItems() noexcept
Definition boardeditorstate_select.cpp:1398
bool moveSelectedItems(const Point &delta) noexcept
Definition boardeditorstate_select.cpp:1225
QVector< int > mSelectedZoneVertices
The zone vertex indices selected for editing (empty if none)
Definition boardeditorstate_select.h:216
virtual bool processSetLocked(bool locked) noexcept override
Definition boardeditorstate_select.cpp:379
virtual bool exit() noexcept override
Definition boardeditorstate_select.cpp:136
std::unique_ptr< CmdBoardZoneEdit > mCmdZoneEdit
The zone edit command (nullptr if not editing)
Definition boardeditorstate_select.h:218
QVector< int > mSelectedPolygonVertices
The polygon vertex indices selected for editing (empty if none)
Definition boardeditorstate_select.h:202
virtual bool processSnapToGrid() noexcept override
Definition boardeditorstate_select.cpp:368
bool lockSelectedItems(bool locked) noexcept
Definition boardeditorstate_select.cpp:1293
virtual bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition boardeditorstate_select.cpp:706
void removeZoneVertices(BI_Zone &zone, const QVector< int > vertices) noexcept
Definition boardeditorstate_select.cpp:1483
virtual bool processFlip(Qt::Orientation orientation) noexcept override
Definition boardeditorstate_select.cpp:356
void openHolePropertiesDialog(BI_Hole &hole) noexcept
Definition boardeditorstate_select.cpp:1879
bool flipSelectedItems(Qt::Orientation orientation) noexcept
Definition boardeditorstate_select.cpp:1261
void startAddingPolygonVertex(BI_Polygon &polygon, int vertex, const Point &pos) noexcept
Definition boardeditorstate_select.cpp:1505
bool snapSelectedItemsToGrid() noexcept
Definition boardeditorstate_select.cpp:1277
virtual bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition boardeditorstate_select.cpp:537
virtual bool processMove(const Point &delta) noexcept override
Definition boardeditorstate_select.cpp:334
virtual bool processCopy() noexcept override
Definition boardeditorstate_select.cpp:265
virtual bool entry() noexcept override
Definition boardeditorstate_select.cpp:127
BoardEditorState_Select()=delete
bool measureSelectedItems(const BI_NetLine &netline) noexcept
Measure the length of the selected items.
Definition boardeditorstate_select.cpp:1713
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition boardeditorstate_select.cpp:680
The board editor state base class.
Definition boardeditorstate.h:59
The BoardGraphicsScene class.
Definition boardgraphicsscene.h:77
The CmdBoardPlaneEdit class.
Definition cmdboardplaneedit.h:50
The CmdBoardPolygonEdit class.
Definition cmdboardpolygonedit.h:49
The CmdBoardZoneEdit class.
Definition cmdboardzoneedit.h:49
The CmdDragSelectedBoardItems class.
Definition cmddragselectedboarditems.h:58
Definition occmodel.cpp:76
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition length.h:694
FSM Context.
Definition boardeditorfsm.h:88