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

A pad in a board (either standalone or from a footprint) More...

#include <bi_pad.h>

+ Inheritance diagram for BI_Pad:
+ Collaboration diagram for BI_Pad:

Public Types

enum class  Event
 
typedef Slot< BI_Pad, EventOnEditedSlot
 

Public Member Functions

 BI_Pad ()=delete
 
 BI_Pad (const BI_Pad &other)=delete
 
 BI_Pad (BI_NetSegment &netsegment, const BoardPadData &properties)
 Construct a board pad (not related to a footprint)
 
 BI_Pad (BI_Device &device, const Uuid &padUuid)
 Construct a footprint pad.
 
 ~BI_Pad () noexcept
 
BI_NetSegmentgetNetSegment () const noexcept
 
BI_DevicegetDevice () const noexcept
 
const PackagePadgetLibPackagePad () const noexcept
 
ComponentSignalInstancegetComponentSignalInstance () const noexcept
 
NetSignalgetNetSignal () const noexcept
 
const BoardPadDatagetProperties () const noexcept
 
const UuidgetUuid () const noexcept
 
const PointgetPosition () const noexcept override
 Get the absolute position of the pad (global scene coordinates)
 
const AnglegetRotation () const noexcept
 Get the absolute rotation of the pad (global scene coordinates)
 
bool getMirrored () const noexcept
 Get the absolute mirror state of the pad (global scene coordinates)
 
Pad::ComponentSide getComponentSide () const noexcept
 
const LayergetSolderLayer () const noexcept
 
bool isOnLayer (const Layer &layer) const noexcept
 
const QString & getText () const noexcept
 
bool isUsed () const noexcept
 
const QHash< const Layer *, QList< PadGeometry > > & getGeometries () const noexcept
 
TraceAnchor toTraceAnchor () const noexcept override
 
void setPosition (const Point &position) noexcept
 
void setRotation (const Angle &rotation) noexcept
 
void setShape (Pad::Shape shape) noexcept
 
void setWidth (const PositiveLength &width) noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
void setRadius (const UnsignedLimitedRatio &radius) noexcept
 
void setCustomShapeOutline (const Path &outline) noexcept
 
void setStopMaskConfig (const MaskConfig &config) noexcept
 
void setSolderPasteConfig (const MaskConfig &config) noexcept
 
void setCopperClearance (const UnsignedLength &clearance) noexcept
 
void setComponentSideAndHoles (Pad::ComponentSide side, const PadHoleList &holes)
 
void setFunction (Pad::Function function) noexcept
 
void setLocked (bool locked) noexcept
 
void addToBoard () override
 
void removeFromBoard () override
 
void registerNetLine (BI_NetLine &netline) override
 
void unregisterNetLine (BI_NetLine &netline) override
 
const QSet< BI_NetLine * > & getNetLines () const noexcept override
 
BI_Padoperator= (const BI_Pad &rhs)=delete
 
- Public Member Functions inherited from BI_Base
 BI_Base ()=delete
 
 BI_Base (const BI_Base &other)=delete
 
 BI_Base (Board &board) noexcept
 
virtual ~BI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
BoardgetBoard () const noexcept
 
virtual bool isAddedToBoard () const noexcept
 
BI_Baseoperator= (const BI_Base &rhs)=delete
 
- Public Member Functions inherited from BI_NetLineAnchor
 BI_NetLineAnchor () noexcept=default
 
virtual ~BI_NetLineAnchor () noexcept=default
 
std::vector< PositiveLengthgetLineWidths () const noexcept
 
std::optional< PositiveLengthgetMaxLineWidth () const noexcept
 
std::optional< PositiveLengthgetMedianLineWidth () const noexcept
 
BI_NetSegmentgetNetSegmentOfLines () const noexcept
 

Public Attributes

Signal< BI_Pad, EventonEdited
 

Private Member Functions

void deviceEdited (const BI_Device &obj, BI_Device::Event event) noexcept
 
void netSignalChanged (NetSignal *from, NetSignal *to)
 
void updateTransform () noexcept
 
void updateText () noexcept
 
void updateGeometries () noexcept
 
void invalidatePlanes () noexcept
 
QString getLibraryDeviceName () const noexcept
 
QString getComponentInstanceName () const noexcept
 
QString getPadNameOrUuid () const noexcept
 
QString getNetSignalName () const noexcept
 
UnsignedLength getSizeForMaskOffsetCalculaton () const noexcept
 
QList< PadGeometrygetGeometryOnLayer (const Layer &layer) const noexcept
 
QList< PadGeometrygetGeometryOnCopperLayer (const Layer &layer) const noexcept
 
bool isConnectedOnLayer (const Layer &layer) const noexcept
 

Private Attributes

BI_NetSegmentmNetSegment
 
BI_DevicemDevice
 
const FootprintPadmFootprintPad
 
const PackagePadmPackagePad
 
ComponentSignalInstancemComponentSignalInstance
 
BoardPadData mProperties
 
Point mPosition
 
Angle mRotation
 
bool mMirrored
 
QString mText
 
QHash< const Layer *, QList< PadGeometry > > mGeometries
 
QSet< BI_NetLine * > mRegisteredNetLines
 
BI_Device::OnEditedSlot mOnDeviceEditedSlot
 

Additional Inherited Members

- Protected Attributes inherited from BI_Base
BoardmBoard
 

Detailed Description

A pad in a board (either standalone or from a footprint)

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
PositionChanged 
RotationChanged 
ShapeChanged 
WidthChanged 
HeightChanged 
RadiusChanged 
CustomShapeOutlineChanged 
StopMaskConfigChanged 
SolderPasteConfigChanged 
CopperClearanceChanged 
ComponentSideChanged 
FunctionChanged 
HolesEdited 
MirroredChanged 
LockedChanged 
TextChanged 
GeometriesChanged 

Constructor & Destructor Documentation

◆ BI_Pad() [1/4]

BI_Pad ( )
delete

◆ BI_Pad() [2/4]

BI_Pad ( const BI_Pad other)
delete

◆ BI_Pad() [3/4]

BI_Pad ( BI_NetSegment netsegment,
const BoardPadData properties 
)

Construct a board pad (not related to a footprint)

Attention
This kind of pad needs to be added to the board with librepcb::BI_NetSegment::addElements().
Parameters
netsegmentNet segment of the pad.
propertiesPad properties.
+ Here is the call graph for this function:

◆ BI_Pad() [4/4]

BI_Pad ( BI_Device device,
const Uuid padUuid 
)

Construct a footprint pad.

Attention
This kind of pad is added to the board exclusively from the constructor librepcb::BI_Device::BI_Device().
Parameters
deviceThe device of the pad's footprint.
padUuidFootprint pad UUID.
+ Here is the call graph for this function:

◆ ~BI_Pad()

~BI_Pad ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getNetSegment()

BI_NetSegment * getNetSegment ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDevice()

BI_Device * getDevice ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibPackagePad()

const PackagePad * getLibPackagePad ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getComponentSignalInstance()

ComponentSignalInstance * getComponentSignalInstance ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getNetSignal()

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

◆ getProperties()

const BoardPadData & getProperties ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getUuid()

const Uuid & getUuid ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosition()

const Point & getPosition ( ) const
inlineoverridevirtualnoexcept

Get the absolute position of the pad (global scene coordinates)

Returns
Global pad position

Implements BI_NetLineAnchor.

+ Here is the caller graph for this function:

◆ getRotation()

const Angle & getRotation ( ) const
inlinenoexcept

Get the absolute rotation of the pad (global scene coordinates)

Returns
Global pad rotation
+ Here is the caller graph for this function:

◆ getMirrored()

bool getMirrored ( ) const
inlinenoexcept

Get the absolute mirror state of the pad (global scene coordinates)

Returns
Global pad mirror state
+ Here is the caller graph for this function:

◆ getComponentSide()

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

◆ getSolderLayer()

const Layer & getSolderLayer ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isOnLayer()

bool isOnLayer ( const Layer layer) const
noexcept
+ Here is the caller graph for this function:

◆ getText()

const QString & getText ( ) const
inlinenoexcept

◆ isUsed()

bool isUsed ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getGeometries()

const QHash< const Layer *, QList< PadGeometry > > & getGeometries ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ toTraceAnchor()

TraceAnchor toTraceAnchor ( ) const
overridevirtualnoexcept

Implements BI_NetLineAnchor.

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

◆ setPosition()

void setPosition ( const Point position)
noexcept
+ Here is the caller graph for this function:

◆ setRotation()

void setRotation ( const Angle rotation)
noexcept
+ Here is the caller graph for this function:

◆ setShape()

void setShape ( Pad::Shape  shape)
noexcept
+ Here is the caller graph for this function:

◆ setWidth()

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

◆ setHeight()

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

◆ setRadius()

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

◆ setCustomShapeOutline()

void setCustomShapeOutline ( const Path outline)
noexcept
+ Here is the caller graph for this function:

◆ setStopMaskConfig()

void setStopMaskConfig ( const MaskConfig config)
noexcept
+ Here is the caller graph for this function:

◆ setSolderPasteConfig()

void setSolderPasteConfig ( const MaskConfig config)
noexcept
+ Here is the caller graph for this function:

◆ setCopperClearance()

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

◆ setComponentSideAndHoles()

void setComponentSideAndHoles ( Pad::ComponentSide  side,
const PadHoleList holes 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFunction()

void setFunction ( Pad::Function  function)
noexcept
+ Here is the caller graph for this function:

◆ setLocked()

void setLocked ( bool  locked)
noexcept
+ Here is the caller graph for this function:

◆ addToBoard()

void addToBoard ( )
overridevirtual

Reimplemented from BI_Base.

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

◆ removeFromBoard()

void removeFromBoard ( )
overridevirtual

Reimplemented from BI_Base.

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

◆ registerNetLine()

void registerNetLine ( BI_NetLine netline)
overridevirtual

Implements BI_NetLineAnchor.

+ Here is the call graph for this function:

◆ unregisterNetLine()

void unregisterNetLine ( BI_NetLine netline)
overridevirtual

Implements BI_NetLineAnchor.

+ Here is the call graph for this function:

◆ getNetLines()

const QSet< BI_NetLine * > & getNetLines ( ) const
inlineoverridevirtualnoexcept

Implements BI_NetLineAnchor.

+ Here is the caller graph for this function:

◆ operator=()

BI_Pad & operator= ( const BI_Pad rhs)
delete

◆ deviceEdited()

void deviceEdited ( const BI_Device obj,
BI_Device::Event  event 
)
privatenoexcept

◆ netSignalChanged()

void netSignalChanged ( NetSignal from,
NetSignal to 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTransform()

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

◆ updateText()

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

◆ updateGeometries()

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

◆ invalidatePlanes()

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

◆ getLibraryDeviceName()

QString getLibraryDeviceName ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getComponentInstanceName()

QString getComponentInstanceName ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPadNameOrUuid()

QString getPadNameOrUuid ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetSignalName()

QString getNetSignalName ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSizeForMaskOffsetCalculaton()

UnsignedLength getSizeForMaskOffsetCalculaton ( ) const
privatenoexcept
+ Here is the call graph for this function:

◆ getGeometryOnLayer()

QList< PadGeometry > getGeometryOnLayer ( const Layer layer) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeometryOnCopperLayer()

QList< PadGeometry > getGeometryOnCopperLayer ( const Layer layer) const
privatenoexcept
+ Here is the call graph for this function:

◆ isConnectedOnLayer()

bool isConnectedOnLayer ( const Layer layer) const
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ onEdited

Signal<BI_Pad, Event> onEdited

◆ mNetSegment

BI_NetSegment* mNetSegment
private

The net segment this pad is part of

Attention
This is `nullptr if this is a footprint pad.

◆ mDevice

BI_Device* mDevice
private

The device this pad is part of

Attention
This is `nullptr if this is a board pad.

◆ mFootprintPad

const FootprintPad* mFootprintPad
private

The footprint pad of the device

Attention
This is nullptr if this is a board pad!

◆ mPackagePad

const PackagePad* mPackagePad
private

The package pad where this footprint pad is connected to

Attention
This is nullptr if this is a board pad or the footprint pad is not connected!

◆ mComponentSignalInstance

ComponentSignalInstance* mComponentSignalInstance
private

The net signal where this footprint pad is connected to

Attention
This is nullptr if this is a board pad or the footprint pad is not connected!

◆ mProperties

BoardPadData mProperties
private

The pad's properties

If this is a footprint pad, the properties will be copied from the corresponding pad from the footprint in the project library and are considered read-only.

If this is a board pad, the properties are the single source of truth, and can be modified with the setters on this class.

◆ mPosition

Point mPosition
private

◆ mRotation

Angle mRotation
private

◆ mMirrored

bool mMirrored
private

◆ mText

QString mText
private

◆ mGeometries

QHash<const Layer*, QList<PadGeometry> > mGeometries
private

◆ mRegisteredNetLines

QSet<BI_NetLine*> mRegisteredNetLines
private

◆ mOnDeviceEditedSlot

BI_Device::OnEditedSlot mOnDeviceEditedSlot
private

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