20#ifndef LIBREPCB_CORE_PART_H
21#define LIBREPCB_CORE_PART_H
26#include "../../attribute/attribute.h"
27#include "../../serialization/serializableobjectlist.h"
28#include "../../types/simplestring.h"
47 Q_DECLARE_TR_FUNCTIONS(
Part)
90 bool operator==(const
Part& rhs) const noexcept;
91 bool operator!=(const
Part& rhs) const noexcept {
return !(*
this == rhs); }
96 const std::shared_ptr<const Attribute>& attribute,
113 static constexpr const char*
tagname =
"part";
124Q_DECLARE_METATYPE(std::shared_ptr<librepcb::Part>)
The Part class.
Definition part.h:46
void setManufacturer(const SimpleString &value) noexcept
Definition part.cpp:114
~Part() noexcept
Definition part.cpp:69
SimpleString mManufacturer
Definition part.h:101
Part & operator=(const Part &rhs) noexcept
Definition part.cpp:146
const SimpleString & getManufacturer() const noexcept
Definition part.h:70
AttributeList::OnEditedSlot mOnAttributesEditedSlot
Definition part.h:105
void attributeListEdited(const AttributeList &list, int index, const std::shared_ptr< const Attribute > &attribute, AttributeList::Event event) noexcept
Definition part.cpp:157
Event
Definition part.h:51
AttributeList & getAttributes() noexcept
Definition part.h:71
const SimpleString & getMpn() const noexcept
Definition part.h:69
const AttributeList & getAttributes() const noexcept
Definition part.h:72
Signal< Part, Event > onEdited
Definition part.h:56
SimpleString mMpn
Definition part.h:100
AttributeList mAttributes
Definition part.h:102
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition part.cpp:127
Slot< Part, Event > OnEditedSlot
Definition part.h:57
bool isEmpty() const noexcept
Definition part.cpp:76
void setMpn(const SimpleString &value) noexcept
Definition part.cpp:105
QStringList getAttributeValuesTr() const noexcept
Definition part.cpp:80
QStringList getAttributeKeyValuesTr() const noexcept
Definition part.cpp:91
The SExpression class.
Definition sexpression.h:69
Slot< SerializableObjectList< Attribute, AttributeListNameProvider, OnEditedArgs... >, int, const std::shared_ptr< const Attribute > &, Event > OnEditedSlot
Definition serializableobjectlist.h:136
Event
Definition serializableobjectlist.h:126
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The Slot class is used to receive signals from non-QObject derived classes.
Definition signalslot.h:170
Definition occmodel.cpp:76
type_safe::constrained_type< QString, SimpleStringConstraint, SimpleStringVerifier > SimpleString
Definition simplestring.h:79
static constexpr const char * tagname
Definition part.h:113