LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 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

enum State

FSM States.

Enumerator
State_NoState 

no state active

State_Select 
See Also
#project#BES_Select
State_DrawTrace 
See Also
#project#BES_DrawTrace
State_DrawPolygon 
See Also
librepcb::project::BES_DrawPolygon
State_AddStrokeText 
See Also
librepcb::project::BES_AddStrokeText
State_AddHole 
See Also
librepcb::project::BES_AddHole
State_AddVia 
See Also
librepcb::project::BES_AddVia
State_AddDevice 
See Also
librepcb::project::BES_AddDevice
State_DrawPlane 
See Also
#project#BES_DrawPlane

Constructor & Destructor Documentation

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

Member Function Documentation

State getCurrentState ( ) const
inlinenoexcept
bool processEvent ( BEE_Base event,
bool  deleteEvent = false 
)
noexcept

+ Here is the caller graph for this function:

void stateChanged ( State  newState)
signal

+ Here is the caller graph for this function:

BES_Base::ProcRetVal process ( BEE_Base event)
privatevirtualnoexcept

Implements BES_Base.

BES_FSM::State processEventFromChild ( BEE_Base event)
privatenoexcept

returns the next state

+ Here is the call graph for this function:

Member Data Documentation

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

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