LibrePCB Developers Documentation
Loading...
Searching...
No Matches
SchematicEditorState Class Reference

The schematic editor state base class. More...

#include <schematiceditorstate.h>

+ Inheritance diagram for SchematicEditorState:
+ Collaboration diagram for SchematicEditorState:

Public Types

enum class  FindFlag
 
using Context = SchematicEditorFsm::Context
 

Signals

void requestLeavingState ()
 Signal to indicate that the current tool should be exited.
 

Public Member Functions

 SchematicEditorState ()=delete
 
 SchematicEditorState (const SchematicEditorState &other)=delete
 
 SchematicEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~SchematicEditorState () noexcept
 
virtual bool entry () noexcept
 
virtual bool exit () noexcept
 
virtual bool processAddComponent (const QString &searchTerm=QString()) noexcept
 
virtual bool processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept
 
virtual bool processSelectAll () noexcept
 
virtual bool processCut () noexcept
 
virtual bool processCopy () noexcept
 
virtual bool processPaste () noexcept
 
virtual bool processMove (const Point &delta) noexcept
 
virtual bool processRotate (const Angle &rotation) noexcept
 
virtual bool processMirror (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processAbortCommand () noexcept
 
virtual bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
SchematicEditorStateoperator= (const SchematicEditorState &rhs)=delete
 

Protected Member Functions

SchematicGraphicsScenegetActiveSchematicScene () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
void abortBlockingToolsInOtherEditors () noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 
template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos (const Point &pos, FindFlags flags, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept
 

Static Protected Member Functions

static const QSet< const Layer * > & getAllowedGeometryLayers () noexcept
 

Protected Attributes

Context mContext
 
SchematicEditorFsmAdaptermAdapter
 

Detailed Description

The schematic editor state base class.

Member Typedef Documentation

◆ Context

Member Enumeration Documentation

◆ FindFlag

enum class FindFlag
strong
Enumerator
NetPoints 
NetLines 
NetLabels 
Symbols 
SymbolPins 
SymbolPinsWithComponentSignal 
Polygons 
Texts 
All 
AcceptNearMatch 
AcceptNearestWithinGrid 
SkipLowerPriorityMatches 

Constructor & Destructor Documentation

◆ SchematicEditorState() [1/3]

◆ SchematicEditorState() [2/3]

SchematicEditorState ( const SchematicEditorState other)
delete

◆ SchematicEditorState() [3/3]

SchematicEditorState ( const Context context,
QObject *  parent = nullptr 
)
explicitnoexcept

◆ ~SchematicEditorState()

~SchematicEditorState ( )
virtualnoexcept

Member Function Documentation

◆ entry()

virtual bool entry ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_AddComponent, SchematicEditorState_AddNetLabel, SchematicEditorState_AddText, SchematicEditorState_DrawPolygon, SchematicEditorState_DrawWire, SchematicEditorState_Measure, and SchematicEditorState_Select.

+ Here is the caller graph for this function:

◆ exit()

◆ processAddComponent() [1/2]

virtual bool processAddComponent ( const QString &  searchTerm = QString())
inlinevirtualnoexcept

◆ processAddComponent() [2/2]

virtual bool processAddComponent ( const Uuid cmp,
const Uuid symbVar 
)
inlinevirtualnoexcept

◆ processSelectAll()

virtual bool processSelectAll ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processCut()

virtual bool processCut ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processCopy()

virtual bool processCopy ( )
inlinevirtualnoexcept

◆ processPaste()

virtual bool processPaste ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processMove()

virtual bool processMove ( const Point delta)
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processRotate()

virtual bool processRotate ( const Angle rotation)
inlinevirtualnoexcept

◆ processMirror()

virtual bool processMirror ( Qt::Orientation  orientation)
inlinevirtualnoexcept

◆ processSnapToGrid()

virtual bool processSnapToGrid ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processResetAllTexts()

virtual bool processResetAllTexts ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processRemove()

virtual bool processRemove ( )
inlinevirtualnoexcept

◆ processEditProperties()

virtual bool processEditProperties ( )
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processAbortCommand()

◆ processKeyPressed()

virtual bool processKeyPressed ( const GraphicsSceneKeyEvent e)
inlinevirtualnoexcept

◆ processKeyReleased()

virtual bool processKeyReleased ( const GraphicsSceneKeyEvent e)
inlinevirtualnoexcept

◆ processGraphicsSceneMouseMoved()

◆ processGraphicsSceneLeftMouseButtonPressed()

◆ processGraphicsSceneLeftMouseButtonReleased()

virtual bool processGraphicsSceneLeftMouseButtonReleased ( const GraphicsSceneMouseEvent e)
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

◆ processGraphicsSceneRightMouseButtonReleased()

virtual bool processGraphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
inlinevirtualnoexcept

◆ operator=()

SchematicEditorState & operator= ( const SchematicEditorState rhs)
delete

◆ requestLeavingState

void requestLeavingState ( )
signal

Signal to indicate that the current tool should be exited.

This signal can be emitted by each state to signalize the FSM to leave the current state and entering the select tool.

+ Here is the caller graph for this function:

◆ getActiveSchematicScene()

SchematicGraphicsScene * getActiveSchematicScene ( )
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGridInterval()

PositiveLength getGridInterval ( ) const
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLengthUnit()

const LengthUnit & getLengthUnit ( ) const
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllowedGeometryLayers()

const QSet< const Layer * > & getAllowedGeometryLayers ( )
staticprotectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ abortBlockingToolsInOtherEditors()

void abortBlockingToolsInOtherEditors ( )
protectednoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execCmd()

bool execCmd ( UndoCommand cmd)
protected
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parentWidget()

QWidget * parentWidget ( )
protectednoexcept
+ Here is the caller graph for this function:

◆ findItemsAtPos()

QList< std::shared_ptr< QGraphicsItem > > findItemsAtPos ( const Point pos,
FindFlags  flags,
const QVector< std::shared_ptr< QGraphicsItem > > &  except = {} 
)
protectednoexcept
+ Here is the call graph for this function:

◆ findItemAtPos()

template<typename T = QGraphicsItem>
std::shared_ptr< T > findItemAtPos ( const Point pos,
FindFlags  flags,
const QVector< std::shared_ptr< QGraphicsItem > > &  except = {} 
)
inlineprotectednoexcept

Member Data Documentation

◆ mContext

Context mContext
protected

◆ mAdapter

SchematicEditorFsmAdapter& mAdapter
protected

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