LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackageEditorFsm Class Referencefinal

The PackageEditorFsm class is the finit state machine (FSM) of the package editor. More...

#include <packageeditorfsm.h>

Inherits QObject.

+ Collaboration diagram for PackageEditorFsm:

Classes

struct  Context
 

Signals

void toolChanged (EditorWidgetBase::Tool newTool)
 

Public Member Functions

 PackageEditorFsm ()=delete
 
 PackageEditorFsm (const PackageEditorFsm &other)=delete
 
 PackageEditorFsm (const Context &context) noexcept
 
virtual ~PackageEditorFsm () noexcept
 
EditorWidgetBase::Tool getCurrentTool () const noexcept
 
bool processChangeCurrentFootprint (const std::shared_ptr< Footprint > &fpt) 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 processStartAddingFootprintThtPads () noexcept
 
bool processStartAddingFootprintSmtPads () noexcept
 
bool processStartAddingNames () noexcept
 
bool processStartAddingValues () noexcept
 
bool processStartDrawLines () noexcept
 
bool processStartDrawRects () noexcept
 
bool processStartDrawPolygons () noexcept
 
bool processStartDrawCircles () noexcept
 
bool processStartDrawTexts () noexcept
 
bool processStartAddingHoles () noexcept
 
PackageEditorFsmoperator= (const PackageEditorFsm &rhs)=delete
 

Private Types

enum  State
 

Private Member Functions

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

Private Attributes

Context mContext
 
QMap< State, PackageEditorState * > mStates
 
State mCurrentState
 
QScopedPointer
< PrimitiveTextGraphicsItem
mSelectFootprintGraphicsItem
 

Detailed Description

The PackageEditorFsm class is the finit state machine (FSM) of the package editor.

Author
ubruhin
Date
2017-05-28

Member Enumeration Documentation

enum State
strongprivate
Enumerator
IDLE 
SELECT 
ADD_THT_PADS 
ADD_SMT_PADS 
ADD_NAMES 
ADD_VALUES 
DRAW_LINE 
DRAW_RECT 
DRAW_POLYGON 
DRAW_CIRCLE 
DRAW_TEXT 
ADD_HOLES 

Constructor & Destructor Documentation

PackageEditorFsm ( )
delete
PackageEditorFsm ( const PackageEditorFsm other)
delete
PackageEditorFsm ( const Context context)
explicitnoexcept
~PackageEditorFsm ( )
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 processChangeCurrentFootprint ( const std::shared_ptr< Footprint > &  fpt)
noexcept

+ Here is the call 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 processStartAddingFootprintThtPads ( )
noexcept

+ Here is the call graph for this function:

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

bool processStartAddingHoles ( )
noexcept

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

PackageEditorState * 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

Context mContext
private
QMap<State, PackageEditorState*> mStates
private
State mCurrentState
private
QScopedPointer<PrimitiveTextGraphicsItem> mSelectFootprintGraphicsItem
private

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