LibrePCB Developers Documentation
BES_DrawTrace Class Referencefinal

The BES_DrawTrace class. More...

#include <bes_drawtrace.h>

+ Inheritance diagram for BES_DrawTrace:
+ Collaboration diagram for BES_DrawTrace:

Public Member Functions

 BES_DrawTrace (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
 ~BES_DrawTrace ()
 
ProcRetVal process (BEE_Base *event) noexcept override
 
bool entry (BEE_Base *event) noexcept override
 
bool exit (BEE_Base *event) noexcept override
 
- Public Member Functions inherited from BES_Base
 BES_Base (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
virtual ~BES_Base ()
 

Private Types

enum  SubState
 Internal FSM States (substates) More...
 
enum  WireMode
 The WireMode enum contains all available wire modes. More...
 

Private Member Functions

ProcRetVal processSubStateIdle (BEE_Base *event) noexcept
 
ProcRetVal processSubStatePositioning (BEE_Base *event) noexcept
 
ProcRetVal processIdleSceneEvent (BEE_Base *event) noexcept
 
ProcRetVal processPositioningSceneEvent (BEE_Base *event) noexcept
 
bool startPositioning (Board &board, const Point &pos, BI_NetPoint *fixedPoint=nullptr) noexcept
 
bool addNextNetPoint (Board &board, const Point &pos) noexcept
 
bool abortPositioning (bool showErrMsgBox) noexcept
 
BI_ViafindVia (Board &board, const Point &pos, NetSignal *netsignal=nullptr) const noexcept
 
BI_FootprintPadfindPad (Board &board, const Point &pos, GraphicsLayer *layer=nullptr, NetSignal *netsignal=nullptr) const noexcept
 
BI_NetPointfindNetPoint (Board &board, const Point &pos, GraphicsLayer *layer=nullptr, NetSignal *netsignal=nullptr, const QSet< BI_NetPoint *> &except={}) const noexcept
 
BI_NetLinefindNetLine (Board &board, const Point &pos, GraphicsLayer *layer=nullptr, NetSignal *netsignal=nullptr, const QSet< BI_NetLine *> &except={}) const noexcept
 
void updateNetpointPositions (const Point &cursorPos) noexcept
 
void layerComboBoxIndexChanged (int index) noexcept
 
void wireWidthEditValueChanged (const PositiveLength &value) noexcept
 
void updateWireModeActionsCheckedState () noexcept
 
Point calcMiddlePointPos (const Point &p1, const Point p2, WireMode mode) const noexcept
 

Private Attributes

SubState mSubState
 the current substate More...
 
WireMode mCurrentWireMode
 the current wire mode More...
 
QString mCurrentLayerName
 the current board layer name More...
 
PositiveLength mCurrentWidth
 the current wire width More...
 
BI_NetLineAnchormFixedStartAnchor
 
BI_NetLinemPositioningNetLine1
 line between fixed point and p1 More...
 
BI_NetPointmPositioningNetPoint1
 the first netpoint to place More...
 
BI_NetLinemPositioningNetLine2
 line between p1 and p2 More...
 
BI_NetPointmPositioningNetPoint2
 the second netpoint to place More...
 
QHash< WireMode, QAction * > mWireModeActions
 
QList< QAction * > mActionSeparators
 
QLabel * mLayerLabel
 
QComboBox * mLayerComboBox
 
QLabel * mWidthLabel
 
PositiveLengthEditmWidthEdit
 

Additional Inherited Members

- Public Types inherited from BES_Base
enum  ProcRetVal
 process() return values More...
 
- Protected Attributes inherited from BES_Base
workspace::WorkspacemWorkspace
 
ProjectmProject
 
CircuitmCircuit
 
BoardEditormEditor
 
Ui::BoardEditor & mEditorUi
 allows access to BoardEditor UI More...
 
GraphicsViewmEditorGraphicsView
 allows access to the board editor graphics view More...
 
UndoStackmUndoStack
 

Detailed Description

The BES_DrawTrace class.

Member Enumeration Documentation

◆ SubState

enum SubState
private

Internal FSM States (substates)

Enumerator
SubState_Idle 

idle state [initial state]

SubState_PositioningNetPoint 

in this state, an undo command is active!

◆ WireMode

enum WireMode
private

The WireMode enum contains all available wire modes.

Note
The first item must have the value 0!
Enumerator
WireMode_HV 

horizontal - vertical [default]

WireMode_VH 

vertical - horizontal

WireMode_9045 

90° - 45°

WireMode_4590 

45° - 90°

WireMode_Straight 

straight

WireMode_COUNT 

count of wire modes

Constructor & Destructor Documentation

◆ BES_DrawTrace()

BES_DrawTrace ( BoardEditor editor,
Ui::BoardEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicit

◆ ~BES_DrawTrace()

Member Function Documentation

◆ process()

BES_Base::ProcRetVal process ( BEE_Base event)
overridevirtualnoexcept

Implements BES_Base.

+ Here is the call graph for this function:

◆ entry()

bool entry ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

+ Here is the call graph for this function:

◆ exit()

bool exit ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

+ Here is the call graph for this function:

◆ processSubStateIdle()

BES_Base::ProcRetVal processSubStateIdle ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processSubStatePositioning()

BES_Base::ProcRetVal processSubStatePositioning ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processIdleSceneEvent()

BES_Base::ProcRetVal processIdleSceneEvent ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPositioningSceneEvent()

BES_Base::ProcRetVal processPositioningSceneEvent ( BEE_Base event)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startPositioning()

bool startPositioning ( Board board,
const Point pos,
BI_NetPoint fixedPoint = nullptr 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNextNetPoint()

bool addNextNetPoint ( Board board,
const Point pos 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ abortPositioning()

bool abortPositioning ( bool  showErrMsgBox)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findVia()

BI_Via * findVia ( Board board,
const Point pos,
NetSignal netsignal = nullptr 
) const
privatenoexcept
+ Here is the caller graph for this function:

◆ findPad()

BI_FootprintPad * findPad ( Board board,
const Point pos,
GraphicsLayer layer = nullptr,
NetSignal netsignal = nullptr 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findNetPoint()

BI_NetPoint * findNetPoint ( Board board,
const Point pos,
GraphicsLayer layer = nullptr,
NetSignal netsignal = nullptr,
const QSet< BI_NetPoint *> &  except = {} 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findNetLine()

BI_NetLine * findNetLine ( Board board,
const Point pos,
GraphicsLayer layer = nullptr,
NetSignal netsignal = nullptr,
const QSet< BI_NetLine *> &  except = {} 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNetpointPositions()

void updateNetpointPositions ( const Point cursorPos)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ layerComboBoxIndexChanged()

void layerComboBoxIndexChanged ( int  index)
privatenoexcept
+ Here is the caller graph for this function:

◆ wireWidthEditValueChanged()

void wireWidthEditValueChanged ( const PositiveLength value)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateWireModeActionsCheckedState()

void updateWireModeActionsCheckedState ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ calcMiddlePointPos()

Point calcMiddlePointPos ( const Point p1,
const Point  p2,
WireMode  mode 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSubState

SubState mSubState
private

the current substate

◆ mCurrentWireMode

WireMode mCurrentWireMode
private

the current wire mode

◆ mCurrentLayerName

QString mCurrentLayerName
private

the current board layer name

◆ mCurrentWidth

PositiveLength mCurrentWidth
private

the current wire width

◆ mFixedStartAnchor

BI_NetLineAnchor* mFixedStartAnchor
private

the fixed netline anchor (start point of the line)

◆ mPositioningNetLine1

BI_NetLine* mPositioningNetLine1
private

line between fixed point and p1

◆ mPositioningNetPoint1

BI_NetPoint* mPositioningNetPoint1
private

the first netpoint to place

◆ mPositioningNetLine2

BI_NetLine* mPositioningNetLine2
private

line between p1 and p2

◆ mPositioningNetPoint2

BI_NetPoint* mPositioningNetPoint2
private

the second netpoint to place

◆ mWireModeActions

QHash<WireMode, QAction*> mWireModeActions
private

◆ mActionSeparators

QList<QAction*> mActionSeparators
private

◆ mLayerLabel

QLabel* mLayerLabel
private

◆ mLayerComboBox

QComboBox* mLayerComboBox
private

◆ mWidthLabel

QLabel* mWidthLabel
private

◆ mWidthEdit

PositiveLengthEdit* mWidthEdit
private

The documentation for this class was generated from the following files: