LibrePCB Developers Documentation
Footprint Class Referencefinal

The Footprint class represents one footprint variant of a package. More...

#include <footprint.h>

+ Inheritance diagram for Footprint:
+ Collaboration diagram for Footprint:

Public Types

enum  Event
 
typedef Slot< Footprint, EventOnEditedSlot
 

Public Member Functions

 Footprint ()=delete
 
 Footprint (const Footprint &other) noexcept
 
 Footprint (const Uuid &uuid, const ElementName &name_en_US, const QString &description_en_US)
 
 Footprint (const SExpression &node)
 
 ~Footprint () noexcept
 
const UuidgetUuid () const noexcept
 
LocalizedNameMapgetNames () noexcept
 
const LocalizedNameMapgetNames () const noexcept
 
LocalizedDescriptionMapgetDescriptions () noexcept
 
const LocalizedDescriptionMapgetDescriptions () const noexcept
 
const FootprintPadListgetPads () const noexcept
 
FootprintPadListgetPads () noexcept
 
const PolygonListgetPolygons () const noexcept
 
PolygonListgetPolygons () noexcept
 
const CircleListgetCircles () const noexcept
 
CircleListgetCircles () noexcept
 
const StrokeTextListgetStrokeTexts () const noexcept
 
StrokeTextListgetStrokeTexts () noexcept
 
const HoleListgetHoles () const noexcept
 
HoleListgetHoles () noexcept
 
void setStrokeFontForAllTexts (const StrokeFont *font) noexcept
 
void registerGraphicsItem (FootprintGraphicsItem &item) noexcept
 
void unregisterGraphicsItem (FootprintGraphicsItem &item) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Footprint &rhs) const noexcept
 
bool operator!= (const Footprint &rhs) const noexcept
 
Footprintoperator= (const Footprint &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...
 

Public Attributes

Signal< Footprint, EventonEdited
 

Private Member Functions

void namesEdited (const LocalizedNameMap &names, const QString &key, LocalizedNameMap::Event event) noexcept
 
void descriptionsEdited (const LocalizedDescriptionMap &names, const QString &key, LocalizedDescriptionMap::Event event) noexcept
 
void padsEdited (const FootprintPadList &list, int index, const std::shared_ptr< const FootprintPad > &pad, FootprintPadList::Event event) noexcept
 
void polygonsEdited (const PolygonList &list, int index, const std::shared_ptr< const Polygon > &polygon, PolygonList::Event event) noexcept
 
void circlesEdited (const CircleList &list, int index, const std::shared_ptr< const Circle > &circle, CircleList::Event event) noexcept
 
void strokeTextsEdited (const StrokeTextList &list, int index, const std::shared_ptr< const StrokeText > &text, StrokeTextList::Event event) noexcept
 
void holesEdited (const HoleList &list, int index, const std::shared_ptr< const Hole > &hole, HoleList::Event event) noexcept
 

Private Attributes

Uuid mUuid
 
LocalizedNameMap mNames
 
LocalizedDescriptionMap mDescriptions
 
FootprintPadList mPads
 
PolygonList mPolygons
 
CircleList mCircles
 
StrokeTextList mStrokeTexts
 
HoleList mHoles
 
const StrokeFontmStrokeFont
 
FootprintGraphicsItemmRegisteredGraphicsItem
 
LocalizedNameMap::OnEditedSlot mNamesEditedSlot
 
LocalizedDescriptionMap::OnEditedSlot mDescriptionsEditedSlot
 
FootprintPadList::OnEditedSlot mPadsEditedSlot
 
PolygonList::OnEditedSlot mPolygonsEditedSlot
 
CircleList::OnEditedSlot mCirclesEditedSlot
 
StrokeTextList::OnEditedSlot mStrokeTextsEditedSlot
 
HoleList::OnEditedSlot mHolesEditedSlot
 

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 Footprint class represents one footprint variant of a package.

Following information is considered as the "interface" of a footprint and must therefore never be changed:

  • UUID
  • Footprint pads (neither adding nor removing pads is allowed)
    • UUID

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
NamesEdited 
DescriptionsEdited 
PadsEdited 
PolygonsEdited 
CirclesEdited 
StrokeTextsEdited 
HolesEdited 

Constructor & Destructor Documentation

◆ Footprint() [1/4]

Footprint ( )
delete

◆ Footprint() [2/4]

Footprint ( const Footprint other)
noexcept

◆ Footprint() [3/4]

Footprint ( const Uuid uuid,
const ElementName name_en_US,
const QString &  description_en_US 
)

◆ Footprint() [4/4]

Footprint ( const SExpression node)
explicit

◆ ~Footprint()

~Footprint ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getNames() [1/2]

LocalizedNameMap& getNames ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ getNames() [2/2]

const LocalizedNameMap& getNames ( ) const
inlinenoexcept

◆ getDescriptions() [1/2]

LocalizedDescriptionMap& getDescriptions ( )
inlinenoexcept

◆ getDescriptions() [2/2]

const LocalizedDescriptionMap& getDescriptions ( ) const
inlinenoexcept

◆ getPads() [1/2]

const FootprintPadList& getPads ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPads() [2/2]

FootprintPadList& getPads ( )
inlinenoexcept

◆ getPolygons() [1/2]

const PolygonList& getPolygons ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPolygons() [2/2]

PolygonList& getPolygons ( )
inlinenoexcept

◆ getCircles() [1/2]

const CircleList& getCircles ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCircles() [2/2]

CircleList& getCircles ( )
inlinenoexcept

◆ getStrokeTexts() [1/2]

const StrokeTextList& getStrokeTexts ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getStrokeTexts() [2/2]

StrokeTextList& getStrokeTexts ( )
inlinenoexcept

◆ getHoles() [1/2]

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

◆ getHoles() [2/2]

HoleList& getHoles ( )
inlinenoexcept
+ Here is the call graph for this function:

◆ setStrokeFontForAllTexts()

void setStrokeFontForAllTexts ( const StrokeFont font)
noexcept
+ Here is the caller graph for this function:

◆ registerGraphicsItem()

void registerGraphicsItem ( FootprintGraphicsItem item)
noexcept
+ Here is the caller graph for this function:

◆ unregisterGraphicsItem()

void unregisterGraphicsItem ( FootprintGraphicsItem item)
noexcept
+ Here is the caller graph for this function:

◆ serialize()

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:
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const Footprint rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

bool operator!= ( const Footprint rhs) const
inlinenoexcept
+ Here is the call graph for this function:

◆ operator=()

Footprint & operator= ( const Footprint rhs)
noexcept
+ Here is the caller graph for this function:

◆ namesEdited()

void namesEdited ( const LocalizedNameMap names,
const QString &  key,
LocalizedNameMap::Event  event 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ descriptionsEdited()

void descriptionsEdited ( const LocalizedDescriptionMap names,
const QString &  key,
LocalizedDescriptionMap::Event  event 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ padsEdited()

void padsEdited ( const FootprintPadList list,
int  index,
const std::shared_ptr< const FootprintPad > &  pad,
FootprintPadList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ polygonsEdited()

void polygonsEdited ( const PolygonList list,
int  index,
const std::shared_ptr< const Polygon > &  polygon,
PolygonList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ circlesEdited()

void circlesEdited ( const CircleList list,
int  index,
const std::shared_ptr< const Circle > &  circle,
CircleList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ strokeTextsEdited()

void strokeTextsEdited ( const StrokeTextList list,
int  index,
const std::shared_ptr< const StrokeText > &  text,
StrokeTextList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ holesEdited()

void holesEdited ( const HoleList list,
int  index,
const std::shared_ptr< const Hole > &  hole,
HoleList::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ onEdited

Signal<Footprint, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mNames

LocalizedNameMap mNames
private

◆ mDescriptions

LocalizedDescriptionMap mDescriptions
private

◆ mPads

FootprintPadList mPads
private

◆ mPolygons

PolygonList mPolygons
private

◆ mCircles

CircleList mCircles
private

◆ mStrokeTexts

StrokeTextList mStrokeTexts
private

◆ mHoles

HoleList mHoles
private

◆ mStrokeFont

const StrokeFont* mStrokeFont
private

◆ mRegisteredGraphicsItem

FootprintGraphicsItem* mRegisteredGraphicsItem
private

◆ mNamesEditedSlot

LocalizedNameMap::OnEditedSlot mNamesEditedSlot
private

◆ mDescriptionsEditedSlot

LocalizedDescriptionMap::OnEditedSlot mDescriptionsEditedSlot
private

◆ mPadsEditedSlot

FootprintPadList::OnEditedSlot mPadsEditedSlot
private

◆ mPolygonsEditedSlot

PolygonList::OnEditedSlot mPolygonsEditedSlot
private

◆ mCirclesEditedSlot

CircleList::OnEditedSlot mCirclesEditedSlot
private

◆ mStrokeTextsEditedSlot

StrokeTextList::OnEditedSlot mStrokeTextsEditedSlot
private

◆ mHolesEditedSlot

HoleList::OnEditedSlot mHolesEditedSlot
private

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