LibrePCB Developers Documentation
SES_DrawWire Class Referencefinal

The SES_DrawWire class. More...

#include <ses_drawwire.h>

+ Inheritance diagram for SES_DrawWire:
+ Collaboration diagram for SES_DrawWire:

Public Member Functions

 SES_DrawWire (SchematicEditor &editor, Ui::SchematicEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
 ~SES_DrawWire ()
 
ProcRetVal process (SEE_Base *event) noexcept override
 
bool entry (SEE_Base *event) noexcept override
 
bool exit (SEE_Base *event) noexcept override
 
- Public Member Functions inherited from SES_Base
 SES_Base (SchematicEditor &editor, Ui::SchematicEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
virtual ~SES_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 (SEE_Base *event) noexcept
 
ProcRetVal processSubStatePositioning (SEE_Base *event) noexcept
 
ProcRetVal processIdleSceneEvent (SEE_Base *event) noexcept
 
ProcRetVal processPositioningSceneEvent (SEE_Base *event) noexcept
 
bool startPositioning (Schematic &schematic, const Point &pos, SI_NetPoint *fixedPoint=nullptr) noexcept
 
bool addNextNetPoint (Schematic &schematic, const Point &pos) noexcept
 
bool abortPositioning (bool showErrMsgBox) noexcept
 
SI_SymbolPinfindSymbolPin (Schematic &schematic, const Point &pos) const noexcept
 
SI_NetPointfindNetPoint (Schematic &schematic, const Point &pos, SI_NetPoint *except=nullptr) const noexcept
 
SI_NetLinefindNetLine (Schematic &schematic, const Point &pos, SI_NetLine *except=nullptr) const noexcept
 
void updateNetpointPositions (const Point &cursorPos) 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 mWireMode
 the current wire mode More...
 
SI_NetLineAnchormFixedStartAnchor
 the fixed anchor (start point of the line) More...
 
SI_NetLinemPositioningNetLine1
 line between fixed point and p1 More...
 
SI_NetPointmPositioningNetPoint1
 the first netpoint to place More...
 
SI_NetLinemPositioningNetLine2
 line between p1 and p2 More...
 
SI_NetPointmPositioningNetPoint2
 the second netpoint to place More...
 
QHash< WireMode, QAction * > mWireModeActions
 
QList< QAction * > mActionSeparators
 
QLabel * mWidthLabel
 
QComboBox * mWidthComboBox
 

Additional Inherited Members

- Public Types inherited from SES_Base
enum  ProcRetVal
 process() return values More...
 
- Protected Attributes inherited from SES_Base
workspace::WorkspacemWorkspace
 
ProjectmProject
 
CircuitmCircuit
 
SchematicEditormEditor
 
Ui::SchematicEditor & mEditorUi
 allows access to SchematicEditor UI More...
 
GraphicsViewmEditorGraphicsView
 
UndoStackmUndoStack
 

Detailed Description

The SES_DrawWire 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

◆ SES_DrawWire()

SES_DrawWire ( SchematicEditor editor,
Ui::SchematicEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicit

◆ ~SES_DrawWire()

Member Function Documentation

◆ process()

SES_Base::ProcRetVal process ( SEE_Base event)
overridevirtualnoexcept

Implements SES_Base.

+ Here is the call graph for this function:

◆ entry()

bool entry ( SEE_Base event)
overridevirtualnoexcept

Reimplemented from SES_Base.

+ Here is the call graph for this function:

◆ exit()

bool exit ( SEE_Base event)
overridevirtualnoexcept

Reimplemented from SES_Base.

+ Here is the call graph for this function:

◆ processSubStateIdle()

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

◆ processSubStatePositioning()

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

◆ processIdleSceneEvent()

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

◆ processPositioningSceneEvent()

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

◆ startPositioning()

bool startPositioning ( Schematic schematic,
const Point pos,
SI_NetPoint fixedPoint = nullptr 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNextNetPoint()

bool addNextNetPoint ( Schematic schematic,
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:

◆ findSymbolPin()

SI_SymbolPin * findSymbolPin ( Schematic schematic,
const Point pos 
) const
privatenoexcept
+ Here is the caller graph for this function:

◆ findNetPoint()

SI_NetPoint * findNetPoint ( Schematic schematic,
const Point pos,
SI_NetPoint except = nullptr 
) const
privatenoexcept
+ Here is the caller graph for this function:

◆ findNetLine()

SI_NetLine * findNetLine ( Schematic schematic,
const Point pos,
SI_NetLine except = nullptr 
) const
privatenoexcept
+ 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:

◆ 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

◆ mWireMode

WireMode mWireMode
private

the current wire mode

◆ mFixedStartAnchor

SI_NetLineAnchor* mFixedStartAnchor
private

the fixed anchor (start point of the line)

◆ mPositioningNetLine1

SI_NetLine* mPositioningNetLine1
private

line between fixed point and p1

◆ mPositioningNetPoint1

SI_NetPoint* mPositioningNetPoint1
private

the first netpoint to place

◆ mPositioningNetLine2

SI_NetLine* mPositioningNetLine2
private

line between p1 and p2

◆ mPositioningNetPoint2

SI_NetPoint* mPositioningNetPoint2
private

the second netpoint to place

◆ mWireModeActions

QHash<WireMode, QAction*> mWireModeActions
private

◆ mActionSeparators

QList<QAction*> mActionSeparators
private

◆ mWidthLabel

QLabel* mWidthLabel
private

◆ mWidthComboBox

QComboBox* mWidthComboBox
private

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