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

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

#include <boardeditorstate_addpad.h>

+ Inheritance diagram for BoardEditorState_AddPad:
+ Collaboration diagram for BoardEditorState_AddPad:

Public Types

enum class  PadType
 
- Public Types inherited from BoardEditorState
enum class  FindFlag : uint32_t
 
using Context = BoardEditorFsm::Context
 

Signals

void netChanged (const std::optional< Uuid > &net)
 
void componentSideChanged (Pad::ComponentSide side)
 
void shapeChanged (Pad::Shape shape)
 
void widthChanged (const PositiveLength &width)
 
void heightChanged (const PositiveLength &height)
 
void radiusChanged (const UnsignedLimitedRatio &radius)
 
void drillDiameterChanged (const PositiveLength &diameter)
 
void copperClearanceChanged (const UnsignedLength &clearance)
 
void stopMaskConfigChanged (const MaskConfig &cfg)
 
void functionChanged (Pad::Function function)
 
- Signals inherited from BoardEditorState
void requestLeavingState ()
 Signal to indicate that the current tool should be exited.
 

Public Member Functions

 BoardEditorState_AddPad ()=delete
 
 BoardEditorState_AddPad (const BoardEditorState_AddPad &other)=delete
 
 BoardEditorState_AddPad (const Context &context, PadType type, Pad::Function function) noexcept
 
virtual ~BoardEditorState_AddPad () 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
 
virtual bool processGraphicsSceneRightMouseButtonReleased (const GraphicsSceneMouseEvent &e) noexcept override
 
virtual bool processRotate (const Angle &rotation) noexcept override
 
PadType getType () const noexcept
 
QVector< std::pair< Uuid, QString > > getAvailableNets () const noexcept
 
std::optional< UuidgetNet () const noexcept
 
void setNet (const std::optional< Uuid > &net) noexcept
 
Pad::ComponentSide getComponentSide () const noexcept
 
void setComponentSide (Pad::ComponentSide side) noexcept
 
Pad::Shape getShape () const noexcept
 
void setShape (Pad::Shape shape) noexcept
 
const PositiveLengthgetWidth () const noexcept
 
void setWidth (const PositiveLength &width) noexcept
 
const PositiveLengthgetHeight () const noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
const UnsignedLimitedRatiogetRadius () const noexcept
 
void setRadius (const UnsignedLimitedRatio &radius) noexcept
 
std::optional< PositiveLengthgetDrillDiameter () const noexcept
 
void setDrillDiameter (const PositiveLength &diameter) noexcept
 
const UnsignedLengthgetCopperClearance () const noexcept
 
void setCopperClearance (const UnsignedLength &clearance) noexcept
 
const MaskConfiggetStopMaskConfig () const noexcept
 
void setStopMaskConfig (const MaskConfig &cfg) noexcept
 
Pad::Function getFunction () const noexcept
 
bool getFunctionIsFiducial () const noexcept
 
void setFunction (Pad::Function function) noexcept
 
BoardEditorState_AddPadoperator= (const BoardEditorState_AddPad &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 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
 
BoardEditorStateoperator= (const BoardEditorState &rhs)=delete
 

Private Member Functions

bool start (const Point &pos) noexcept
 
bool updatePosition (BoardGraphicsScene &scene, const Point &pos) noexcept
 
void setNetSignal (NetSignal *netsignal) noexcept
 
bool finish (const Point &pos) noexcept
 
bool abortCommand (bool showErrMsgBox) noexcept
 
void applySelectedNetSignal () noexcept
 
NetSignalgetCurrentNetSignal () const noexcept
 
void applyRecommendedRoundedRectRadius () noexcept
 
void makePadLayerVisible () noexcept
 

Private Attributes

const PadType mPadType
 
bool mIsUndoCmdActive
 
BoardPadData mCurrentProperties
 
std::optional< UuidmCurrentNetSignal
 The current net signal of the via.
 
BI_PadmCurrentPad
 
std::unique_ptr< CmdBoardPadEditmCurrentEditCmd
 

Additional Inherited Members

- 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.

Member Enumeration Documentation

◆ PadType

enum class PadType
strong
Enumerator
THT 
SMT 

Constructor & Destructor Documentation

◆ BoardEditorState_AddPad() [1/3]

◆ BoardEditorState_AddPad() [2/3]

◆ BoardEditorState_AddPad() [3/3]

BoardEditorState_AddPad ( const Context context,
PadType  type,
Pad::Function  function 
)
explicitnoexcept

◆ ~BoardEditorState_AddPad()

~BoardEditorState_AddPad ( )
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.

◆ processGraphicsSceneRightMouseButtonReleased()

bool processGraphicsSceneRightMouseButtonReleased ( const GraphicsSceneMouseEvent e)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

+ Here is the call graph for this function:

◆ processRotate()

bool processRotate ( const Angle rotation)
overridevirtualnoexcept

Reimplemented from BoardEditorState.

◆ getType()

PadType getType ( ) const
inlinenoexcept

◆ getAvailableNets()

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

◆ getNet()

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

◆ setNet()

void setNet ( const std::optional< Uuid > &  net)
noexcept

◆ getComponentSide()

Pad::ComponentSide getComponentSide ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setComponentSide()

void setComponentSide ( Pad::ComponentSide  side)
noexcept
+ Here is the caller graph for this function:

◆ getShape()

Pad::Shape getShape ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setShape()

void setShape ( Pad::Shape  shape)
noexcept

◆ getWidth()

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

◆ setWidth()

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

◆ getHeight()

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

◆ setHeight()

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

◆ getRadius()

const UnsignedLimitedRatio & getRadius ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setRadius()

void setRadius ( const UnsignedLimitedRatio radius)
noexcept
+ Here is the caller graph for this function:

◆ getDrillDiameter()

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

◆ getCopperClearance()

const UnsignedLength & getCopperClearance ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setCopperClearance()

void setCopperClearance ( const UnsignedLength clearance)
noexcept

◆ getStopMaskConfig()

const MaskConfig & getStopMaskConfig ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setStopMaskConfig()

void setStopMaskConfig ( const MaskConfig cfg)
noexcept

◆ getFunction()

Pad::Function getFunction ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ getFunctionIsFiducial()

bool getFunctionIsFiducial ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setFunction()

void setFunction ( Pad::Function  function)
noexcept

◆ operator=()

BoardEditorState_AddPad & operator= ( const BoardEditorState_AddPad rhs)
delete

◆ netChanged

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

◆ componentSideChanged

void componentSideChanged ( Pad::ComponentSide  side)
signal
+ Here is the caller graph for this function:

◆ shapeChanged

void shapeChanged ( Pad::Shape  shape)
signal

◆ widthChanged

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

◆ heightChanged

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

◆ radiusChanged

void radiusChanged ( const UnsignedLimitedRatio radius)
signal
+ Here is the caller graph for this function:

◆ drillDiameterChanged

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

◆ copperClearanceChanged

void copperClearanceChanged ( const UnsignedLength clearance)
signal
+ Here is the caller graph for this function:

◆ stopMaskConfigChanged

void stopMaskConfigChanged ( const MaskConfig cfg)
signal

◆ functionChanged

void functionChanged ( Pad::Function  function)
signal
+ Here is the caller graph for this function:

◆ start()

bool start ( 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

◆ finish()

bool finish ( 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:

◆ getCurrentNetSignal()

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

◆ applyRecommendedRoundedRectRadius()

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

◆ makePadLayerVisible()

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

Member Data Documentation

◆ mPadType

const PadType mPadType
private

◆ mIsUndoCmdActive

bool mIsUndoCmdActive
private

◆ mCurrentProperties

BoardPadData mCurrentProperties
private

◆ mCurrentNetSignal

std::optional<Uuid> mCurrentNetSignal
private

The current net signal of the via.

◆ mCurrentPad

BI_Pad* mCurrentPad
private

◆ mCurrentEditCmd

std::unique_ptr<CmdBoardPadEdit> mCurrentEditCmd
private

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