LibrePCB Developers Documentation
Part Class Referencefinal

The Part class. More...

#include <part.h>

+ Collaboration diagram for Part:

Public Types

enum class  Event
 
typedef Slot< Part, EventOnEditedSlot
 

Public Member Functions

 Part ()=delete
 
 Part (const Part &other) noexcept
 
 Part (const SExpression &node)
 
 Part (const SimpleString &mpn, const SimpleString &manufacturer, const AttributeList &attributes) noexcept
 
 ~Part () noexcept
 
bool isEmpty () const noexcept
 
const SimpleStringgetMpn () const noexcept
 
const SimpleStringgetManufacturer () const noexcept
 
AttributeListgetAttributes () noexcept
 
const AttributeListgetAttributes () const noexcept
 
QStringList getAttributeValuesTr () const noexcept
 
QStringList getAttributeKeyValuesTr () const noexcept
 
void setMpn (const SimpleString &value) noexcept
 
void setManufacturer (const SimpleString &value) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const Part &rhs) const noexcept
 
bool operator!= (const Part &rhs) const noexcept
 
Partoperator= (const Part &rhs) noexcept
 

Public Attributes

Signal< Part, EventonEdited
 

Private Member Functions

void attributeListEdited (const AttributeList &list, int index, const std::shared_ptr< const Attribute > &attribute, AttributeList::Event event) noexcept
 

Private Attributes

SimpleString mMpn
 
SimpleString mManufacturer
 
AttributeList mAttributes
 
AttributeList::OnEditedSlot mOnAttributesEditedSlot
 

Detailed Description

The Part class.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
MpnChanged 
ManufacturerChanged 
AttributesEdited 

Constructor & Destructor Documentation

◆ Part() [1/4]

Part ( )
delete

◆ Part() [2/4]

Part ( const Part other)
noexcept

◆ Part() [3/4]

Part ( const SExpression node)
explicit

◆ Part() [4/4]

Part ( const SimpleString mpn,
const SimpleString manufacturer,
const AttributeList attributes 
)
noexcept

◆ ~Part()

~Part ( )
noexcept

Member Function Documentation

◆ isEmpty()

bool isEmpty ( ) const
noexcept
+ Here is the call graph for this function:

◆ getMpn()

const SimpleString & getMpn ( ) const
inlinenoexcept

◆ getManufacturer()

const SimpleString & getManufacturer ( ) const
inlinenoexcept

◆ getAttributes() [1/2]

AttributeList & getAttributes ( )
inlinenoexcept

◆ getAttributes() [2/2]

const AttributeList & getAttributes ( ) const
inlinenoexcept

◆ getAttributeValuesTr()

QStringList getAttributeValuesTr ( ) const
noexcept

◆ getAttributeKeyValuesTr()

QStringList getAttributeKeyValuesTr ( ) const
noexcept

◆ setMpn()

void setMpn ( const SimpleString value)
noexcept
+ Here is the caller graph for this function:

◆ setManufacturer()

void setManufacturer ( const SimpleString value)
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 Part rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Part rhs) const
inlinenoexcept

◆ operator=()

Part & operator= ( const Part rhs)
noexcept

◆ attributeListEdited()

void attributeListEdited ( const AttributeList list,
int  index,
const std::shared_ptr< const Attribute > &  attribute,
AttributeList::Event  event 
)
privatenoexcept

Member Data Documentation

◆ onEdited

Signal<Part, Event> onEdited

◆ mMpn

SimpleString mMpn
private

◆ mManufacturer

SimpleString mManufacturer
private

◆ mAttributes

AttributeList mAttributes
private

◆ mOnAttributesEditedSlot

AttributeList::OnEditedSlot mOnAttributesEditedSlot
private

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