LibrePCB Developers Documentation
SchematicEditorState Class Reference

The schematic editor state base class. More...

#include <schematiceditorstate.h>

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

Public Types

enum  FindFlag
 
using Context = SchematicEditorFsm::Context
 

Signals

void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 

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 processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processAbortCommand () noexcept
 
virtual bool processKeyPressed (const QKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const QKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept
 
virtual bool processSwitchToSchematicPage (int index) noexcept
 
SchematicEditorStateoperator= (const SchematicEditorState &rhs)=delete
 

Protected Member Functions

SchematicgetActiveSchematic () noexcept
 
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
 

Detailed Description

The schematic editor state base class.

Member Typedef Documentation

◆ Context

Member Enumeration Documentation

◆ FindFlag

enum 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_DrawWire, SchematicEditorState_AddComponent, SchematicEditorState_Select, SchematicEditorState_AddText, SchematicEditorState_DrawPolygon, SchematicEditorState_AddNetLabel, and SchematicEditorState_Measure.

+ 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

◆ 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 QKeyEvent &  e)
inlinevirtualnoexcept

◆ processKeyReleased()

virtual bool processKeyReleased ( const QKeyEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneMouseMoved()

◆ processGraphicsSceneLeftMouseButtonPressed()

virtual bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneLeftMouseButtonReleased()

virtual bool processGraphicsSceneLeftMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

Reimplemented in SchematicEditorState_Select.

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processGraphicsSceneRightMouseButtonReleased()

virtual bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
inlinevirtualnoexcept

◆ processSwitchToSchematicPage()

virtual bool processSwitchToSchematicPage ( int  index)
inlinevirtualnoexcept

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

+ Here is the call graph for this function:

◆ operator=()

SchematicEditorState& operator= ( const SchematicEditorState rhs)
delete
+ Here is the caller graph for this function:

◆ statusBarMessageChanged

void statusBarMessageChanged ( const QString &  message,
int  timeoutMs = -1 
)
signal
+ Here is the caller graph for this function:

◆ getActiveSchematic()

Schematic * getActiveSchematic ( )
protectednoexcept
+ Here is the call graph for this function:
+ 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:
+ Here is the caller graph for this function:

◆ findItemAtPos()

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

Member Data Documentation

◆ mContext

Context mContext
protected

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