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

The schematic editor finite state machine (FSM) More...

#include <schematiceditorfsm.h>

Inherits QObject.

+ Collaboration diagram for SchematicEditorFsm:

Classes

struct  Context
 FSM Context. More...
 

Public Types

enum  State
 FSM States. More...
 

Public Member Functions

 SchematicEditorFsm ()=delete
 
 SchematicEditorFsm (const SchematicEditorFsm &other)=delete
 
 SchematicEditorFsm (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~SchematicEditorFsm () noexcept
 
bool processSelect () noexcept
 
bool processAddComponent (const QString &searchTerm=QString()) noexcept
 
bool processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept
 
bool processAddNetLabel () noexcept
 
bool processDrawPolygon () noexcept
 
bool processAddText () noexcept
 
bool processAddImage (const QByteArray &data=QByteArray(), const QString &format=QString(), const QString &basename=QString()) noexcept
 
bool processDrawWire () noexcept
 
bool processDrawBus (std::optional< Uuid > busUuid=std::nullopt) 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 processMirror (Qt::Orientation orientation) noexcept
 
bool processSnapToGrid () 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
 
bool processGridIntervalChanged (const PositiveLength &interval) noexcept
 
SchematicEditorFsmoperator= (const SchematicEditorFsm &rhs)=delete
 

Private Member Functions

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

Private Attributes

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

Detailed Description

The schematic editor finite state machine (FSM)

Member Enumeration Documentation

◆ State

Constructor & Destructor Documentation

◆ SchematicEditorFsm() [1/3]

SchematicEditorFsm ( )
delete

◆ SchematicEditorFsm() [2/3]

SchematicEditorFsm ( const SchematicEditorFsm other)
delete

◆ SchematicEditorFsm() [3/3]

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

◆ ~SchematicEditorFsm()

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

Member Function Documentation

◆ processSelect()

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

◆ processAddComponent() [1/2]

bool processAddComponent ( const QString &  searchTerm = QString())
noexcept

◆ processAddComponent() [2/2]

bool processAddComponent ( const Uuid cmp,
const Uuid symbVar 
)
noexcept

◆ processAddNetLabel()

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

◆ processDrawPolygon()

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

◆ processAddText()

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

◆ processAddImage()

bool processAddImage ( const QByteArray &  data = QByteArray(),
const QString &  format = QString(),
const QString &  basename = QString() 
)
noexcept

◆ processDrawWire()

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

◆ processDrawBus()

bool processDrawBus ( std::optional< Uuid busUuid = std::nullopt)
noexcept

◆ 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

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
noexcept

◆ processSnapToGrid()

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

◆ 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

◆ processGridIntervalChanged()

bool processGridIntervalChanged ( const PositiveLength interval)
noexcept

◆ operator=()

SchematicEditorFsm & operator= ( const SchematicEditorFsm rhs)
delete

◆ getCurrentStateObj()

SchematicEditorState * 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, SchematicEditorState*> mStates
private

◆ mCurrentState

State mCurrentState
private

◆ mPreviousState

State mPreviousState
private

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