20#ifndef LIBREPCB_EDITOR_SYMBOLEDITORSTATE_SELECT_H
21#define LIBREPCB_EDITOR_SYMBOLEDITORSTATE_SELECT_H
46class CmdDragSelectedSymbolItems;
49class SymbolClipboardData;
78 bool entry() noexcept override;
79 bool exit() noexcept override;
99 bool processMirror(Qt::Orientation orientation) noexcept override;
118 const
std::optional<
Point>& fixedPosition);
124 const QVector<
int> vertices) noexcept;
126 const
Point& pos) noexcept;
130 const
Point& pos) noexcept;
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The Image class.
Definition image.h:49
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 CmdDragSelectedSymbolItems class.
Definition cmddragselectedsymbolitems.h:53
The CmdImageEdit class.
Definition cmdimageedit.h:45
The CmdPolygonEdit class.
Definition cmdpolygonedit.h:51
The SymbolClipboardData class.
Definition symbolclipboarddata.h:54
Interface for the integration of the Symbol editor FSM.
Definition symboleditorfsmadapter.h:62
The SymbolEditorState_Select class.
Definition symboleditorstate_select.h:58
void setState(SubState state) noexcept
Definition symboleditorstate_select.cpp:1091
void clearSelectionRect(bool updateItemsSelectionState) noexcept
Definition symboleditorstate_select.cpp:1028
bool processEditProperties() noexcept override
Definition symboleditorstate_select.cpp:515
bool processGraphicsSceneMouseMoved(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_select.cpp:124
bool mirrorSelectedItems(Qt::Orientation orientation) noexcept
Definition symboleditorstate_select.cpp:923
std::unique_ptr< CmdImageEdit > mCmdImageEdit
The image edit command (nullptr if not editing)
Definition symboleditorstate_select.h:154
bool processGridIntervalChanged(const PositiveLength &interval) noexcept override
Definition symboleditorstate_select.cpp:635
bool processGraphicsSceneRightMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_select.cpp:351
SubState mState
Definition symboleditorstate_select.h:138
bool copySelectedItemsToClipboard() noexcept
Definition symboleditorstate_select.cpp:814
bool processRemove() noexcept override
Definition symboleditorstate_select.cpp:504
bool rotateSelectedItems(const Angle &angle) noexcept
Definition symboleditorstate_select.cpp:903
bool processGraphicsSceneLeftMouseButtonReleased(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_select.cpp:288
SymbolEditorFsmAdapter::Features updateAvailableFeatures() noexcept
Definition symboleditorstate_select.cpp:1103
bool startPaste(std::unique_ptr< SymbolClipboardData > data, const std::optional< Point > &fixedPosition)
Definition symboleditorstate_select.cpp:863
std::unique_ptr< CmdPolygonEdit > mCmdPolygonEdit
The polygon edit command (nullptr if not editing)
Definition symboleditorstate_select.h:147
bool processGraphicsSceneLeftMouseButtonPressed(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_select.cpp:194
std::shared_ptr< Image > mSelectedImage
The current image selected for editing (nullptr if none)
Definition symboleditorstate_select.h:150
bool processAbortCommand() noexcept override
Definition symboleditorstate_select.cpp:600
bool removeSelectedItems() noexcept
Definition symboleditorstate_select.cpp:958
bool openPropertiesDialogOfItem(std::shared_ptr< QGraphicsItem > item) noexcept
Definition symboleditorstate_select.cpp:764
~SymbolEditorState_Select() noexcept
Definition symboleditorstate_select.cpp:75
std::unique_ptr< CmdDragSelectedSymbolItems > mCmdDragSelectedItems
Definition symboleditorstate_select.h:140
bool processRotate(const Angle &rotation) noexcept override
Definition symboleditorstate_select.cpp:464
std::shared_ptr< Polygon > mSelectedPolygon
The current polygon selected for editing (nullptr if none)
Definition symboleditorstate_select.h:143
bool processSelectAll() noexcept override
Definition symboleditorstate_select.cpp:367
std::unique_ptr< QTimer > mUpdateAvailableFeaturesTimer
Delay timer for updateAvailableFeatures(), only when in this state.
Definition symboleditorstate_select.h:160
bool processGraphicsSceneLeftMouseButtonDoubleClicked(const GraphicsSceneMouseEvent &e) noexcept override
Definition symboleditorstate_select.cpp:336
bool processImportDxf() noexcept override
Definition symboleditorstate_select.cpp:542
bool openContextMenuAtPos(const Point &pos) noexcept
Definition symboleditorstate_select.cpp:646
void startAddingPolygonVertex(std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
Definition symboleditorstate_select.cpp:997
bool openPropertiesDialogOfItemAtPos(const Point &pos) noexcept
Definition symboleditorstate_select.cpp:803
QList< QMetaObject::Connection > mConnections
Signal/slot connections only when in this state.
Definition symboleditorstate_select.h:157
bool findPolygonVerticesAtPosition(const Point &pos) noexcept
Definition symboleditorstate_select.cpp:1050
bool processCut() noexcept override
Definition symboleditorstate_select.cpp:388
bool exit() noexcept override
Definition symboleditorstate_select.cpp:103
void scheduleUpdateAvailableFeatures() noexcept
Definition symboleditorstate_select.cpp:1098
QVector< int > mSelectedPolygonVertices
The polygon vertex indices selected for editing (empty if none)
Definition symboleditorstate_select.h:145
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition(const Point &pos) noexcept
Definition symboleditorstate_select.cpp:1039
bool processSnapToGrid() noexcept override
Definition symboleditorstate_select.cpp:491
bool processPaste(std::unique_ptr< SymbolClipboardData > data=nullptr) noexcept override
Definition symboleditorstate_select.cpp:414
qreal mSelectedImageAspectRatio
The original aspect ratio of the currently selected image.
Definition symboleditorstate_select.h:152
Point mStartPos
Definition symboleditorstate_select.h:139
void setSelectionRect(const Point &p1, const Point &p2) noexcept
Definition symboleditorstate_select.cpp:1018
bool findImageHandleAtPosition(const Point &pos) noexcept
Definition symboleditorstate_select.cpp:1071
SymbolEditorState_Select(const SymbolEditorState_Select &other)=delete
bool processMirror(Qt::Orientation orientation) noexcept override
Definition symboleditorstate_select.cpp:477
void removePolygonVertices(std::shared_ptr< Polygon > polygon, const QVector< int > vertices) noexcept
Definition symboleditorstate_select.cpp:971
bool snapSelectedItemsToGrid() noexcept
Definition symboleditorstate_select.cpp:943
SubState
Definition symboleditorstate_select.h:61
bool processMove(const Point &delta) noexcept override
Definition symboleditorstate_select.cpp:441
SymbolEditorState_Select()=delete
bool processCopy() noexcept override
Definition symboleditorstate_select.cpp:403
bool entry() noexcept override
Definition symboleditorstate_select.cpp:83
The SymbolEditorState class is the base class of all symbol editor FSM states.
Definition symboleditorstate.h:56
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
Definition graphicsscene.h:45
Definition symboleditorfsm.h:79