LibrePCB Developers Documentation
|
The "select" state/tool of the board editor (default state) More...
#include <boardeditorstate_select.h>
Classes | |
struct | DeviceMenuItem |
Public Member Functions | |
BoardEditorState_Select ()=delete | |
BoardEditorState_Select (const BoardEditorState_Select &other)=delete | |
BoardEditorState_Select (const Context &context) noexcept | |
virtual | ~BoardEditorState_Select () noexcept |
virtual bool | entry () noexcept override |
virtual bool | exit () noexcept override |
virtual bool | processImportDxf () 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 | processFlip (Qt::Orientation orientation) noexcept override |
virtual bool | processSnapToGrid () noexcept override |
virtual bool | processSetLocked (bool locked) noexcept override |
virtual bool | processChangeLineWidth (int step) 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 | processSwitchToBoard (int index) noexcept override |
BoardEditorState_Select & | operator= (const BoardEditorState_Select &rhs)=delete |
Public Member Functions inherited from BoardEditorState | |
BoardEditorState ()=delete | |
BoardEditorState (const BoardEditorState &other)=delete | |
BoardEditorState (const Context &context, QObject *parent=nullptr) noexcept | |
virtual | ~BoardEditorState () noexcept |
virtual bool | processAddDevice (ComponentInstance &component, const Uuid &device, const Uuid &footprint) noexcept |
virtual bool | processKeyPressed (const QKeyEvent &e) noexcept |
virtual bool | processKeyReleased (const QKeyEvent &e) noexcept |
BoardEditorState & | operator= (const BoardEditorState &rhs)=delete |
Private Member Functions | |
bool | startMovingSelectedItems (BoardGraphicsScene &scene, const Point &startPos) noexcept |
bool | moveSelectedItems (const Point &delta) noexcept |
bool | rotateSelectedItems (const Angle &angle) noexcept |
bool | flipSelectedItems (Qt::Orientation orientation) noexcept |
bool | snapSelectedItemsToGrid () noexcept |
bool | lockSelectedItems (bool locked) noexcept |
bool | changeWidthOfSelectedItems (int step) noexcept |
bool | resetAllTextsOfSelectedItems () noexcept |
bool | removeSelectedItems () noexcept |
void | removePolygonVertices (BI_Polygon &polygon, const QVector< int > vertices) noexcept |
void | removePlaneVertices (BI_Plane &plane, const QVector< int > vertices) noexcept |
void | removeZoneVertices (BI_Zone &zone, const QVector< int > vertices) noexcept |
void | startAddingPolygonVertex (BI_Polygon &polygon, int vertex, const Point &pos) noexcept |
void | startAddingPlaneVertex (BI_Plane &plane, int vertex, const Point &pos) noexcept |
void | startAddingZoneVertex (BI_Zone &zone, int vertex, const Point &pos) noexcept |
bool | copySelectedItemsToClipboard () noexcept |
bool | startPaste (BoardGraphicsScene &scene, std::unique_ptr< BoardClipboardData > data, const std::optional< Point > &fixedPosition) |
bool | abortCommand (bool showErrMsgBox) noexcept |
bool | findPolygonVerticesAtPosition (const Point &pos) noexcept |
bool | findPlaneVerticesAtPosition (const Point &pos) noexcept |
bool | findZoneVerticesAtPosition (const Point &pos) noexcept |
bool | measureSelectedItems (const BI_NetLine &netline) noexcept |
Measure the length of the selected items. | |
void | measureLengthInDirection (BoardGraphicsScene &scene, bool directionBackwards, const BI_NetLine &netline, QSet< Uuid > &visitedNetLines, UnsignedLength &totalLength) |
Internal helper method used by measureSelectedItems. | |
bool | openPropertiesDialog (std::shared_ptr< QGraphicsItem > item) |
void | openDevicePropertiesDialog (BI_Device &device) noexcept |
void | openViaPropertiesDialog (BI_Via &via) noexcept |
void | openPlanePropertiesDialog (BI_Plane &plane) noexcept |
void | openZonePropertiesDialog (BI_Zone &zone) noexcept |
void | openPolygonPropertiesDialog (BI_Polygon &polygon) noexcept |
void | openStrokeTextPropertiesDialog (BI_StrokeText &text) noexcept |
void | openHolePropertiesDialog (BI_Hole &hole) noexcept |
QList< DeviceMenuItem > | getDeviceMenuItems (const ComponentInstance &cmpInst) const noexcept |
Private Attributes | |
bool | mIsUndoCmdActive |
An undo command will be active while dragging pasted items. | |
std::unique_ptr< CmdDragSelectedBoardItems > | mSelectedItemsDragCommand |
When dragging items, this undo command will be active. | |
BI_Polygon * | mSelectedPolygon |
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< CmdBoardPolygonEdit > | mCmdPolygonEdit |
The polygon edit command (nullptr if not editing) | |
BI_Plane * | mSelectedPlane |
The current plane selected for editing (nullptr if none) | |
QVector< int > | mSelectedPlaneVertices |
The plane vertex indices selected for editing (empty if none) | |
std::unique_ptr< CmdBoardPlaneEdit > | mCmdPlaneEdit |
The plane edit command (nullptr if not editing) | |
BI_Zone * | mSelectedZone |
The current zone selected for editing (nullptr if none) | |
QVector< int > | mSelectedZoneVertices |
The zone vertex indices selected for editing (empty if none) | |
std::unique_ptr< CmdBoardZoneEdit > | mCmdZoneEdit |
The zone edit command (nullptr if not editing) | |
Additional Inherited Members | |
Public Types inherited from BoardEditorState | |
enum class | FindFlag |
using | Context = BoardEditorFsm::Context |
Signals inherited from BoardEditorState | |
void | requestLeavingState () |
Signal to indicate that the current tool should be exited. | |
void | statusBarMessageChanged (const QString &message, int timeoutMs=-1) |
Protected Member Functions inherited from BoardEditorState | |
Board * | getActiveBoard () noexcept |
BoardGraphicsScene * | getActiveBoardScene () noexcept |
bool | getIgnoreLocks () const noexcept |
PositiveLength | getGridInterval () const noexcept |
const LengthUnit & | getLengthUnit () const noexcept |
QSet< const Layer * > | getAllowedGeometryLayers () noexcept |
void | makeLayerVisible (const QString &layer) noexcept |
void | abortBlockingToolsInOtherEditors () noexcept |
bool | execCmd (UndoCommand *cmd) |
QWidget * | parentWidget () noexcept |
QList< std::shared_ptr< QGraphicsItem > > | findItemsAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept |
template<typename T = QGraphicsItem> | |
std::shared_ptr< T > | findItemAtPos (const Point &pos, FindFlags flags, const Layer *cuLayer=nullptr, const QSet< const NetSignal * > &netsignals={}, const QVector< std::shared_ptr< QGraphicsItem > > &except={}) noexcept |
Protected Attributes inherited from BoardEditorState | |
Context | mContext |
The "select" state/tool of the board editor (default state)
|
delete |
|
delete |
|
explicitnoexcept |
|
virtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Reimplemented from BoardEditorState.
|
delete |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
Measure the length of the selected items.
Note: Currently only non-branching non-intersecting segments can be measured!
netline | A selected netline |
|
private |
Internal helper method used by measureSelectedItems.
scene | Scene of the board containing the traces. |
directionBackwards | If set to true, the segments are traversed "backwards" starting at the start anchor. Otherwise, the segments are traversed starting at the end anchor. |
netline | The netline that is used as starting point. The length of this netline will not be considered. |
visitedNetLines | A set containing UUIDs of all visited netlines. |
totalLength | A reference to the total length. The length of the found segments will be appended to this total length. |
LogicError | if there are branches or loops. |
|
private |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
privatenoexcept |
|
private |
An undo command will be active while dragging pasted items.
|
private |
When dragging items, this undo command will be active.
|
private |
The current polygon selected for editing (nullptr if none)
|
private |
The polygon vertex indices selected for editing (empty if none)
|
private |
The polygon edit command (nullptr if not editing)
|
private |
The current plane selected for editing (nullptr if none)
|
private |
The plane vertex indices selected for editing (empty if none)
|
private |
The plane edit command (nullptr if not editing)
|
private |
The current zone selected for editing (nullptr if none)
|
private |
The zone vertex indices selected for editing (empty if none)
|
private |
The zone edit command (nullptr if not editing)