LibrePCB Developers Documentation
BES_FSM Class Referencefinal

The BES_FSM (Board Editor Finite State Machine) class. More...

#include <bes_fsm.h>

+ Inheritance diagram for BES_FSM:
+ Collaboration diagram for BES_FSM:

Public Types

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

Signals

void stateChanged (State newState)
 

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from BES_Base
const LengthUnitgetDefaultLengthUnit () const noexcept
 
- 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_FSM (Board Editor Finite State Machine) class.

Member Enumeration Documentation

◆ State

Constructor & Destructor Documentation

◆ BES_FSM()

BES_FSM ( BoardEditor editor,
Ui::BoardEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicitnoexcept

◆ ~BES_FSM()

~BES_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 ( BEE_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()

BES_Base::ProcRetVal process ( BEE_Base event)
privatevirtualnoexcept

Implements BES_Base.

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

◆ processEventFromChild()

BES_FSM::State processEventFromChild ( BEE_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, BES_Base*> mSubStates
private

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