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

Signals

void toolChanged (EditorWidgetBase::Tool newTool)
 

Public Member Functions

 SymbolEditorFsm ()=delete
 
 SymbolEditorFsm (const SymbolEditorFsm &other)=delete
 
 SymbolEditorFsm (const Context &context) noexcept
 
virtual ~SymbolEditorFsm () noexcept
 
EditorWidgetBase::Tool getCurrentTool () const noexcept
 
bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
bool processRotateCw () noexcept
 
bool processRotateCcw () noexcept
 
bool processRemove () noexcept
 
bool processAbortCommand () noexcept
 
bool processStartSelecting () noexcept
 
bool processStartAddingSymbolPins () noexcept
 
bool processStartAddingNames () noexcept
 
bool processStartAddingValues () noexcept
 
bool processStartDrawLines () noexcept
 
bool processStartDrawRects () noexcept
 
bool processStartDrawPolygons () noexcept
 
bool processStartDrawCircles () noexcept
 
bool processStartDrawTexts () noexcept
 
SymbolEditorStateoperator= (const SymbolEditorState &rhs)=delete
 

Private Types

enum  State
 

Private Member Functions

SymbolEditorStategetCurrentState () const noexcept
 
bool setNextState (State state) noexcept
 
bool leaveCurrentState () noexcept
 
bool enterNextState (State state) noexcept
 

Private Attributes

QMap< State, SymbolEditorState * > mStates
 
State mCurrentState
 

Detailed Description

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

Author
ubruhin
Date
2016-11-01

Member Enumeration Documentation

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

Constructor & Destructor Documentation

SymbolEditorFsm ( )
delete
SymbolEditorFsm ( const SymbolEditorFsm other)
delete
SymbolEditorFsm ( const Context context)
explicitnoexcept
~SymbolEditorFsm ( )
virtualnoexcept

+ Here is the call graph for this function:

Member Function Documentation

EditorWidgetBase::Tool getCurrentTool ( ) const
noexcept

+ Here is the caller graph for this function:

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
noexcept
bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
noexcept
bool processGraphicsSceneLeftMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
noexcept
bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
noexcept
bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
noexcept
bool processRotateCw ( )
noexcept

+ Here is the call graph for this function:

bool processRotateCcw ( )
noexcept

+ Here is the call graph for this function:

bool processRemove ( )
noexcept

+ Here is the call graph for this function:

bool processAbortCommand ( )
noexcept

+ Here is the call graph for this function:

bool processStartSelecting ( )
noexcept

+ Here is the call graph for this function:

bool processStartAddingSymbolPins ( )
noexcept

+ Here is the call graph for this function:

bool processStartAddingNames ( )
noexcept

+ Here is the call graph for this function:

bool processStartAddingValues ( )
noexcept

+ Here is the call graph for this function:

bool processStartDrawLines ( )
noexcept

+ Here is the call graph for this function:

bool processStartDrawRects ( )
noexcept

+ Here is the call graph for this function:

bool processStartDrawPolygons ( )
noexcept

+ Here is the call graph for this function:

bool processStartDrawCircles ( )
noexcept

+ Here is the call graph for this function:

bool processStartDrawTexts ( )
noexcept

+ Here is the call graph for this function:

SymbolEditorState& operator= ( const SymbolEditorState rhs)
delete
void toolChanged ( EditorWidgetBase::Tool  newTool)
signal

+ Here is the caller graph for this function:

SymbolEditorState * getCurrentState ( ) const
privatenoexcept

+ Here is the caller graph for this function:

bool setNextState ( State  state)
privatenoexcept

+ Here is the caller graph for this function:

bool leaveCurrentState ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool enterNextState ( State  state)
privatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

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

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