LibrePCB Developers Documentation
SchematicEditorState_Select Class Referencefinal

The "select" state/tool of the schematic editor (default state) More...

#include <schematiceditorstate_select.h>

+ Inheritance diagram for SchematicEditorState_Select:
+ Collaboration diagram for SchematicEditorState_Select:

Public Member Functions

 SchematicEditorState_Select ()=delete
 
 SchematicEditorState_Select (const SchematicEditorState_Select &other)=delete
 
 SchematicEditorState_Select (const Context &context) noexcept
 
virtual ~SchematicEditorState_Select () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processSelectAll () noexcept override
 
virtual bool processCut () noexcept override
 
virtual bool processCopy () noexcept override
 
virtual bool processPaste () noexcept override
 
virtual bool processRotateCw () noexcept override
 
virtual bool processRotateCcw () noexcept override
 
virtual bool processMirror () noexcept override
 
virtual bool processRemove () noexcept override
 
virtual bool processAbortCommand () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processSwitchToSchematicPage (int index) noexcept override
 
SchematicEditorState_Selectoperator= (const SchematicEditorState_Select &rhs)=delete
 
- Public Member Functions inherited from SchematicEditorState
 SchematicEditorState ()=delete
 
 SchematicEditorState (const SchematicEditorState &other)=delete
 
 SchematicEditorState (const Context &context, QObject *parent=nullptr) noexcept
 
virtual ~SchematicEditorState () noexcept
 
virtual bool processAddComponent () noexcept
 
virtual bool processAddComponent (const Uuid &cmp, const Uuid &symbVar) noexcept
 
SchematicEditorStateoperator= (const SchematicEditorState &rhs)=delete
 

Private Types

enum  SubState
 enum for all possible substates More...
 

Private Member Functions

bool startMovingSelectedItems (Schematic &schematic, const Point &startPos) noexcept
 
bool rotateSelectedItems (const Angle &angle) noexcept
 
bool mirrorSelectedItems () noexcept
 
bool removeSelectedItems () noexcept
 
bool copySelectedItemsToClipboard () noexcept
 
bool pasteFromClipboard () noexcept
 
void openPropertiesDialog (SI_Base *item) noexcept
 
void openSymbolPropertiesDialog (SI_Symbol &symbol) noexcept
 
void openNetLabelPropertiesDialog (SI_NetLabel &netlabel) noexcept
 
void openTextPropertiesDialog (SI_Text &text) noexcept
 
QAction * addActionCut (QMenu &menu, const QString &text=tr("Cut")) noexcept
 
QAction * addActionCopy (QMenu &menu, const QString &text=tr("Copy")) noexcept
 
QAction * addActionRemove (QMenu &menu, const QString &text=tr("Remove")) noexcept
 
QAction * addActionMirror (QMenu &menu, const QString &text=tr("Mirror")) noexcept
 
QAction * addActionRotate (QMenu &menu, const QString &text=tr("Rotate")) noexcept
 
QAction * addActionOpenProperties (QMenu &menu, SI_Base *item, const QString &text=tr("Properties")) noexcept
 

Private Attributes

SubState mSubState
 the current substate More...
 
Point mStartPos
 
QScopedPointer< CmdMoveSelectedSchematicItemsmSelectedItemsMoveCommand
 
int mCurrentSelectionIndex
 

Additional Inherited Members

- Public Types inherited from SchematicEditorState
using Context = SchematicEditorFsm::Context
 
- Protected Member Functions inherited from SchematicEditorState
SchematicgetActiveSchematic () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetDefaultLengthUnit () const noexcept
 
bool execCmd (UndoCommand *cmd)
 
QWidget * parentWidget () noexcept
 
- Protected Attributes inherited from SchematicEditorState
Context mContext
 

Detailed Description

The "select" state/tool of the schematic editor (default state)

Member Enumeration Documentation

◆ SubState

enum SubState
strongprivate

enum for all possible substates

Enumerator
IDLE 

left mouse button is not pressed (default state)

SELECTING 

left mouse button pressed to draw selection rect

MOVING 

left mouse button pressed to move items

PASTING 

move pasted items

Constructor & Destructor Documentation

◆ SchematicEditorState_Select() [1/3]

◆ SchematicEditorState_Select() [2/3]

◆ SchematicEditorState_Select() [3/3]

SchematicEditorState_Select ( const Context context)
explicitnoexcept

◆ ~SchematicEditorState_Select()

~SchematicEditorState_Select ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processSelectAll()

bool processSelectAll ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processCut()

bool processCut ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processCopy()

bool processCopy ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processPaste()

bool processPaste ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processRotateCw()

bool processRotateCw ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processRotateCcw()

bool processRotateCcw ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processMirror()

bool processMirror ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processRemove()

bool processRemove ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonReleased()

bool processGraphicsSceneLeftMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent &  e)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

+ Here is the call graph for this function:

◆ processSwitchToSchematicPage()

bool processSwitchToSchematicPage ( int  index)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ operator=()

SchematicEditorState_Select& operator= ( const SchematicEditorState_Select rhs)
delete

◆ startMovingSelectedItems()

bool startMovingSelectedItems ( Schematic schematic,
const Point startPos 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ rotateSelectedItems()

bool rotateSelectedItems ( const Angle angle)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mirrorSelectedItems()

bool mirrorSelectedItems ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeSelectedItems()

bool removeSelectedItems ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copySelectedItemsToClipboard()

bool copySelectedItemsToClipboard ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pasteFromClipboard()

bool pasteFromClipboard ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openPropertiesDialog()

void openPropertiesDialog ( SI_Base item)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openSymbolPropertiesDialog()

void openSymbolPropertiesDialog ( SI_Symbol symbol)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openNetLabelPropertiesDialog()

void openNetLabelPropertiesDialog ( SI_NetLabel netlabel)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openTextPropertiesDialog()

void openTextPropertiesDialog ( SI_Text text)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionCut()

QAction * addActionCut ( QMenu &  menu,
const QString &  text = tr("Cut") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionCopy()

QAction * addActionCopy ( QMenu &  menu,
const QString &  text = tr("Copy") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionRemove()

QAction * addActionRemove ( QMenu &  menu,
const QString &  text = tr("Remove") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionMirror()

QAction * addActionMirror ( QMenu &  menu,
const QString &  text = tr("Mirror") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionRotate()

QAction * addActionRotate ( QMenu &  menu,
const QString &  text = tr("Rotate") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addActionOpenProperties()

QAction * addActionOpenProperties ( QMenu &  menu,
SI_Base item,
const QString &  text = tr("Properties") 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSubState

SubState mSubState
private

the current substate

◆ mStartPos

Point mStartPos
private

◆ mSelectedItemsMoveCommand

QScopedPointer<CmdMoveSelectedSchematicItems> mSelectedItemsMoveCommand
private

◆ mCurrentSelectionIndex

int mCurrentSelectionIndex
private

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