20#ifndef LIBREPCB_EDITOR_SYMBOLEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_SELECT_H
34#include <optional.hpp>
46class CmdDragSelectedSymbolItems;
48class SymbolClipboardData;
76 bool exit() noexcept override;
78 const noexcept override;
82 QGraphicsSceneMouseEvent& e) noexcept override;
84 QGraphicsSceneMouseEvent& e) noexcept override;
86 QGraphicsSceneMouseEvent& e) noexcept override;
88 QGraphicsSceneMouseEvent& e) noexcept override;
90 QGraphicsSceneMouseEvent& e) noexcept override;
95 bool processMove(Qt::ArrowType direction) noexcept override;
97 bool processMirror(Qt::Orientation orientation) noexcept override;
114 const
tl::optional<
Point>& fixedPosition);
120 const QVector<
int> vertices) noexcept;
122 const
Point& pos) noexcept;
126 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 CmdDragSelectedSymbolItems class.
Definition: cmddragselectedsymbolitems.h:52
The CmdPolygonEdit class.
Definition: cmdpolygonedit.h:51
The SymbolClipboardData class.
Definition: symbolclipboarddata.h:52
The SymbolEditorState_Select class.
Definition: symboleditorstate_select.h:57
bool processGraphicsSceneMouseMoved(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_select.cpp:125
void setState(SubState state) noexcept
Definition: symboleditorstate_select.cpp:1003
void clearSelectionRect(bool updateItemsSelectionState) noexcept
Definition: symboleditorstate_select.cpp:968
bool processEditProperties() noexcept override
Definition: symboleditorstate_select.cpp:495
bool mirrorSelectedItems(Qt::Orientation orientation) noexcept
Definition: symboleditorstate_select.cpp:876
bool processGraphicsSceneLeftMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_select.cpp:261
SubState mState
Definition: symboleditorstate_select.h:131
bool copySelectedItemsToClipboard() noexcept
Definition: symboleditorstate_select.cpp:785
bool processRemove() noexcept override
Definition: symboleditorstate_select.cpp:484
bool rotateSelectedItems(const Angle &angle) noexcept
Definition: symboleditorstate_select.cpp:859
bool processAbortCommand() noexcept override
Definition: symboleditorstate_select.cpp:586
bool processPaste() noexcept override
Definition: symboleditorstate_select.cpp:374
bool removeSelectedItems() noexcept
Definition: symboleditorstate_select.cpp:905
bool openPropertiesDialogOfItem(std::shared_ptr< QGraphicsItem > item) noexcept
Definition: symboleditorstate_select.cpp:735
~SymbolEditorState_Select() noexcept
Definition: symboleditorstate_select.cpp:74
bool processRotate(const Angle &rotation) noexcept override
Definition: symboleditorstate_select.cpp:444
std::shared_ptr< Polygon > mSelectedPolygon
The current polygon selected for editing (nullptr if none)
Definition: symboleditorstate_select.h:136
bool processSelectAll() noexcept override
Definition: symboleditorstate_select.cpp:331
bool processImportDxf() noexcept override
Definition: symboleditorstate_select.cpp:519
bool openContextMenuAtPos(const Point &pos) noexcept
Definition: symboleditorstate_select.cpp:620
void startAddingPolygonVertex(std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
Definition: symboleditorstate_select.cpp:940
bool openPropertiesDialogOfItemAtPos(const Point &pos) noexcept
Definition: symboleditorstate_select.cpp:774
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition: symboleditorstate_select.cpp:985
bool processCut() noexcept override
Definition: symboleditorstate_select.cpp:348
bool exit() noexcept override
Definition: symboleditorstate_select.cpp:82
bool startPaste(std::unique_ptr< SymbolClipboardData > data, const tl::optional< Point > &fixedPosition)
Definition: symboleditorstate_select.cpp:822
QVector< int > mSelectedPolygonVertices
The polygon vertex indices selected for editing (empty if none)
Definition: symboleditorstate_select.h:138
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition(const Point &pos) noexcept
Definition: symboleditorstate_select.cpp:977
bool processSnapToGrid() noexcept override
Definition: symboleditorstate_select.cpp:471
QScopedPointer< CmdDragSelectedSymbolItems > mCmdDragSelectedItems
Definition: symboleditorstate_select.h:133
bool processMove(Qt::ArrowType direction) noexcept override
Definition: symboleditorstate_select.cpp:399
bool processGraphicsSceneRightMouseButtonReleased(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_select.cpp:315
Point mStartPos
Definition: symboleditorstate_select.h:132
void setSelectionRect(const Point &p1, const Point &p2) noexcept
Definition: symboleditorstate_select.cpp:961
SymbolEditorState_Select(const SymbolEditorState_Select &other)=delete
bool processMirror(Qt::Orientation orientation) noexcept override
Definition: symboleditorstate_select.cpp:457
QSet< EditorWidgetBase::Feature > getAvailableFeatures() const noexcept override
Definition: symboleditorstate_select.cpp:91
void removePolygonVertices(std::shared_ptr< Polygon > polygon, const QVector< int > vertices) noexcept
Definition: symboleditorstate_select.cpp:914
bool snapSelectedItemsToGrid() noexcept
Definition: symboleditorstate_select.cpp:893
bool processGraphicsSceneLeftMouseButtonPressed(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_select.cpp:168
SubState
Definition: symboleditorstate_select.h:60
SymbolEditorState_Select()=delete
QScopedPointer< CmdPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition: symboleditorstate_select.h:140
bool processCopy() noexcept override
Definition: symboleditorstate_select.cpp:363
bool processGraphicsSceneLeftMouseButtonDoubleClicked(QGraphicsSceneMouseEvent &e) noexcept override
Definition: symboleditorstate_select.cpp:300
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition: symboleditorstate.h:52
Definition: occmodel.cpp:77
Definition: symboleditorfsm.h:76