![]() |
LibrePCB Developers Documentation
|
The "draw trace" state/tool of the board editor. More...
#include <boardeditorstate_drawtrace.h>
Inheritance diagram for BoardEditorState_DrawTrace:
Collaboration diagram for BoardEditorState_DrawTrace:Public Types | |
| enum class | WireMode |
| All available wire modes. More... | |
Public Types inherited from BoardEditorState | |
| enum class | FindFlag : uint32_t |
| using | Context = BoardEditorFsm::Context |
Signals | |
| void | wireModeChanged (WireMode mode) |
| void | layerChanged (const Layer &layer) |
| void | autoWidthChanged (bool autoWidth) |
| void | widthChanged (const PositiveLength &width) |
| void | viaSizeChanged (const PositiveLength &size) |
| void | viaDrillDiameterChanged (const PositiveLength &diameter) |
Signals inherited from BoardEditorState | |
| void | requestLeavingState () |
| Signal to indicate that the current tool should be exited. | |
Public Member Functions | |
| BoardEditorState_DrawTrace ()=delete | |
| BoardEditorState_DrawTrace (const BoardEditorState_DrawTrace &other)=delete | |
| BoardEditorState_DrawTrace (const Context &context) noexcept | |
| virtual | ~BoardEditorState_DrawTrace () noexcept |
| virtual bool | entry () noexcept override |
| virtual bool | exit () noexcept override |
| virtual bool | processAbortCommand () noexcept override |
| virtual bool | processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept override |
| virtual bool | processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept override |
| virtual bool | processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override |
| virtual bool | processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override |
| virtual bool | processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override |
| virtual bool | processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override |
| WireMode | getWireMode () const noexcept |
| void | setWireMode (WireMode mode) noexcept |
| QSet< const Layer * > | getAvailableLayers () noexcept |
| const Layer & | getLayer () const noexcept |
| void | setLayer (const Layer &layer) noexcept |
| bool | getAutoWidth () const noexcept |
| void | setAutoWidth (bool autoWidth) noexcept |
| const PositiveLength & | getWidth () const noexcept |
| void | setWidth (const PositiveLength &width) noexcept |
| const PositiveLength & | getViaSize () const noexcept |
| void | setViaSize (const PositiveLength &size) noexcept |
| const PositiveLength & | getViaDrillDiameter () const noexcept |
| void | setViaDrillDiameter (const PositiveLength &diameter) noexcept |
| BoardEditorState_DrawTrace & | operator= (const BoardEditorState_DrawTrace &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 | 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 | processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept |
| BoardEditorState & | operator= (const BoardEditorState &rhs)=delete |
Private Types | |
| enum | SubState |
| Internal FSM States (substates) More... | |
Private Member Functions | |
| bool | startPositioning (Board &board, const Point &pos, BI_NetPoint *fixedPoint=nullptr, BI_Via *fixedVia=nullptr, BI_FootprintPad *fixedPad=nullptr) noexcept |
| Begin drawing the next BI_NetLine. | |
| bool | addNextNetPoint (BoardGraphicsScene &scene) noexcept |
| Finalize the BI_NetLines and connect them to other existing traces if necessary. | |
| bool | abortPositioning (bool showErrMsgBox) noexcept |
| Abort or cancel the current drawing of the trace. | |
| void | updateNetpointPositions () noexcept |
| Update the currently active traces according to the set parameters. | |
| void | showVia (bool isVisible) noexcept |
| Sets the BI_Via of the currently active trace. | |
| BI_NetLineAnchor * | combineAnchors (BI_NetLineAnchor &a, BI_NetLineAnchor &b) |
| Point | calcMiddlePointPos (const Point &p1, const Point p2, WireMode mode) const noexcept |
| Calculate the 'middle point' of two point, according to the chosen WireMode. | |
Private Attributes | |
| SubState | mSubState |
| the current substate | |
| WireMode | mCurrentWireMode |
| the current wire mode | |
| const Layer * | mCurrentLayer |
| the current board layer name | |
| bool | mAddVia |
| whether a via add is requested | |
| BI_Via * | mTempVia |
| Via | mCurrentViaProperties |
| const Layer * | mViaLayer |
| Layer where the via was started. | |
| Point | mTargetPos |
| Point | mCursorPos |
| the current cursor position | |
| PositiveLength | mCurrentWidth |
| the current wire width | |
| bool | mCurrentAutoWidth |
| automatically adjust wire width | |
| bool | mCurrentSnapActive |
| the current active snap to target | |
| BI_NetLineAnchor * | mFixedStartAnchor |
| BI_NetSegment * | mCurrentNetSegment |
| BI_NetLine * | mPositioningNetLine1 |
| line between fixed point and p1 | |
| BI_NetPoint * | mPositioningNetPoint1 |
| the first netpoint to place | |
| BI_NetLine * | mPositioningNetLine2 |
| line between p1 and p2 | |
| BI_NetPoint * | mPositioningNetPoint2 |
| the second netpoint to place | |
Additional Inherited Members | |
Protected Member Functions inherited from BoardEditorState | |
| 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 Layer *cuLayer=nullptr, 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 Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept |
Protected Attributes inherited from BoardEditorState | |
| Context | mContext |
| BoardEditorFsmAdapter & | mAdapter |
The "draw trace" state/tool of the board editor.
|
strong |
|
private |
|
delete |
|
delete |
|
explicitnoexcept |
|
virtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
inlinenoexcept |
|
noexcept |
Here is the caller graph for this function:
|
noexcept |
Here is the call graph for this function:
|
inlinenoexcept |
|
noexcept |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexcept |
|
noexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
|
noexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the call graph for this function:
|
noexcept |
Here is the caller graph for this function:
|
inlinenoexcept |
Here is the call graph for this function:
|
noexcept |
Here is the caller graph for this function:
|
delete |
|
signal |
Here is the caller graph for this function:
|
signal |
Here is the caller graph for this function:
|
signal |
Here is the caller graph for this function:
|
signal |
Here is the caller graph for this function:
|
signal |
Here is the caller graph for this function:
|
signal |
Here is the caller graph for this function:
|
privatenoexcept |
Begin drawing the next BI_NetLine.
| board | On which board the new traces are drawn. |
| pos | The position, where the tracing should begin. If necessary, a new BI_NetPoint is created. |
| fixedPoint | The BI_NetPoint used as the start anchor, when beginning a new trace. |
| fixedVia | The BI_Via used as the start anchor, when beginning a new trace. |
| fixedPad | The BI_FootprintPad used as the start anchor, when beginning a new trace. |
Here is the call graph for this function:
|
privatenoexcept |
Finalize the BI_NetLines and connect them to other existing traces if necessary.
| scene | On which board scene the drawing is finalized. |
Here is the call graph for this function:
|
privatenoexcept |
Abort or cancel the current drawing of the trace.
| showErrMsgBox | When true, show an error message in a pop-up box. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatenoexcept |
Update the currently active traces according to the set parameters.
Uses the current mCursorPos to where the currently active trace is snapped to and how its BI_NetLine are palced. Also determines whether a BI_Via should be added or if the target anchor can provide the desired layer change.
Here is the call graph for this function:
|
privatenoexcept |
Sets the BI_Via of the currently active trace.
When true, adds a BI_Via instead of the current last BI_NetPoint to the currently active trace. Otherwise removes it if necessary and replaces it again with a BI_NetPoint. It also updates the BI_Via according to the currently selected parameters.
| isVisible | Whether the BI_Via is shown or not |
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Here is the call graph for this function:Calculate the 'middle point' of two point, according to the chosen WireMode.
| p1 | Start point. |
| p2 | End point. |
| mode | The selected WireMode. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
the current substate
|
private |
the current wire mode
|
private |
the current board layer name
|
private |
whether a via add is requested
|
private |
|
private |
the current target position of the active trace
|
private |
the current cursor position
|
private |
the current wire width
|
private |
automatically adjust wire width
|
private |
the current active snap to target
|
private |
the fixed netline anchor (start point of the line)
|
private |
the net segment that is currently edited
|
private |
line between fixed point and p1
|
private |
the first netpoint to place
|
private |
line between p1 and p2
|
private |
the second netpoint to place