LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BI_Footprint Class Referencefinal

The BI_Footprint class. More...

#include <bi_footprint.h>

+ Inheritance diagram for BI_Footprint:
+ Collaboration diagram for BI_Footprint:

Signals

void attributesChanged () override
 This signal is emited when the value of attributes has changed. More...
 
- Signals inherited from AttributeProvider
virtual void attributesChanged ()=0
 This signal is emited when the value of attributes has changed. More...
 

Public Member Functions

 BI_Footprint ()=delete
 
 BI_Footprint (const BI_Footprint &other)=delete
 
 BI_Footprint (BI_Device &device, const BI_Footprint &other)
 
 BI_Footprint (BI_Device &device, const SExpression &node)
 
 BI_Footprint (BI_Device &device)
 
 ~BI_Footprint () noexcept
 
const UuidgetComponentInstanceUuid () const noexcept
 
BI_DevicegetDeviceInstance () const noexcept
 
BI_FootprintPadgetPad (const Uuid &padUuid) const noexcept
 
const QMap< Uuid,
BI_FootprintPad * > & 
getPads () const noexcept
 
const library::FootprintgetLibFootprint () const noexcept
 
const AnglegetRotation () const noexcept
 
bool isSelectable () const noexceptoverride
 
bool isUsed () const noexcept
 
BGI_FootprintgetGraphicsItem () noexcept
 
const QList< BI_StrokeText * > & getStrokeTexts () const noexcept
 
void addStrokeText (BI_StrokeText &text)
 
void removeStrokeText (BI_StrokeText &text)
 
void resetStrokeTextsToLibraryFootprint ()
 
void addToBoard () override
 
void removeFromBoard () override
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
Point mapToScene (const Point &relativePos) const noexcept
 
QVector< const
AttributeProvider * > 
getAttributeProviderParents () const noexceptoverride
 Get all parent attribute providers (fallback if attribute not found) More...
 
Type_t getType () const noexceptoverride
 
const PointgetPosition () const noexceptoverride
 
bool getIsMirrored () const noexceptoverride
 
QPainterPath getGrabAreaScenePx () const noexceptoverride
 
void setSelected (bool selected) noexceptoverride
 
BI_Footprintoperator= (const BI_Footprint &rhs)=delete
 
- Public Member Functions inherited from BI_Base
 BI_Base ()=delete
 
 BI_Base (const BI_Base &other)=delete
 
 BI_Base (Board &board) noexcept
 
virtual ~BI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
BoardgetBoard () const noexcept
 
virtual bool isAddedToBoard () const noexcept
 
virtual bool isSelected () const noexcept
 
BI_Baseoperator= (const BI_Base &rhs)=delete
 
- 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 Member Functions inherited from AttributeProvider
 AttributeProvider () noexcept
 
 AttributeProvider (const AttributeProvider &other)=delete
 
AttributeProvideroperator= (const AttributeProvider &rhs)=delete
 
virtual ~AttributeProvider () noexcept
 
QString getAttributeValue (const QString &key) const noexcept
 Get the value of an attribute which can be used in texts (like "{{NAME}}") More...
 
virtual QString getUserDefinedAttributeValue (const QString &key) const noexcept
 Get the value of a user defined attribute (if available) More...
 
virtual QString getBuiltInAttributeValue (const QString &key) const noexcept
 Get the value of a built-in attribute (if available) More...
 

Private Slots

void deviceInstanceAttributesChanged ()
 
void deviceInstanceMoved (const Point &pos)
 
void deviceInstanceRotated (const Angle &rot)
 
void deviceInstanceMirrored (bool mirrored)
 

Private Member Functions

void init ()
 
void updateGraphicsItemTransform () noexcept
 

Private Attributes

BI_DevicemDevice
 
QScopedPointer< BGI_FootprintmGraphicsItem
 
QMap< Uuid, BI_FootprintPad * > mPads
 key: footprint pad UUID More...
 
QList< BI_StrokeText * > mStrokeTexts
 

Additional Inherited Members

- Public Types inherited from BI_Base
enum  Type_t
 
- 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)
 
- Protected Member Functions inherited from BI_Base
void addToBoard (QGraphicsItem *item) noexcept
 
void removeFromBoard (QGraphicsItem *item) noexcept
 
- Protected Attributes inherited from BI_Base
BoardmBoard
 

Detailed Description

The BI_Footprint class.

Author
ubruhin
Date
2015-05-24

Constructor & Destructor Documentation

BI_Footprint ( )
delete
BI_Footprint ( const BI_Footprint other)
delete
BI_Footprint ( BI_Device device,
const BI_Footprint other 
)

+ Here is the call graph for this function:

BI_Footprint ( BI_Device device,
const SExpression node 
)

+ Here is the call graph for this function:

BI_Footprint ( BI_Device device)
explicit

+ Here is the call graph for this function:

~BI_Footprint ( )
noexcept

Member Function Documentation

const Uuid & getComponentInstanceUuid ( ) const
noexcept

+ Here is the call graph for this function:

BI_Device& getDeviceInstance ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

BI_FootprintPad* getPad ( const Uuid padUuid) const
inlinenoexcept

+ Here is the caller graph for this function:

const QMap<Uuid, BI_FootprintPad*>& getPads ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const library::Footprint & getLibFootprint ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Angle & getRotation ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isSelectable ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the caller graph for this function:

bool isUsed ( ) const
noexcept

+ Here is the call graph for this function:

BGI_Footprint& getGraphicsItem ( )
inlinenoexcept
const QList<BI_StrokeText*>& getStrokeTexts ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void addStrokeText ( BI_StrokeText text)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeStrokeText ( BI_StrokeText text)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void resetStrokeTextsToLibraryFootprint ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addToBoard ( )
overridevirtual

Implements BI_Base.

+ Here is the call graph for this function:

void removeFromBoard ( )
overridevirtual

Implements BI_Base.

+ Here is the call 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:

Point mapToScene ( const Point relativePos) const
noexcept

+ Here is the caller graph for this function:

QVector< const AttributeProvider * > getAttributeProviderParents ( ) const
overridevirtualnoexcept

Get all parent attribute providers (fallback if attribute not found)

Returns
All parent attribute provider objects (empty and nullptr are allowed)

Reimplemented from AttributeProvider.

Type_t getType ( ) const
inlineoverridevirtualnoexcept

Implements BI_Base.

const Point & getPosition ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool getIsMirrored ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QPainterPath getGrabAreaScenePx ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the caller graph for this function:

void setSelected ( bool  selected)
overridevirtualnoexcept

Reimplemented from BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BI_Footprint& operator= ( const BI_Footprint rhs)
delete
void deviceInstanceAttributesChanged ( )
privateslot

+ Here is the caller graph for this function:

void deviceInstanceMoved ( const Point pos)
privateslot

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void deviceInstanceRotated ( const Angle rot)
privateslot

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void deviceInstanceMirrored ( bool  mirrored)
privateslot

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void attributesChanged ( )
overridesignal

This signal is emited when the value of attributes has changed.

All derived classes must emit this signal when some attributes have changed their values (only attributes which can be fetched with getAttributeValue(), inclusive all attributes from all "parent" classes).

+ Here is the caller graph for this function:

void init ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateGraphicsItemTransform ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

BI_Device& mDevice
private
QScopedPointer<BGI_Footprint> mGraphicsItem
private
QMap<Uuid, BI_FootprintPad*> mPads
private

key: footprint pad UUID

QList<BI_StrokeText*> mStrokeTexts
private

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