LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  Shape
 
enum  BoardSide
 

Public Member Functions

 FootprintPad ()=delete
 
 FootprintPad (const FootprintPad &other) noexcept
 
 FootprintPad (const Uuid &padUuid, const Point &pos, const Angle &rot, Shape shape, const PositiveLength &width, const PositiveLength &height, const UnsignedLength &drillDiameter, BoardSide side) noexcept
 
 FootprintPad (const SExpression &node)
 
 ~FootprintPad () noexcept
 
const UuidgetUuid () const noexcept
 
const UuidgetPackagePadUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
Shape getShape () const noexcept
 
const PositiveLengthgetWidth () const noexcept
 
const PositiveLengthgetHeight () const noexcept
 
const UnsignedLengthgetDrillDiameter () const noexcept
 
BoardSide getBoardSide () const noexcept
 
QString getLayerName () const noexcept
 
bool isOnLayer (const QString &name) const noexcept
 
Path getOutline (const Length &expansion=Length(0)) const noexcept
 
QPainterPath toQPainterPathPx (const Length &expansion=Length(0)) const noexcept
 
void setPackagePadUuid (const Uuid &pad) noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void setShape (Shape shape) noexcept
 
void setWidth (const PositiveLength &width) noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
void setDrillDiameter (const UnsignedLength &diameter) noexcept
 
void setBoardSide (BoardSide side) noexcept
 
void registerGraphicsItem (FootprintPadGraphicsItem &item) noexcept
 
void unregisterGraphicsItem (FootprintPadGraphicsItem &item) noexcept
 
virtual void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const FootprintPad &rhs) const noexcept
 
bool operator!= (const FootprintPad &rhs) const noexcept
 
FootprintPadoperator= (const FootprintPad &rhs) noexcept
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Protected Attributes

Uuid mPackagePadUuid
 
Point mPosition
 
Angle mRotation
 
Shape mShape
 
PositiveLength mWidth
 
PositiveLength mHeight
 
UnsignedLength mDrillDiameter
 
BoardSide mBoardSide
 
FootprintPadGraphicsItemmRegisteredGraphicsItem
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The FootprintPad class represents a pad of a footprint.

Member Enumeration Documentation

enum Shape
strong
Enumerator
ROUND 
RECT 
OCTAGON 
enum BoardSide
strong
Enumerator
TOP 
BOTTOM 
THT 

Constructor & Destructor Documentation

FootprintPad ( )
delete
FootprintPad ( const FootprintPad other)
noexcept
FootprintPad ( const Uuid padUuid,
const Point pos,
const Angle rot,
Shape  shape,
const PositiveLength width,
const PositiveLength height,
const UnsignedLength drillDiameter,
BoardSide  side 
)
noexcept
FootprintPad ( const SExpression node)
explicit

+ Here is the call graph for this function:

~FootprintPad ( )
noexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the call graph for this function:

const Uuid& getPackagePadUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Point& getPosition ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Angle& getRotation ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

Shape getShape ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const PositiveLength& getWidth ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const PositiveLength& getHeight ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const UnsignedLength& getDrillDiameter ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

BoardSide getBoardSide ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

QString getLayerName ( ) const
noexcept

+ Here is the caller graph for this function:

bool isOnLayer ( const QString &  name) const
noexcept

+ Here is the call graph for this function:

Path getOutline ( const Length expansion = Length(0)) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QPainterPath toQPainterPathPx ( const Length expansion = Length(0)) const
noexcept

+ Here is the caller graph for this function:

void setPackagePadUuid ( const Uuid pad)
noexcept

+ Here is the caller graph for this function:

void setPosition ( const Point pos)
noexcept

+ Here is the caller graph for this function:

void setRotation ( const Angle rot)
noexcept

+ Here is the caller graph for this function:

void setShape ( Shape  shape)
noexcept

+ Here is the caller graph for this function:

void setWidth ( const PositiveLength width)
noexcept

+ Here is the caller graph for this function:

void setHeight ( const PositiveLength height)
noexcept

+ Here is the caller graph for this function:

void setDrillDiameter ( const UnsignedLength diameter)
noexcept

+ Here is the caller graph for this function:

void setBoardSide ( BoardSide  side)
noexcept

+ Here is the caller graph for this function:

void registerGraphicsItem ( FootprintPadGraphicsItem item)
noexcept
void unregisterGraphicsItem ( FootprintPadGraphicsItem item)
noexcept

+ Here is the caller graph for this function:

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

bool operator== ( const FootprintPad rhs) const
noexcept
bool operator!= ( const FootprintPad rhs) const
inlinenoexcept
FootprintPad & operator= ( const FootprintPad rhs)
noexcept

Member Data Documentation

Uuid mPackagePadUuid
protected
Point mPosition
protected
Angle mRotation
protected
Shape mShape
protected
PositiveLength mWidth
protected
PositiveLength mHeight
protected
UnsignedLength mDrillDiameter
protected
BoardSide mBoardSide
protected
FootprintPadGraphicsItem* mRegisteredGraphicsItem
protected

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