LibrePCB Developers Documentation
|
The "select" state/tool of the board editor (default state) More...
#include <boardeditorstate_select.h>
Classes | |
struct | DeviceMenuItem |
Public Member Functions | |
BoardEditorState_Select ()=delete | |
BoardEditorState_Select (const BoardEditorState_Select &other)=delete | |
BoardEditorState_Select (const Context &context) noexcept | |
virtual | ~BoardEditorState_Select () noexcept |
virtual bool | entry () noexcept override |
virtual bool | exit () noexcept override |
virtual bool | processImportDxf () noexcept override |
virtual bool | processSelectAll () noexcept override |
virtual bool | processCut () noexcept override |
virtual bool | processCopy () noexcept override |
virtual bool | processPaste () noexcept override |
virtual bool | processMove (const Point &delta) noexcept override |
virtual bool | processRotate (const Angle &rotation) noexcept override |
virtual bool | processFlip (Qt::Orientation orientation) noexcept override |
virtual bool | processSnapToGrid () noexcept override |
virtual bool | processSetLocked (bool locked) noexcept override |
virtual bool | processChangeLineWidth (int step) noexcept override |
virtual bool | processResetAllTexts () noexcept override |
virtual bool | processRemove () noexcept override |
virtual bool | processEditProperties () noexcept override |
virtual bool | processAbortCommand () noexcept override |
virtual bool | processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override |
virtual bool | processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override |
virtual bool | processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override |
virtual bool | processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override |
virtual bool | processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override |
virtual bool | processSwitchToBoard (int index) noexcept override |
BoardEditorState_Select & | operator= (const BoardEditorState_Select &rhs)=delete |
Public Member Functions inherited from BoardEditorState | |
BoardEditorState ()=delete | |
BoardEditorState (const BoardEditorState &other)=delete | |
BoardEditorState (const Context &context, QObject *parent=nullptr) noexcept | |
virtual | ~BoardEditorState () noexcept |
virtual bool | entry () noexcept |
virtual bool | exit () noexcept |
virtual bool | processAddDevice (ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept |
virtual bool | processImportDxf () noexcept |
virtual bool | processSelectAll () noexcept |
virtual bool | processCut () noexcept |
virtual bool | processCopy () noexcept |
virtual bool | processPaste () noexcept |
virtual bool | processMove (const Point &delta) noexcept |
virtual bool | processRotate (const Angle &rotation) noexcept |
virtual bool | processFlip (Qt::Orientation orientation) noexcept |
virtual bool | processSnapToGrid () noexcept |
virtual bool | processSetLocked (bool locked) noexcept |
virtual bool | processChangeLineWidth (int step) noexcept |
virtual bool | processResetAllTexts () noexcept |
virtual bool | processRemove () noexcept |
virtual bool | processEditProperties () noexcept |
virtual bool | processAbortCommand () noexcept |
virtual bool | processKeyPressed (const QKeyEvent &e) noexcept |
virtual bool | processKeyReleased (const QKeyEvent &e) noexcept |
virtual bool | processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept |
virtual bool | processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept |
virtual bool | processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept |
virtual bool | processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept |
virtual bool | processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept |
virtual bool | processSwitchToBoard (int index) noexcept |
BoardEditorState & | operator= (const BoardEditorState &rhs)=delete |
Private Member Functions | |
bool | startMovingSelectedItems (BoardGraphicsScene &scene, const Point &startPos) noexcept |
bool | moveSelectedItems (const Point &delta) noexcept |
bool | rotateSelectedItems (const Angle &angle) noexcept |
bool | flipSelectedItems (Qt::Orientation orientation) noexcept |
bool | snapSelectedItemsToGrid () noexcept |
bool | lockSelectedItems (bool locked) noexcept |
bool | changeWidthOfSelectedItems (int step) noexcept |
bool | resetAllTextsOfSelectedItems () noexcept |
bool | removeSelectedItems () noexcept |
void | removePolygonVertices (BI_Polygon &polygon, const QVector< int > vertices) noexcept |
void | removePlaneVertices (BI_Plane &plane, const QVector< int > vertices) noexcept |
void | removeZoneVertices (BI_Zone &zone, const QVector< int > vertices) noexcept |
void | startAddingPolygonVertex (BI_Polygon &polygon, int vertex, const Point &pos) noexcept |
void | startAddingPlaneVertex (BI_Plane &plane, int vertex, const Point &pos) noexcept |
void | startAddingZoneVertex (BI_Zone &zone, int vertex, const Point &pos) noexcept |
bool | copySelectedItemsToClipboard () noexcept |
bool | startPaste (BoardGraphicsScene &scene, std::unique_ptr< BoardClipboardData > data, const tl::optional< Point > &fixedPosition) |
bool | abortCommand (bool showErrMsgBox) noexcept |
bool | findPolygonVerticesAtPosition (const Point &pos) noexcept |
bool | findPlaneVerticesAtPosition (const Point &pos) noexcept |
bool | findZoneVerticesAtPosition (const Point &pos) noexcept |
bool | measureSelectedItems (const BI_NetLine &netline) noexcept |
Measure the length of the selected items. More... | |
void | measureLengthInDirection (BoardGraphicsScene &scene, bool directionBackwards, const BI_NetLine &netline, QSet< Uuid > &visitedNetLines, UnsignedLength &totalLength) |
Internal helper method used by measureSelectedItems. More... | |
bool | openPropertiesDialog (std::shared_ptr< QGraphicsItem > item) |
void | openDevicePropertiesDialog (BI_Device &device) noexcept |
void | openViaPropertiesDialog (BI_Via &via) noexcept |
void | openPlanePropertiesDialog (BI_Plane &plane) noexcept |
void | openZonePropertiesDialog (BI_Zone &zone) noexcept |
void | openPolygonPropertiesDialog (BI_Polygon &polygon) noexcept |
void | openStrokeTextPropertiesDialog (BI_StrokeText &text) noexcept |
void | openHolePropertiesDialog (BI_Hole &hole) noexcept |
QList< DeviceMenuItem > | getDeviceMenuItems (const ComponentInstance &cmpInst) const noexcept |
Private Attributes | |
bool | mIsUndoCmdActive |
An undo command will be active while dragging pasted items. More... | |
QScopedPointer< CmdDragSelectedBoardItems > | mSelectedItemsDragCommand |
When dragging items, this undo command will be active. More... | |
BI_Polygon * | mSelectedPolygon |
The current polygon selected for editing (nullptr if none) More... | |
QVector< int > | mSelectedPolygonVertices |
The polygon vertex indices selected for editing (empty if none) More... | |
QScopedPointer< CmdBoardPolygonEdit > | mCmdPolygonEdit |
The polygon edit command (nullptr if not editing) More... | |
BI_Plane * | mSelectedPlane |
The current plane selected for editing (nullptr if none) More... | |
QVector< int > | mSelectedPlaneVertices |
The plane vertex indices selected for editing (empty if none) More... | |
QScopedPointer< CmdBoardPlaneEdit > | mCmdPlaneEdit |
The plane edit command (nullptr if not editing) More... | |
BI_Zone * | mSelectedZone |
The current zone selected for editing (nullptr if none) More... | |
QVector< int > | mSelectedZoneVertices |
The zone vertex indices selected for editing (empty if none) More... | |
QScopedPointer< CmdBoardZoneEdit > | mCmdZoneEdit |
The zone edit command (nullptr if not editing) More... | |
Additional Inherited Members | |
Public Types inherited from BoardEditorState | |
enum class | FindFlag |
using | Context = BoardEditorFsm::Context |
Signals inherited from BoardEditorState | |
void | requestLeavingState () |
Signal to indicate that the current tool should be exited. More... | |
void | statusBarMessageChanged (const QString &message, int timeoutMs=-1) |
Protected Member Functions inherited from BoardEditorState | |
Board * | getActiveBoard () noexcept |
BoardGraphicsScene * | getActiveBoardScene () noexcept |
bool | getIgnoreLocks () const noexcept |
PositiveLength | getGridInterval () const noexcept |
const LengthUnit & | getLengthUnit () const noexcept |
QSet< const Layer * > | getAllowedGeometryLayers () noexcept |
void | makeLayerVisible (const QString &layer) noexcept |
void | abortBlockingToolsInOtherEditors () noexcept |
bool | execCmd (UndoCommand *cmd) |
QWidget * | parentWidget () noexcept |
QList< std::shared_ptr< QGraphicsItem > > | findItemsAtPos (const Point &pos, FindFlags flags, const tl::optional< const Layer & > cuLayer=tl::nullopt, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept |
template<typename T = QGraphicsItem> | |
std::shared_ptr< T > | findItemAtPos (const Point &pos, FindFlags flags, const tl::optional< const Layer & > cuLayer=tl::nullopt, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept |
Protected Attributes inherited from BoardEditorState | |
Context | mContext |
The "select" state/tool of the board editor (default state)
|
delete |
|
delete |
|
explicitnoexcept |
|
virtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
delete |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
Measure the length of the selected items.
Note: Currently only non-branching non-intersecting segments can be measured!
netline | A selected netline |
|
private |
Internal helper method used by measureSelectedItems.
scene | Scene of the board containing the traces. |
directionBackwards | If set to true, the segments are traversed "backwards" starting at the start anchor. Otherwise, the segments are traversed starting at the end anchor. |
netline | The netline that is used as starting point. The length of this netline will not be considered. |
visitedNetLines | A set containing UUIDs of all visited netlines. |
totalLength | A reference to the total length. The length of the found segments will be appended to this total length. |
LogicError | if there are branches or loops. |
|
private |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
An undo command will be active while dragging pasted items.
|
private |
When dragging items, this undo command will be active.
|
private |
The current polygon selected for editing (nullptr if none)
|
private |
The polygon vertex indices selected for editing (empty if none)
|
private |
The polygon edit command (nullptr if not editing)
|
private |
The current plane selected for editing (nullptr if none)
|
private |
The plane vertex indices selected for editing (empty if none)
|
private |
The plane edit command (nullptr if not editing)
|
private |
The current zone selected for editing (nullptr if none)
|
private |
The zone vertex indices selected for editing (empty if none)
|
private |
The zone edit command (nullptr if not editing)