20#ifndef LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_PACKAGEEDITORSTATE_SELECT_H
34#include <optional.hpp>
47class CmdDragSelectedFootprintItems;
50class FootprintClipboardData;
67 MOVING_POLYGON_VERTEX,
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
tl::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:78
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition: point.h:79
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:1695
bool moveAlignSelectedItems() noexcept
Definition: packageeditorstate_select.cpp:1270
void clearSelectionRect(bool updateItemsSelectionState) noexcept
Definition: packageeditorstate_select.cpp:1634
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:1247
bool processGenerateOutline() noexcept override
Definition: packageeditorstate_select.cpp:595
SubState mState
Definition: packageeditorstate_select.h:151
bool copySelectedItemsToClipboard() noexcept
Definition: packageeditorstate_select.cpp:995
bool processRemove() noexcept override
Definition: packageeditorstate_select.cpp:552
bool rotateSelectedItems(const Angle &angle) noexcept
Definition: packageeditorstate_select.cpp:1230
~PackageEditorState_Select() noexcept
Definition: packageeditorstate_select.cpp:86
bool generateCourtyard() noexcept
Definition: packageeditorstate_select.cpp:1408
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:1088
QScopedPointer< 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:1585
bool removeSelectedItems() noexcept
Definition: packageeditorstate_select.cpp:1311
bool canPasteGeometry(const std::unique_ptr< FootprintClipboardData > &data) const noexcept
Definition: packageeditorstate_select.cpp:1061
bool openPropertiesDialogOfItem(std::shared_ptr< QGraphicsItem > item) noexcept
Definition: packageeditorstate_select.cpp:927
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:1675
bool processImportDxf() noexcept override
Definition: packageeditorstate_select.cpp:617
bool openContextMenuAtPos(const Point &pos) noexcept
Definition: packageeditorstate_select.cpp:739
QScopedPointer< CmdDragSelectedFootprintItems > mCmdDragSelectedItems
Definition: packageeditorstate_select.h:153
void startAddingPolygonVertex(std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
Definition: packageeditorstate_select.cpp:1564
bool openPropertiesDialogOfItemAtPos(const Point &pos) noexcept
Definition: packageeditorstate_select.cpp:984
PackageEditorState_Select(const PackageEditorState_Select &other)=delete
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition: packageeditorstate_select.cpp:1654
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:1606
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:1643
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:1627
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:1538
bool startPaste(std::unique_ptr< FootprintClipboardData > data, const tl::optional< Point > &fixedPosition)
Definition: packageeditorstate_select.cpp:1187
bool snapSelectedItemsToGrid() noexcept
Definition: packageeditorstate_select.cpp:1299
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
QScopedPointer< CmdPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition: packageeditorstate_select.h:160
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:1320
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:77
Definition: packageeditorfsm.h:90