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 processMove (const Point &delta) noexcept override
 
virtual bool processRotate (const Angle &rotation) noexcept override
 
virtual bool processMirror (Qt::Orientation orientation) noexcept override
 
virtual bool processResetAllTexts () noexcept override
 
virtual bool processRemove () noexcept override
 
virtual bool processEditProperties () 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 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
 

Private Types

enum class  SubState
 enum for all possible substates More...
 

Private Member Functions

bool startMovingSelectedItems (SchematicGraphicsScene &scene, const Point &startPos) noexcept
 
bool moveSelectedItems (const Point &delta) noexcept
 
bool rotateSelectedItems (const Angle &angle) noexcept
 
bool mirrorSelectedItems (Qt::Orientation orientation) noexcept
 
bool resetAllTextsOfSelectedItems () noexcept
 
bool removeSelectedItems () noexcept
 
void removePolygonVertices (Polygon &polygon, const QVector< int > vertices) noexcept
 
void startAddingPolygonVertex (SI_Polygon &polygon, int vertex, const Point &pos) noexcept
 
bool copySelectedItemsToClipboard () noexcept
 
bool pasteFromClipboard () noexcept
 
bool findPolygonVerticesAtPosition (const Point &pos) noexcept
 
bool openPropertiesDialog (std::shared_ptr< QGraphicsItem > item) noexcept
 
void openSymbolPropertiesDialog (SI_Symbol &symbol) noexcept
 
void openNetLabelPropertiesDialog (SI_NetLabel &netlabel) noexcept
 
void openPolygonPropertiesDialog (Polygon &polygon) noexcept
 
void openTextPropertiesDialog (Text &text) noexcept
 

Private Attributes

SubState mSubState
 the current substate More...
 
Point mStartPos
 
QScopedPointer< CmdDragSelectedSchematicItemsmSelectedItemsDragCommand
 
SI_PolygonmSelectedPolygon
 The current polygon selected for editing (nullptr if none) More...
 
QVector< int > mSelectedPolygonVertices
 The polygon vertex indices selected for editing (empty if none) More...
 
QScopedPointer< CmdPolygonEditmCmdPolygonEdit
 The polygon edit command (nullptr if not editing) More...
 

Additional Inherited Members

- Public Types inherited from SchematicEditorState
enum class  FindFlag
 
using Context = SchematicEditorFsm::Context
 
- Signals inherited from SchematicEditorState
void statusBarMessageChanged (const QString &message, int timeoutMs=-1)
 
- Protected Member Functions inherited from SchematicEditorState
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 inherited from SchematicEditorState
static const QSet< const Layer * > & getAllowedGeometryLayers () 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 class 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

MOVING_POLYGON_VERTICES 

left mouts butten pressed to move vertices

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:

◆ processMove()

bool processMove ( const Point delta)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
overridevirtualnoexcept

Reimplemented from SchematicEditorState.

◆ processResetAllTexts()

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

◆ processEditProperties()

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

◆ 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 ( SchematicGraphicsScene scene,
const Point startPos 
)
privatenoexcept

◆ moveSelectedItems()

bool moveSelectedItems ( const Point delta)
privatenoexcept
+ Here is the call graph for this function:

◆ rotateSelectedItems()

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

◆ mirrorSelectedItems()

bool mirrorSelectedItems ( Qt::Orientation  orientation)
privatenoexcept
+ Here is the call graph for this function:

◆ resetAllTextsOfSelectedItems()

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

◆ removePolygonVertices()

void removePolygonVertices ( Polygon polygon,
const QVector< int >  vertices 
)
privatenoexcept
+ Here is the call graph for this function:

◆ startAddingPolygonVertex()

void startAddingPolygonVertex ( SI_Polygon polygon,
int  vertex,
const Point pos 
)
privatenoexcept
+ Here is the call 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:

◆ findPolygonVerticesAtPosition()

bool findPolygonVerticesAtPosition ( const Point pos)
privatenoexcept

◆ openPropertiesDialog()

bool openPropertiesDialog ( std::shared_ptr< QGraphicsItem >  item)
privatenoexcept

◆ openSymbolPropertiesDialog()

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

◆ openNetLabelPropertiesDialog()

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

◆ openPolygonPropertiesDialog()

void openPolygonPropertiesDialog ( Polygon polygon)
privatenoexcept
+ Here is the caller graph for this function:

◆ openTextPropertiesDialog()

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

Member Data Documentation

◆ mSubState

SubState mSubState
private

the current substate

◆ mStartPos

Point mStartPos
private

◆ mSelectedItemsDragCommand

QScopedPointer<CmdDragSelectedSchematicItems> mSelectedItemsDragCommand
private

◆ mSelectedPolygon

SI_Polygon* mSelectedPolygon
private

The current polygon selected for editing (nullptr if none)

◆ mSelectedPolygonVertices

QVector<int> mSelectedPolygonVertices
private

The polygon vertex indices selected for editing (empty if none)

◆ mCmdPolygonEdit

QScopedPointer<CmdPolygonEdit> mCmdPolygonEdit
private

The polygon edit command (nullptr if not editing)


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