LibrePCB Developers Documentation
SES_FSM Class Referencefinal

The SES_FSM (Schematic Editor Finite State Machine) class. More...

#include <ses_fsm.h>

+ Inheritance diagram for SES_FSM:
+ Collaboration diagram for SES_FSM:

Public Types

enum  State
 FSM States. More...
 
- Public Types inherited from SES_Base
enum  ProcRetVal
 process() return values More...
 

Signals

void stateChanged (State newState)
 

Public Member Functions

 SES_FSM (SchematicEditor &editor, Ui::SchematicEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack) noexcept
 
 ~SES_FSM () noexcept
 
State getCurrentState () const noexcept
 
bool processEvent (SEE_Base *event, bool deleteEvent=false) noexcept
 
- Public Member Functions inherited from SES_Base
 SES_Base (SchematicEditor &editor, Ui::SchematicEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
virtual ~SES_Base ()
 
virtual bool entry (SEE_Base *event) noexcept
 
virtual bool exit (SEE_Base *event) noexcept
 

Private Member Functions

ProcRetVal process (SEE_Base *event) noexcept
 
State processEventFromChild (SEE_Base *event) noexcept
 returns the next state More...
 

Private Attributes

State mCurrentState
 
State mPreviousState
 
QHash< State, SES_Base * > mSubStates
 

Additional Inherited Members

- 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_FSM (Schematic Editor Finite State Machine) class.

Member Enumeration Documentation

◆ State

enum State

FSM States.

Enumerator
State_NoState 

no state active

State_Select 

librepcb::project::editor::SES_Select

State_DrawWire 

librepcb::project::editor::SES_DrawWire

State_AddNetLabel 

librepcb::project::editor::SES_AddNetLabel

State_AddComponent 

librepcb::project::editor::SES_AddComponent

Constructor & Destructor Documentation

◆ SES_FSM()

SES_FSM ( SchematicEditor editor,
Ui::SchematicEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicitnoexcept

◆ ~SES_FSM()

~SES_FSM ( )
noexcept

Member Function Documentation

◆ getCurrentState()

State getCurrentState ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processEvent()

bool processEvent ( SEE_Base event,
bool  deleteEvent = false 
)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stateChanged

void stateChanged ( State  newState)
signal
+ Here is the caller graph for this function:

◆ process()

SES_Base::ProcRetVal process ( SEE_Base event)
privatevirtualnoexcept

Implements SES_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processEventFromChild()

SES_FSM::State processEventFromChild ( SEE_Base event)
privatenoexcept

returns the next state

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mCurrentState

State mCurrentState
private

◆ mPreviousState

State mPreviousState
private

◆ mSubStates

QHash<State, SES_Base*> mSubStates
private

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