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

The SymbolEditorFsm class is the finit state machine (FSM) of the symbol editor. More...

#include <symboleditorfsm.h>

Inherits QObject.

+ Collaboration diagram for SymbolEditorFsm:

Classes

struct  Context
 

Public Member Functions

 SymbolEditorFsm ()=delete
 
 SymbolEditorFsm (const SymbolEditorFsm &other)=delete
 
 SymbolEditorFsm (const Context &context) noexcept
 
virtual ~SymbolEditorFsm () noexcept
 
EditorWidgetBase::Tool getCurrentTool () const 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
 
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 processMirror (Qt::Orientation orientation) noexcept
 
bool processSnapToGrid () noexcept
 
bool processRemove () noexcept
 
bool processEditProperties () noexcept
 
bool processAbortCommand () noexcept
 
bool processStartSelecting () noexcept
 
bool processStartAddingSymbolPins (bool import) noexcept
 
bool processStartAddingNames () noexcept
 
bool processStartAddingValues () noexcept
 
bool processStartDrawLines () noexcept
 
bool processStartDrawArcs () noexcept
 
bool processStartDrawRects () noexcept
 
bool processStartDrawPolygons () noexcept
 
bool processStartDrawCircles () noexcept
 
bool processStartDrawTexts () noexcept
 
bool processStartDxfImport () noexcept
 
bool processStartMeasure () noexcept
 
bool processGridIntervalChanged (const PositiveLength &inverval) noexcept
 
SymbolEditorStateoperator= (const SymbolEditorState &rhs)=delete
 

Private Types

enum class  State
 

Private Member Functions

SymbolEditorStategetCurrentState () const noexcept
 
bool setNextState (State state) noexcept
 
bool leaveCurrentState () noexcept
 
bool enterNextState (State state) noexcept
 
bool switchToPreviousState () noexcept
 
void handlePasteRequest () noexcept
 

Private Attributes

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

Detailed Description

The SymbolEditorFsm class is the finit state machine (FSM) of the symbol editor.

Member Enumeration Documentation

◆ State

enum class State
strongprivate
Enumerator
IDLE 
SELECT 
ADD_PINS 
ADD_NAMES 
ADD_VALUES 
DRAW_LINE 
DRAW_ARC 
DRAW_RECT 
DRAW_POLYGON 
DRAW_CIRCLE 
DRAW_TEXT 
MEASURE 

Constructor & Destructor Documentation

◆ SymbolEditorFsm() [1/3]

SymbolEditorFsm ( )
delete

◆ SymbolEditorFsm() [2/3]

SymbolEditorFsm ( const SymbolEditorFsm other)
delete

◆ SymbolEditorFsm() [3/3]

SymbolEditorFsm ( const Context context)
explicitnoexcept

◆ ~SymbolEditorFsm()

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

Member Function Documentation

◆ getCurrentTool()

EditorWidgetBase::Tool getCurrentTool ( ) const
noexcept

◆ 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

◆ 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

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
noexcept

◆ processSnapToGrid()

bool processSnapToGrid ( )
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:

◆ processAbortCommand()

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

◆ processStartSelecting()

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

◆ processStartAddingSymbolPins()

bool processStartAddingSymbolPins ( bool  import)
noexcept

◆ processStartAddingNames()

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

◆ processStartAddingValues()

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

◆ processStartDrawLines()

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

◆ processStartDrawArcs()

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

◆ processStartDrawRects()

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

◆ processStartDrawPolygons()

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

◆ processStartDrawCircles()

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

◆ processStartDrawTexts()

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

◆ processStartDxfImport()

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

◆ processStartMeasure()

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

◆ processGridIntervalChanged()

bool processGridIntervalChanged ( const PositiveLength inverval)
noexcept

◆ operator=()

SymbolEditorState & operator= ( const SymbolEditorState rhs)
delete

◆ getCurrentState()

SymbolEditorState * getCurrentState ( ) 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:

◆ handlePasteRequest()

void handlePasteRequest ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mStates

QMap<State, SymbolEditorState*> mStates
private

◆ mCurrentState

State mCurrentState
private

◆ mPreviousState

State mPreviousState
private

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