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

The "add via" state/tool of the board editor. More...

#include <boardeditorstate_addvia.h>

+ Inheritance diagram for BoardEditorState_AddVia:
+ Collaboration diagram for BoardEditorState_AddVia:

Signals

void sizeChanged (const PositiveLength &size)
 
void drillDiameterChanged (const PositiveLength &diameter)
 
void netChanged (bool autoNet, const std::optional< Uuid > &net)
 
- Signals inherited from BoardEditorState
void requestLeavingState ()
 Signal to indicate that the current tool should be exited.
 

Public Member Functions

 BoardEditorState_AddVia ()=delete
 
 BoardEditorState_AddVia (const BoardEditorState_AddVia &other)=delete
 
 BoardEditorState_AddVia (const Context &context) noexcept
 
virtual ~BoardEditorState_AddVia () noexcept
 
virtual bool entry () noexcept override
 
virtual bool exit () noexcept override
 
virtual bool processGraphicsSceneMouseMoved (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonPressed (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processGraphicsSceneLeftMouseButtonDoubleClicked (const GraphicsSceneMouseEvent &e) noexcept override
 
const PositiveLengthgetSize () const noexcept
 
void setSize (const PositiveLength &size) noexcept
 
const PositiveLengthgetDrillDiameter () const noexcept
 
void setDrillDiameter (const PositiveLength &diameter) noexcept
 
QVector< std::pair< Uuid, QString > > getAvailableNets () const noexcept
 
bool getUseAutoNet () const noexcept
 
std::optional< UuidgetNet () const noexcept
 
void setNet (bool autoNet, const std::optional< Uuid > &net) noexcept
 
BoardEditorState_AddViaoperator= (const BoardEditorState_AddVia &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 processImportDxf () 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 processFlip (Qt::Orientation orientation) noexcept
 
virtual bool processSnapToGrid () noexcept
 
virtual bool processSetLocked (bool locked) noexcept
 
virtual bool processChangeLineWidth (int step) noexcept
 
virtual bool processResetAllTexts () noexcept
 
virtual bool processRemove () noexcept
 
virtual bool processEditProperties () noexcept
 
virtual bool processAbortCommand () noexcept
 
virtual bool processKeyPressed (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processKeyReleased (const GraphicsSceneKeyEvent &e) noexcept
 
virtual bool processGraphicsSceneLeftMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept
 
BoardEditorStateoperator= (const BoardEditorState &rhs)=delete
 

Private Member Functions

bool addVia (const Point &pos) noexcept
 
bool updatePosition (BoardGraphicsScene &scene, const Point &pos) noexcept
 
void setNetSignal (NetSignal *netsignal) noexcept
 
bool fixPosition (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 
void applySelectedNetSignal () noexcept
 
void updateClosestNetSignal (BoardGraphicsScene &scene, const Point &pos) noexcept
 
NetSignalgetCurrentNetSignal () const noexcept
 

Private Attributes

bool mIsUndoCmdActive
 
Via mCurrentProperties
 
bool mUseAutoNetSignal
 Whether the net signal is determined automatically or not.
 
std::optional< UuidmCurrentNetSignal
 The current net signal of the via.
 
bool mClosestNetSignalIsUpToDate
 Whether mCurrentNetSignal contains an up-to-date closest net signal.
 
BI_ViamCurrentViaToPlace
 
std::unique_ptr< CmdBoardViaEditmCurrentViaEditCmd
 

Additional Inherited Members

- Public Types inherited from BoardEditorState
enum class  FindFlag : uint32_t
 
using Context = BoardEditorFsm::Context
 
- Protected Member Functions inherited from BoardEditorState
BoardGraphicsScenegetActiveBoardScene () noexcept
 
bool getIgnoreLocks () const noexcept
 
PositiveLength getGridInterval () const noexcept
 
const LengthUnitgetLengthUnit () 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
 
BoardEditorFsmAdaptermAdapter
 

Detailed Description

The "add via" state/tool of the board editor.

Constructor & Destructor Documentation

◆ BoardEditorState_AddVia() [1/3]

◆ BoardEditorState_AddVia() [2/3]

◆ BoardEditorState_AddVia() [3/3]

BoardEditorState_AddVia ( const Context context)
explicitnoexcept

◆ ~BoardEditorState_AddVia()

~BoardEditorState_AddVia ( )
virtualnoexcept

Member Function Documentation

◆ entry()

bool entry ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ exit()

bool exit ( )
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneMouseMoved()

bool processGraphicsSceneMouseMoved ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonPressed()

bool processGraphicsSceneLeftMouseButtonPressed ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processGraphicsSceneLeftMouseButtonDoubleClicked()

bool processGraphicsSceneLeftMouseButtonDoubleClicked ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ getSize()

const PositiveLength & getSize ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setSize()

void setSize ( const PositiveLength size)
noexcept
+ Here is the caller graph for this function:

◆ getDrillDiameter()

const PositiveLength & getDrillDiameter ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setDrillDiameter()

void setDrillDiameter ( const PositiveLength diameter)
noexcept
+ Here is the caller graph for this function:

◆ getAvailableNets()

QVector< std::pair< Uuid, QString > > getAvailableNets ( ) const
noexcept
+ Here is the call graph for this function:

◆ getUseAutoNet()

bool getUseAutoNet ( ) const
inlinenoexcept

◆ getNet()

std::optional< Uuid > getNet ( ) const
inlinenoexcept

◆ setNet()

void setNet ( bool  autoNet,
const std::optional< Uuid > &  net 
)
noexcept
+ Here is the caller graph for this function:

◆ operator=()

BoardEditorState_AddVia & operator= ( const BoardEditorState_AddVia rhs)
delete

◆ sizeChanged

void sizeChanged ( const PositiveLength size)
signal
+ Here is the caller graph for this function:

◆ drillDiameterChanged

void drillDiameterChanged ( const PositiveLength diameter)
signal
+ Here is the caller graph for this function:

◆ netChanged

void netChanged ( bool  autoNet,
const std::optional< Uuid > &  net 
)
signal
+ Here is the caller graph for this function:

◆ addVia()

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

◆ updatePosition()

bool updatePosition ( BoardGraphicsScene scene,
const Point pos 
)
privatenoexcept

◆ setNetSignal()

void setNetSignal ( NetSignal netsignal)
privatenoexcept

◆ fixPosition()

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

◆ abortCommand()

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

◆ applySelectedNetSignal()

void applySelectedNetSignal ( )
privatenoexcept
+ Here is the call graph for this function:

◆ updateClosestNetSignal()

void updateClosestNetSignal ( BoardGraphicsScene scene,
const Point pos 
)
privatenoexcept
+ Here is the call graph for this function:

◆ getCurrentNetSignal()

NetSignal * getCurrentNetSignal ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mCurrentProperties

Via mCurrentProperties
private

◆ mUseAutoNetSignal

bool mUseAutoNetSignal
private

Whether the net signal is determined automatically or not.

◆ mCurrentNetSignal

std::optional<Uuid> mCurrentNetSignal
private

The current net signal of the via.

◆ mClosestNetSignalIsUpToDate

bool mClosestNetSignalIsUpToDate
private

Whether mCurrentNetSignal contains an up-to-date closest net signal.

◆ mCurrentViaToPlace

BI_Via* mCurrentViaToPlace
private

◆ mCurrentViaEditCmd

std::unique_ptr<CmdBoardViaEdit> mCurrentViaEditCmd
private

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