LibrePCB Developers Documentation
Footprint Class Referencefinal

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

#include <footprint.h>

+ Collaboration diagram for Footprint:

Public Types

enum class  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 Point3DgetModelPosition () const noexcept
 
const Angle3DgetModelRotation () const noexcept
 
const QSet< Uuid > & getModels () 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 ZoneListgetZones () const noexcept
 
ZoneListgetZones () noexcept
 
const HoleListgetHoles () const noexcept
 
HoleListgetHoles () noexcept
 
bool setModelPosition (const Point3D &position) noexcept
 
bool setModelRotation (const Angle3D &rotation) noexcept
 
bool setModels (const QSet< Uuid > &models) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const Footprint &rhs) const noexcept
 
bool operator!= (const Footprint &rhs) const noexcept
 
Footprintoperator= (const Footprint &rhs) noexcept
 

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 zonesEdited (const ZoneList &list, int index, const std::shared_ptr< const Zone > &zone, ZoneList::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
 
Point3D mModelPosition
 
Angle3D mModelRotation
 
QSet< UuidmModels
 
FootprintPadList mPads
 
PolygonList mPolygons
 
CircleList mCircles
 
StrokeTextList mStrokeTexts
 
ZoneList mZones
 
HoleList mHoles
 
LocalizedNameMap::OnEditedSlot mNamesEditedSlot
 
LocalizedDescriptionMap::OnEditedSlot mDescriptionsEditedSlot
 
FootprintPadList::OnEditedSlot mPadsEditedSlot
 
PolygonList::OnEditedSlot mPolygonsEditedSlot
 
CircleList::OnEditedSlot mCirclesEditedSlot
 
StrokeTextList::OnEditedSlot mStrokeTextsEditedSlot
 
ZoneList::OnEditedSlot mZonesEditedSlot
 
HoleList::OnEditedSlot mHolesEditedSlot
 

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 class Event
strong
Enumerator
UuidChanged 
NamesEdited 
DescriptionsEdited 
ModelPositionChanged 
ModelRotationChanged 
ModelsChanged 
PadsEdited 
PolygonsEdited 
CirclesEdited 
StrokeTextsEdited 
HolesEdited 
ZonesEdited 

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

◆ ~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

◆ getModelPosition()

const Point3D & getModelPosition ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getModelRotation()

const Angle3D & getModelRotation ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getModels()

const QSet< Uuid > & getModels ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ 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

◆ getZones() [1/2]

const ZoneList & getZones ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getZones() [2/2]

ZoneList & getZones ( )
inlinenoexcept

◆ getHoles() [1/2]

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

◆ getHoles() [2/2]

HoleList & getHoles ( )
inlinenoexcept

◆ setModelPosition()

bool setModelPosition ( const Point3D position)
noexcept
+ Here is the caller graph for this function:

◆ setModelRotation()

bool setModelRotation ( const Angle3D rotation)
noexcept
+ Here is the caller graph for this function:

◆ setModels()

bool setModels ( const QSet< Uuid > &  models)
noexcept
+ Here is the caller graph for this function:

◆ 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 Footprint rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Footprint rhs) const
inlinenoexcept

◆ operator=()

Footprint & operator= ( const Footprint rhs)
noexcept

◆ namesEdited()

void namesEdited ( const LocalizedNameMap names,
const QString &  key,
LocalizedNameMap::Event  event 
)
privatenoexcept

◆ descriptionsEdited()

void descriptionsEdited ( const LocalizedDescriptionMap names,
const QString &  key,
LocalizedDescriptionMap::Event  event 
)
privatenoexcept

◆ padsEdited()

void padsEdited ( const FootprintPadList list,
int  index,
const std::shared_ptr< const FootprintPad > &  pad,
FootprintPadList::Event  event 
)
privatenoexcept

◆ polygonsEdited()

void polygonsEdited ( const PolygonList list,
int  index,
const std::shared_ptr< const Polygon > &  polygon,
PolygonList::Event  event 
)
privatenoexcept

◆ circlesEdited()

void circlesEdited ( const CircleList list,
int  index,
const std::shared_ptr< const Circle > &  circle,
CircleList::Event  event 
)
privatenoexcept

◆ strokeTextsEdited()

void strokeTextsEdited ( const StrokeTextList list,
int  index,
const std::shared_ptr< const StrokeText > &  text,
StrokeTextList::Event  event 
)
privatenoexcept

◆ zonesEdited()

void zonesEdited ( const ZoneList list,
int  index,
const std::shared_ptr< const Zone > &  zone,
ZoneList::Event  event 
)
privatenoexcept

◆ holesEdited()

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

Member Data Documentation

◆ onEdited

Signal<Footprint, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mNames

LocalizedNameMap mNames
private

◆ mDescriptions

LocalizedDescriptionMap mDescriptions
private

◆ mModelPosition

Point3D mModelPosition
private

◆ mModelRotation

Angle3D mModelRotation
private

◆ mModels

QSet<Uuid> mModels
private

◆ mPads

FootprintPadList mPads
private

◆ mPolygons

PolygonList mPolygons
private

◆ mCircles

CircleList mCircles
private

◆ mStrokeTexts

StrokeTextList mStrokeTexts
private

◆ mZones

ZoneList mZones
private

◆ mHoles

HoleList mHoles
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

◆ mZonesEditedSlot

ZoneList::OnEditedSlot mZonesEditedSlot
private

◆ mHolesEditedSlot

HoleList::OnEditedSlot mHolesEditedSlot
private

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