LibrePCB Developers Documentation
FootprintPad Class Referencefinal

The FootprintPad class represents a pad of a footprint. More...

#include <footprintpad.h>

+ Collaboration diagram for FootprintPad:

Public Types

enum class  Shape
 
enum class  ComponentSide
 
enum class  Function
 
enum class  Event
 
typedef Slot< FootprintPad, EventOnEditedSlot
 

Public Member Functions

 FootprintPad ()=delete
 
 FootprintPad (const FootprintPad &other) noexcept
 
 FootprintPad (const Uuid &uuid, const tl::optional< Uuid > &pkgPadUuid, const Point &pos, const Angle &rot, Shape shape, const PositiveLength &width, const PositiveLength &height, const UnsignedLimitedRatio &radius, const Path &customShapeOutline, const MaskConfig &autoStopMask, const MaskConfig &autoSolderPaste, const UnsignedLength &copperClearance, ComponentSide side, Function function, const PadHoleList &holes) noexcept
 
 FootprintPad (const SExpression &node)
 
 ~FootprintPad () noexcept
 
const UuidgetUuid () const noexcept
 
const tl::optional< Uuid > & getPackagePadUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
Shape getShape () const noexcept
 
const PositiveLengthgetWidth () const noexcept
 
const PositiveLengthgetHeight () const noexcept
 
const UnsignedLimitedRatiogetRadius () const noexcept
 
const PathgetCustomShapeOutline () const noexcept
 
const MaskConfiggetStopMaskConfig () const noexcept
 
const MaskConfiggetSolderPasteConfig () const noexcept
 
const UnsignedLengthgetCopperClearance () const noexcept
 
ComponentSide getComponentSide () const noexcept
 
Function getFunction () const noexcept
 
bool getFunctionIsFiducial () const noexcept
 
bool getFunctionNeedsSoldering () const noexcept
 
const PadHoleListgetHoles () const noexcept
 
PadHoleListgetHoles () noexcept
 
bool isTht () const noexcept
 
bool isOnLayer (const Layer &layer) const noexcept
 
const LayergetSmtLayer () const noexcept
 
bool hasTopCopper () const noexcept
 
bool hasBottomCopper () const noexcept
 
bool hasAutoTopStopMask () const noexcept
 
bool hasAutoBottomStopMask () const noexcept
 
bool hasAutoTopSolderPaste () const noexcept
 
bool hasAutoBottomSolderPaste () const noexcept
 
PadGeometry getGeometry () const noexcept
 
QHash< const Layer *, QList< PadGeometry > > buildPreviewGeometries () const noexcept
 
bool setPackagePadUuid (const tl::optional< Uuid > &pad) noexcept
 
bool setPosition (const Point &pos) noexcept
 
bool setRotation (const Angle &rot) noexcept
 
bool setShape (Shape shape) noexcept
 
bool setWidth (const PositiveLength &width) noexcept
 
bool setHeight (const PositiveLength &height) noexcept
 
bool setRadius (const UnsignedLimitedRatio &radius) noexcept
 
bool setCustomShapeOutline (const Path &outline) noexcept
 
bool setStopMaskConfig (const MaskConfig &config) noexcept
 
bool setSolderPasteConfig (const MaskConfig &config) noexcept
 
bool setCopperClearance (const UnsignedLength &clearance) noexcept
 
bool setComponentSide (ComponentSide side) noexcept
 
bool setFunction (Function function) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const FootprintPad &rhs) const noexcept
 
bool operator!= (const FootprintPad &rhs) const noexcept
 
FootprintPadoperator= (const FootprintPad &rhs) noexcept
 

Static Public Member Functions

static UnsignedLimitedRatio getRecommendedRadius (const PositiveLength &width, const PositiveLength &height) noexcept
 
static QString getFunctionDescriptionTr (Function function) noexcept
 

Public Attributes

Signal< FootprintPad, EventonEdited
 

Private Member Functions

void holesEdited (const PadHoleList &list, int index, const std::shared_ptr< const PadHole > &hole, PadHoleList::Event event) noexcept
 

Private Attributes

Uuid mUuid
 
tl::optional< UuidmPackagePadUuid
 
Point mPosition
 
Angle mRotation
 
Shape mShape
 
PositiveLength mWidth
 
PositiveLength mHeight
 
UnsignedLimitedRatio mRadius
 
Path mCustomShapeOutline
 Empty if not needed; Implicitly closed. More...
 
MaskConfig mStopMaskConfig
 
MaskConfig mSolderPasteConfig
 
UnsignedLength mCopperClearance
 
ComponentSide mComponentSide
 
Function mFunction
 
PadHoleList mHoles
 If not empty, it's a THT pad. More...
 
PadHoleList::OnEditedSlot mHolesEditedSlot
 

Detailed Description

The FootprintPad class represents a pad of a footprint.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Shape

enum class Shape
strong
Enumerator
RoundedRect 
RoundedOctagon 
Custom 

◆ ComponentSide

enum class ComponentSide
strong
Enumerator
Top 
Bottom 

◆ Function

enum class Function
strong
Enumerator
Unspecified 
StandardPad 
PressFitPad 
ThermalPad 
BgaPad 
EdgeConnectorPad 
TestPad 
LocalFiducial 
GlobalFiducial 
_COUNT 

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
PackagePadUuidChanged 
PositionChanged 
RotationChanged 
ShapeChanged 
WidthChanged 
HeightChanged 
RadiusChanged 
CustomShapeOutlineChanged 
StopMaskConfigChanged 
SolderPasteConfigChanged 
CopperClearanceChanged 
ComponentSideChanged 
FunctionChanged 
HolesEdited 

Constructor & Destructor Documentation

◆ FootprintPad() [1/4]

FootprintPad ( )
delete

◆ FootprintPad() [2/4]

FootprintPad ( const FootprintPad other)
noexcept

◆ FootprintPad() [3/4]

FootprintPad ( const Uuid uuid,
const tl::optional< Uuid > &  pkgPadUuid,
const Point pos,
const Angle rot,
Shape  shape,
const PositiveLength width,
const PositiveLength height,
const UnsignedLimitedRatio radius,
const Path customShapeOutline,
const MaskConfig autoStopMask,
const MaskConfig autoSolderPaste,
const UnsignedLength copperClearance,
ComponentSide  side,
Function  function,
const PadHoleList holes 
)
noexcept

◆ FootprintPad() [4/4]

FootprintPad ( const SExpression node)
explicit

◆ ~FootprintPad()

~FootprintPad ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getPackagePadUuid()

const tl::optional< Uuid > & getPackagePadUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPosition()

const Point & getPosition ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getRotation()

const Angle & getRotation ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getShape()

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

◆ getWidth()

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

◆ getHeight()

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

◆ getRadius()

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

◆ getCustomShapeOutline()

const Path & getCustomShapeOutline ( ) const
inlinenoexcept

◆ getStopMaskConfig()

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

◆ getSolderPasteConfig()

const MaskConfig & getSolderPasteConfig ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCopperClearance()

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

◆ getComponentSide()

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

◆ getFunction()

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

◆ getFunctionIsFiducial()

bool getFunctionIsFiducial ( ) const
noexcept
+ Here is the caller graph for this function:

◆ getFunctionNeedsSoldering()

bool getFunctionNeedsSoldering ( ) const
noexcept

◆ getHoles() [1/2]

const PadHoleList & getHoles ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getHoles() [2/2]

PadHoleList & getHoles ( )
inlinenoexcept

◆ isTht()

bool isTht ( ) 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

◆ getSmtLayer()

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

◆ hasTopCopper()

bool hasTopCopper ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasBottomCopper()

bool hasBottomCopper ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAutoTopStopMask()

bool hasAutoTopStopMask ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAutoBottomStopMask()

bool hasAutoBottomStopMask ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAutoTopSolderPaste()

bool hasAutoTopSolderPaste ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasAutoBottomSolderPaste()

bool hasAutoBottomSolderPaste ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGeometry()

PadGeometry getGeometry ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPreviewGeometries()

QHash< const Layer *, QList< PadGeometry > > buildPreviewGeometries ( ) const
noexcept
+ Here is the call graph for this function:

◆ setPackagePadUuid()

bool setPackagePadUuid ( const tl::optional< Uuid > &  pad)
noexcept

◆ setPosition()

bool setPosition ( const Point pos)
noexcept

◆ setRotation()

bool setRotation ( const Angle rot)
noexcept

◆ setShape()

bool setShape ( Shape  shape)
noexcept

◆ setWidth()

bool setWidth ( const PositiveLength width)
noexcept

◆ setHeight()

bool setHeight ( const PositiveLength height)
noexcept

◆ setRadius()

bool setRadius ( const UnsignedLimitedRatio radius)
noexcept

◆ setCustomShapeOutline()

bool setCustomShapeOutline ( const Path outline)
noexcept

◆ setStopMaskConfig()

bool setStopMaskConfig ( const MaskConfig config)
noexcept

◆ setSolderPasteConfig()

bool setSolderPasteConfig ( const MaskConfig config)
noexcept

◆ setCopperClearance()

bool setCopperClearance ( const UnsignedLength clearance)
noexcept

◆ setComponentSide()

bool setComponentSide ( ComponentSide  side)
noexcept

◆ setFunction()

bool setFunction ( Function  function)
noexcept

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator==()

bool operator== ( const FootprintPad rhs) const
noexcept

◆ operator!=()

bool operator!= ( const FootprintPad rhs) const
inlinenoexcept

◆ operator=()

FootprintPad & operator= ( const FootprintPad rhs)
noexcept

◆ getRecommendedRadius()

UnsignedLimitedRatio getRecommendedRadius ( const PositiveLength width,
const PositiveLength height 
)
staticnoexcept
+ Here is the call graph for this function:

◆ getFunctionDescriptionTr()

QString getFunctionDescriptionTr ( Function  function)
staticnoexcept
+ Here is the caller graph for this function:

◆ holesEdited()

void holesEdited ( const PadHoleList list,
int  index,
const std::shared_ptr< const PadHole > &  hole,
PadHoleList::Event  event 
)
privatenoexcept

Member Data Documentation

◆ onEdited

◆ mUuid

Uuid mUuid
private

◆ mPackagePadUuid

tl::optional<Uuid> mPackagePadUuid
private

The connected package pad

This is the UUID of the package pad where this footprint pad is connected to. It can be tl::nullopt, which means that the footprint pad is electrically not connected (e.g. for mechanical-only pads).

◆ mPosition

Point mPosition
private

◆ mRotation

Angle mRotation
private

◆ mShape

Shape mShape
private

◆ mWidth

PositiveLength mWidth
private

◆ mHeight

PositiveLength mHeight
private

◆ mRadius

UnsignedLimitedRatio mRadius
private

◆ mCustomShapeOutline

Path mCustomShapeOutline
private

Empty if not needed; Implicitly closed.

◆ mStopMaskConfig

MaskConfig mStopMaskConfig
private

◆ mSolderPasteConfig

MaskConfig mSolderPasteConfig
private

◆ mCopperClearance

UnsignedLength mCopperClearance
private

◆ mComponentSide

ComponentSide mComponentSide
private

◆ mFunction

Function mFunction
private

◆ mHoles

PadHoleList mHoles
private

If not empty, it's a THT pad.

◆ mHolesEditedSlot

PadHoleList::OnEditedSlot mHolesEditedSlot
private

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