LibrePCB Developers Documentation
Loading...
Searching...
No Matches
BoardEditorFsm Class Referencefinal

The board editor finite state machine. More...

#include <boardeditorfsm.h>

Inherits QObject.

+ Collaboration diagram for BoardEditorFsm:

Classes

struct  Context
 FSM Context. More...
 

Public Types

enum  State
 FSM States. More...
 

Public Member Functions

 BoardEditorFsm ()=delete
 
 BoardEditorFsm (const BoardEditorFsm &other)=delete
 
 BoardEditorFsm (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~BoardEditorFsm () noexcept
 
State getCurrentState () const noexcept
 
bool processSelect () noexcept
 
bool processAddHole () noexcept
 
bool processAddStrokeText () noexcept
 
bool processAddVia () noexcept
 
bool processAddDevice (ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept
 
bool processDrawPolygon () noexcept
 
bool processDrawPlane () noexcept
 
bool processDrawZone () noexcept
 
bool processDrawTrace () noexcept
 
bool processImportDxf () noexcept
 
bool processMeasure () noexcept
 
bool processAbortCommand () noexcept
 
bool processSelectAll () noexcept
 
bool processCut () noexcept
 
bool processCopy () noexcept
 
bool processPaste () noexcept
 
bool processMove (const Point &delta) noexcept
 
bool processRotate (const Angle &rotation) noexcept
 
bool processFlip (Qt::Orientation orientation) noexcept
 
bool processSnapToGrid () noexcept
 
bool processSetLocked (bool locked) noexcept
 
bool processChangeLineWidth (int step) noexcept
 
bool processResetAllTexts () noexcept
 
bool processRemove () noexcept
 
bool processEditProperties () noexcept
 
bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
BoardEditorFsmoperator= (const BoardEditorFsm &rhs)=delete
 

Private Member Functions

BoardEditorStategetCurrentStateObj () const noexcept
 
bool setNextState (State state) noexcept
 
bool leaveCurrentState () noexcept
 
bool enterNextState (State state) noexcept
 
bool switchToPreviousState () noexcept
 

Private Attributes

QMap< State, BoardEditorState * > mStates
 
State mCurrentState
 
State mPreviousState
 

Detailed Description

The board editor finite state machine.

Member Enumeration Documentation

◆ State

Constructor & Destructor Documentation

◆ BoardEditorFsm() [1/3]

BoardEditorFsm ( )
delete

◆ BoardEditorFsm() [2/3]

BoardEditorFsm ( const BoardEditorFsm other)
delete

◆ BoardEditorFsm() [3/3]

BoardEditorFsm ( const Context context,
QObject *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~BoardEditorFsm()

~BoardEditorFsm ( )
virtualnoexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getCurrentState()

State getCurrentState ( ) const
inlinenoexcept

◆ processSelect()

bool processSelect ( )
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processAddHole()

bool processAddHole ( )
noexcept
+ Here is the call graph for this function:

◆ processAddStrokeText()

bool processAddStrokeText ( )
noexcept
+ Here is the call graph for this function:

◆ processAddVia()

bool processAddVia ( )
noexcept
+ Here is the call graph for this function:

◆ processAddDevice()

bool processAddDevice ( ComponentInstance component,
const Uuid device,
const Uuid footprint 
)
noexcept

◆ processDrawPolygon()

bool processDrawPolygon ( )
noexcept
+ Here is the call graph for this function:

◆ processDrawPlane()

bool processDrawPlane ( )
noexcept
+ Here is the call graph for this function:

◆ processDrawZone()

bool processDrawZone ( )
noexcept
+ Here is the call graph for this function:

◆ processDrawTrace()

bool processDrawTrace ( )
noexcept
+ Here is the call graph for this function:

◆ processImportDxf()

bool processImportDxf ( )
noexcept
+ Here is the call graph for this function:

◆ processMeasure()

bool processMeasure ( )
noexcept
+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
noexcept
+ Here is the call graph for this function:

◆ processSelectAll()

bool processSelectAll ( )
noexcept
+ Here is the call graph for this function:

◆ processCut()

bool processCut ( )
noexcept
+ Here is the call graph for this function:

◆ processCopy()

bool processCopy ( )
noexcept
+ Here is the call graph for this function:

◆ processPaste()

bool processPaste ( )
noexcept
+ Here is the call graph for this function:

◆ processMove()

bool processMove ( const Point delta)
noexcept

◆ processRotate()

bool processRotate ( const Angle rotation)
noexcept

◆ processFlip()

bool processFlip ( Qt::Orientation  orientation)
noexcept

◆ processSnapToGrid()

bool processSnapToGrid ( )
noexcept
+ Here is the call graph for this function:

◆ processSetLocked()

bool processSetLocked ( bool  locked)
noexcept

◆ processChangeLineWidth()

bool processChangeLineWidth ( int  step)
noexcept

◆ processResetAllTexts()

bool processResetAllTexts ( )
noexcept
+ Here is the call graph for this function:

◆ processRemove()

bool processRemove ( )
noexcept
+ Here is the call graph for this function:

◆ processEditProperties()

bool processEditProperties ( )
noexcept
+ Here is the call graph for this function:

◆ processKeyPressed()

bool processKeyPressed ( const GraphicsSceneKeyEvent e)
noexcept

◆ processKeyReleased()

bool processKeyReleased ( const GraphicsSceneKeyEvent e)
noexcept

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
noexcept

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
noexcept

◆ processGraphicsSceneLeftMouseButtonReleased()

bool processGraphicsSceneLeftMouseButtonReleased ( const GraphicsSceneMouseEvent e)
noexcept

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
noexcept

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
noexcept

◆ operator=()

BoardEditorFsm & operator= ( const BoardEditorFsm rhs)
delete

◆ getCurrentStateObj()

BoardEditorState * getCurrentStateObj ( ) const
privatenoexcept
+ Here is the caller graph for this function:

◆ setNextState()

bool setNextState ( State  state)
privatenoexcept
+ Here is the caller graph for this function:

◆ leaveCurrentState()

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

◆ enterNextState()

bool enterNextState ( State  state)
privatenoexcept
+ Here is the call graph for this function:

◆ switchToPreviousState()

bool switchToPreviousState ( )
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mStates

QMap<State, BoardEditorState*> mStates
private

◆ mCurrentState

State mCurrentState
private

◆ mPreviousState

State mPreviousState
private

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