LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BES_Select Class Referencefinal

The BES_Select class. More...

#include <bes_select.h>

+ Inheritance diagram for BES_Select:
+ Collaboration diagram for BES_Select:

Public Member Functions

 BES_Select (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
 ~BES_Select ()
 
ProcRetVal process (BEE_Base *event) noexceptoverride
 
bool entry (BEE_Base *event) noexceptoverride
 
bool exit (BEE_Base *event) noexceptoverride
 
- Public Member Functions inherited from BES_Base
 BES_Base (BoardEditor &editor, Ui::BoardEditor &editorUi, GraphicsView &editorGraphicsView, UndoStack &undoStack)
 
virtual ~BES_Base ()
 

Private Types

enum  SubState
 enum for all possible substates More...
 

Private Member Functions

ProcRetVal processSubStateIdle (BEE_Base *event) noexcept
 
ProcRetVal processSubStateIdleSceneEvent (BEE_Base *event) noexcept
 
ProcRetVal processSubStateMoving (BEE_Base *event) noexcept
 
ProcRetVal processSubStateMovingSceneEvent (BEE_Base *event) noexcept
 
ProcRetVal processIdleSceneLeftClick (QGraphicsSceneMouseEvent *mouseEvent, Board &board) noexcept
 
ProcRetVal processIdleSceneRightMouseButtonReleased (QGraphicsSceneMouseEvent *mouseEvent, Board *board) noexcept
 
ProcRetVal processIdleSceneDoubleClick (QGraphicsSceneMouseEvent *mouseEvent, Board *board) noexcept
 
bool startMovingSelectedItems (Board &board, const Point &startPos) noexcept
 
bool rotateSelectedItems (const Angle &angle) noexcept
 
bool flipSelectedItems (Qt::Orientation orientation) noexcept
 
bool removeSelectedItems () noexcept
 
bool measureSelectedItems (const BI_NetLine &netline) noexcept
 Measure the length of the selected items. More...
 
void measureLengthInDirection (bool directionBackwards, const BI_NetLine &netline, QSet< Uuid > &visitedNetLines, UnsignedLength &totalLength)
 Internal helper method used by measureSelectedItems. More...
 
void openDevicePropertiesDialog (BI_Device &device) noexcept
 
void openViaPropertiesDialog (BI_Via &via) noexcept
 
void openPlanePropertiesDialog (BI_Plane &plane) noexcept
 
void openPolygonPropertiesDialog (Board &board, Polygon &polygon) noexcept
 
void openStrokeTextPropertiesDialog (Board &board, StrokeText &text) noexcept
 
void openHolePropertiesDialog (Board &board, Hole &hole) noexcept
 

Private Attributes

SubState mSubState
 the current substate More...
 
QScopedPointer
< CmdDragSelectedBoardItems
mSelectedItemsDragCommand
 

Additional Inherited Members

- Public Types inherited from BES_Base
enum  ProcRetVal
 process() return values More...
 
- Protected Attributes inherited from BES_Base
workspace::WorkspacemWorkspace
 
ProjectmProject
 
CircuitmCircuit
 
BoardEditormEditor
 
Ui::BoardEditor & mEditorUi
 allows access to BoardEditor UI More...
 
GraphicsViewmEditorGraphicsView
 allows access to the board editor graphics view More...
 
UndoStackmUndoStack
 

Detailed Description

The BES_Select class.

Member Enumeration Documentation

enum SubState
private

enum for all possible substates

Enumerator
SubState_Idle 

left mouse button is not pressed (default state)

SubState_Moving 

left mouse button is pressed

Constructor & Destructor Documentation

BES_Select ( BoardEditor editor,
Ui::BoardEditor &  editorUi,
GraphicsView editorGraphicsView,
UndoStack undoStack 
)
explicit
~BES_Select ( )

Member Function Documentation

BES_Base::ProcRetVal process ( BEE_Base event)
overridevirtualnoexcept

Implements BES_Base.

bool entry ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

bool exit ( BEE_Base event)
overridevirtualnoexcept

Reimplemented from BES_Base.

BES_Base::ProcRetVal processSubStateIdle ( BEE_Base event)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processSubStateIdleSceneEvent ( BEE_Base event)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processSubStateMoving ( BEE_Base event)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processSubStateMovingSceneEvent ( BEE_Base event)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processIdleSceneLeftClick ( QGraphicsSceneMouseEvent *  mouseEvent,
Board board 
)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processIdleSceneRightMouseButtonReleased ( QGraphicsSceneMouseEvent *  mouseEvent,
Board board 
)
privatenoexcept

+ Here is the call graph for this function:

BES_Base::ProcRetVal processIdleSceneDoubleClick ( QGraphicsSceneMouseEvent *  mouseEvent,
Board board 
)
privatenoexcept

+ Here is the call graph for this function:

bool startMovingSelectedItems ( Board board,
const Point startPos 
)
privatenoexcept
bool rotateSelectedItems ( const Angle angle)
privatenoexcept

+ Here is the call graph for this function:

bool flipSelectedItems ( Qt::Orientation  orientation)
privatenoexcept

+ Here is the call graph for this function:

bool removeSelectedItems ( )
privatenoexcept

+ Here is the call graph for this function:

bool measureSelectedItems ( const BI_NetLine netline)
privatenoexcept

Measure the length of the selected items.

Note: Currently only non-branching non-intersecting segments can be measured!

Parameters
netlineA selected netline

+ Here is the call graph for this function:

void measureLengthInDirection ( bool  directionBackwards,
const BI_NetLine netline,
QSet< Uuid > &  visitedNetLines,
UnsignedLength totalLength 
)
private

Internal helper method used by measureSelectedItems.

Parameters
directionBackwardsIf set to true, the segments are traversed "backwards" starting at the start anchor. Otherwise, the segments are traversed starting at the end anchor.
netlineThe netline that is used as starting point. The length of this netline will not be considered.
visitedNetLinesA set containing UUIDs of all visited netlines.
totalLengthA reference to the total length. The length of the found segments will be appended to this total length.
Exceptions
LogicErrorif there are branches or loops.

+ Here is the call graph for this function:

void openDevicePropertiesDialog ( BI_Device device)
privatenoexcept
void openViaPropertiesDialog ( BI_Via via)
privatenoexcept
void openPlanePropertiesDialog ( BI_Plane plane)
privatenoexcept
void openPolygonPropertiesDialog ( Board board,
Polygon polygon 
)
privatenoexcept
void openStrokeTextPropertiesDialog ( Board board,
StrokeText text 
)
privatenoexcept
void openHolePropertiesDialog ( Board board,
Hole hole 
)
privatenoexcept

Member Data Documentation

SubState mSubState
private

the current substate

QScopedPointer<CmdDragSelectedBoardItems> mSelectedItemsDragCommand
private

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