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

The SymbolEditorState_Select class. More...

#include <symboleditorstate_select.h>

+ Inheritance diagram for SymbolEditorState_Select:
+ Collaboration diagram for SymbolEditorState_Select:

Public Member Functions

 SymbolEditorState_Select ()=delete
 
 SymbolEditorState_Select (const SymbolEditorState_Select &other)=delete
 
 SymbolEditorState_Select (const Context &context) noexcept
 
 ~SymbolEditorState_Select () noexcept
 
bool entry () noexcept override
 
bool exit () noexcept override
 
bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
bool processSelectAll () noexcept override
 
bool processCut () noexcept override
 
bool processCopy () noexcept override
 
bool processPaste (std::unique_ptr< SymbolClipboardData > data=nullptr) noexcept override
 
bool processMove (const Point &delta) noexcept override
 
bool processRotate (const Angle &rotation) noexcept override
 
bool processMirror (Qt::Orientation orientation) noexcept override
 
bool processSnapToGrid () noexcept override
 
bool processRemove () noexcept override
 
bool processEditProperties () noexcept override
 
bool processImportDxf () noexcept override
 
bool processAbortCommand () noexcept override
 
bool processGridIntervalChanged (const PositiveLength &inverval) noexcept override
 
SymbolEditorState_Selectoperator= (const SymbolEditorState_Select &rhs)=delete
 
- Public Member Functions inherited from SymbolEditorState
 SymbolEditorState ()=delete
 
 SymbolEditorState (const SymbolEditorState &other)=delete
 
 SymbolEditorState (const Context &context) noexcept
 
virtual ~SymbolEditorState () noexcept
 
std::unique_ptr< SymbolClipboardDatatakeDataToPaste () noexcept
 
virtual bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processImportPins () noexcept
 
SymbolEditorStateoperator= (const SymbolEditorState &rhs)=delete
 

Private Types

enum class  SubState
 

Private Member Functions

bool openContextMenuAtPos (const Point &pos) noexcept
 
bool openPropertiesDialogOfItem (std::shared_ptr< QGraphicsItem > item) noexcept
 
bool openPropertiesDialogOfItemAtPos (const Point &pos) noexcept
 
bool copySelectedItemsToClipboard () noexcept
 
bool startPaste (std::unique_ptr< SymbolClipboardData > data, const std::optional< Point > &fixedPosition)
 
bool rotateSelectedItems (const Angle &angle) noexcept
 
bool mirrorSelectedItems (Qt::Orientation orientation) noexcept
 
bool snapSelectedItemsToGrid () noexcept
 
bool removeSelectedItems () noexcept
 
void removePolygonVertices (std::shared_ptr< Polygon > polygon, const QVector< int > vertices) noexcept
 
void startAddingPolygonVertex (std::shared_ptr< Polygon > polygon, int vertex, const Point &pos) noexcept
 
void setSelectionRect (const Point &p1, const Point &p2) noexcept
 
void clearSelectionRect (bool updateItemsSelectionState) noexcept
 
QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition (const Point &pos) noexcept
 
bool findPolygonVerticesAtPosition (const Point &pos) noexcept
 
void setState (SubState state) noexcept
 
void scheduleUpdateAvailableFeatures () noexcept
 
SymbolEditorFsmAdapter::Features updateAvailableFeatures () noexcept
 

Private Attributes

SubState mState
 
Point mStartPos
 
std::unique_ptr< CmdDragSelectedSymbolItemsmCmdDragSelectedItems
 
std::shared_ptr< PolygonmSelectedPolygon
 The current polygon selected for editing (nullptr if none)
 
QVector< int > mSelectedPolygonVertices
 The polygon vertex indices selected for editing (empty if none)
 
std::unique_ptr< CmdPolygonEditmCmdPolygonEdit
 The polygon edit command (nullptr if not editing)
 
QList< QMetaObject::Connection > mConnections
 Signal/slot connections only when in this state.
 
std::unique_ptr< QTimer > mUpdateAvailableFeaturesTimer
 Delay timer for updateAvailableFeatures(), only when in this state.
 

Additional Inherited Members

- Public Types inherited from SymbolEditorState
using Context = SymbolEditorFsm::Context
 
- Signals inherited from SymbolEditorState
void pasteRequested ()
 
- Protected Member Functions inherited from SymbolEditorState
void requestPaste (std::unique_ptr< SymbolClipboardData > data) noexcept
 
GraphicsScenegetGraphicsScene () noexcept
 
SymbolGraphicsItemgetGraphicsItem () noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () const noexcept
 
QWidget * parentWidget () noexcept
 
- Static Protected Member Functions inherited from SymbolEditorState
static const QSet< const Layer * > & getAllowedTextLayers () noexcept
 
static const QSet< const Layer * > & getAllowedCircleAndPolygonLayers () noexcept
 
- Protected Attributes inherited from SymbolEditorState
Context mContext
 
SymbolEditorFsmAdaptermAdapter
 

Detailed Description

Member Enumeration Documentation

◆ SubState

enum class SubState
strongprivate
Enumerator
IDLE 
SELECTING 
MOVING 
PASTING 
MOVING_POLYGON_VERTEX 

Constructor & Destructor Documentation

◆ SymbolEditorState_Select() [1/3]

◆ SymbolEditorState_Select() [2/3]

◆ SymbolEditorState_Select() [3/3]

SymbolEditorState_Select ( const Context context)
explicitnoexcept

◆ ~SymbolEditorState_Select()

~SymbolEditorState_Select ( )
noexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonReleased()

bool processGraphicsSceneLeftMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processSelectAll()

bool processSelectAll ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processCut()

bool processCut ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processCopy()

bool processCopy ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processPaste()

bool processPaste ( std::unique_ptr< SymbolClipboardData data = nullptr)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processMove()

bool processMove ( const Point delta)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

◆ processMirror()

bool processMirror ( Qt::Orientation  orientation)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

◆ processSnapToGrid()

bool processSnapToGrid ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processRemove()

bool processRemove ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processEditProperties()

bool processEditProperties ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processImportDxf()

bool processImportDxf ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

+ Here is the call graph for this function:

◆ processAbortCommand()

bool processAbortCommand ( )
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

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

◆ processGridIntervalChanged()

bool processGridIntervalChanged ( const PositiveLength inverval)
overridevirtualnoexcept

Reimplemented from SymbolEditorState.

◆ operator=()

SymbolEditorState_Select & operator= ( const SymbolEditorState_Select rhs)
delete

◆ openContextMenuAtPos()

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

◆ openPropertiesDialogOfItem()

bool openPropertiesDialogOfItem ( std::shared_ptr< QGraphicsItem >  item)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openPropertiesDialogOfItemAtPos()

bool openPropertiesDialogOfItemAtPos ( const Point pos)
privatenoexcept

◆ copySelectedItemsToClipboard()

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

◆ startPaste()

bool startPaste ( std::unique_ptr< SymbolClipboardData data,
const std::optional< Point > &  fixedPosition 
)
private
+ Here is the call graph for this function:
+ Here is the caller 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:

◆ snapSelectedItemsToGrid()

bool snapSelectedItemsToGrid ( )
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 ( std::shared_ptr< Polygon polygon,
const QVector< int >  vertices 
)
privatenoexcept
+ Here is the call graph for this function:

◆ startAddingPolygonVertex()

void startAddingPolygonVertex ( std::shared_ptr< Polygon polygon,
int  vertex,
const Point pos 
)
privatenoexcept
+ Here is the call graph for this function:

◆ setSelectionRect()

void setSelectionRect ( const Point p1,
const Point p2 
)
privatenoexcept

◆ clearSelectionRect()

void clearSelectionRect ( bool  updateItemsSelectionState)
privatenoexcept
+ Here is the caller graph for this function:

◆ findItemsAtPosition()

QList< std::shared_ptr< QGraphicsItem > > findItemsAtPosition ( const Point pos)
privatenoexcept
+ Here is the call graph for this function:

◆ findPolygonVerticesAtPosition()

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

◆ setState()

void setState ( SubState  state)
privatenoexcept
+ Here is the caller graph for this function:

◆ scheduleUpdateAvailableFeatures()

void scheduleUpdateAvailableFeatures ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ updateAvailableFeatures()

SymbolEditorFsmAdapter::Features updateAvailableFeatures ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mState

SubState mState
private

◆ mStartPos

Point mStartPos
private

◆ mCmdDragSelectedItems

std::unique_ptr<CmdDragSelectedSymbolItems> mCmdDragSelectedItems
private

◆ mSelectedPolygon

std::shared_ptr<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

std::unique_ptr<CmdPolygonEdit> mCmdPolygonEdit
private

The polygon edit command (nullptr if not editing)

◆ mConnections

QList<QMetaObject::Connection> mConnections
private

Signal/slot connections only when in this state.

◆ mUpdateAvailableFeaturesTimer

std::unique_ptr<QTimer> mUpdateAvailableFeaturesTimer
private

Delay timer for updateAvailableFeatures(), only when in this state.


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