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

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

#include <footprintpad.h>

+ Inheritance diagram for FootprintPad:
+ Collaboration diagram for FootprintPad:

Public Types

enum class  Event
 
typedef Slot< FootprintPad, EventOnEditedSlot
 
- Public Types inherited from Pad
enum class  Shape
 
enum class  ComponentSide
 
enum class  Function
 

Public Member Functions

 FootprintPad ()=delete
 
 FootprintPad (const FootprintPad &other) noexcept
 
 FootprintPad (const Uuid &uuid, const FootprintPad &other) noexcept
 
 FootprintPad (const Uuid &uuid, const std::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
 
PadHoleListgetHoles () noexcept
 
const std::optional< Uuid > & getPackagePadUuid () const 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
 
bool setPackagePadUuid (const std::optional< Uuid > &pad) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node.
 
bool operator== (const FootprintPad &rhs) const noexcept
 
bool operator!= (const FootprintPad &rhs) const noexcept
 
FootprintPadoperator= (const FootprintPad &rhs) noexcept
 
const PadHoleListgetHoles () const noexcept
 
- Public Member Functions inherited from Pad
 Pad ()=delete
 
 Pad (const Pad &other) noexcept
 
 Pad (const Uuid &uuid, const Pad &other) noexcept
 
 Pad (const Uuid &uuid, 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
 
 Pad (const SExpression &node)
 
virtual ~Pad () noexcept
 
const UuidgetUuid () 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
 
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 operator== (const Pad &rhs) const noexcept
 
bool operator!= (const Pad &rhs) const 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

std::optional< UuidmPackagePadUuid
 
PadHoleList::OnEditedSlot mHolesEditedSlot
 

Additional Inherited Members

- Static Public Member Functions inherited from Pad
static UnsignedLimitedRatio getRecommendedRadius (const PositiveLength &width, const PositiveLength &height) noexcept
 
static QString getFunctionDescriptionTr (Function function) noexcept
 
- Protected Attributes inherited from Pad
Uuid mUuid
 
Point mPosition
 
Angle mRotation
 
Shape mShape
 
PositiveLength mWidth
 
PositiveLength mHeight
 
UnsignedLimitedRatio mRadius
 
Path mCustomShapeOutline
 Empty if not needed; Implicitly closed.
 
MaskConfig mStopMaskConfig
 
MaskConfig mSolderPasteConfig
 
UnsignedLength mCopperClearance
 
ComponentSide mComponentSide
 
Function mFunction
 
PadHoleList mHoles
 If not empty, it's a THT pad.
 

Detailed Description

The FootprintPad class represents a pad of 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 
PackagePadUuidChanged 

Constructor & Destructor Documentation

◆ FootprintPad() [1/5]

FootprintPad ( )
delete

◆ FootprintPad() [2/5]

FootprintPad ( const FootprintPad other)
noexcept

◆ FootprintPad() [3/5]

FootprintPad ( const Uuid uuid,
const FootprintPad other 
)
noexcept

◆ FootprintPad() [4/5]

FootprintPad ( const Uuid uuid,
const std::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() [5/5]

FootprintPad ( const SExpression node)
explicit

◆ ~FootprintPad()

~FootprintPad ( )
noexcept

Member Function Documentation

◆ getHoles() [1/2]

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

◆ getPackagePadUuid()

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

◆ 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

◆ setPackagePadUuid()

bool setPackagePadUuid ( const std::optional< Uuid > &  pad)
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

◆ holesEdited()

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

◆ getHoles() [2/2]

const PadHoleList & getHoles ( ) const
inlinenoexcept

Member Data Documentation

◆ onEdited

◆ mPackagePadUuid

std::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 std::nullopt, which means that the footprint pad is electrically not connected (e.g. for mechanical-only pads).

◆ mHolesEditedSlot

PadHoleList::OnEditedSlot mHolesEditedSlot
private

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