LibrePCB Developers Documentation
ComponentAssemblyOption Class Referencefinal

The ComponentAssemblyOption class. More...

#include <componentassemblyoption.h>

+ Collaboration diagram for ComponentAssemblyOption:

Public Types

enum class  Event
 
typedef Slot< ComponentAssemblyOption, EventOnEditedSlot
 

Public Member Functions

 ComponentAssemblyOption ()=delete
 
 ComponentAssemblyOption (const ComponentAssemblyOption &other) noexcept
 
 ComponentAssemblyOption (const SExpression &node)
 
 ComponentAssemblyOption (const Uuid &device, const AttributeList &attributes, const QSet< Uuid > &assemblyVariants, const PartList &parts)
 
 ~ComponentAssemblyOption () noexcept
 
const UuidgetDevice () const noexcept
 
const AttributeListgetAttributes () const noexcept
 
const QSet< Uuid > & getAssemblyVariants () const noexcept
 
PartListgetParts () noexcept
 
const PartListgetParts () const noexcept
 
void setDevice (const Uuid &value) noexcept
 
void setAttributes (const AttributeList &value) noexcept
 
void setAssemblyVariants (const QSet< Uuid > &assemblyVariants) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
ComponentAssemblyOptionoperator= (const ComponentAssemblyOption &rhs)=delete
 
bool operator== (const ComponentAssemblyOption &rhs) const noexcept
 
bool operator!= (const ComponentAssemblyOption &rhs) const noexcept
 

Public Attributes

Signal< ComponentAssemblyOption, EventonEdited
 

Private Member Functions

void partListEdited (const PartList &list, int index, const std::shared_ptr< const Part > &obj, PartList::Event event) noexcept
 

Private Attributes

Uuid mDevice
 Compatible device. More...
 
AttributeList mAttributes
 Default attributes to copy when adding new parts. More...
 
QSet< UuidmAssemblyVariants
 UUIDs of librepcb::AssemblyVariant this option is available for. More...
 
PartList mParts
 Parts available for assembly. More...
 
PartList::OnEditedSlot mOnPartsEditedSlot
 

Detailed Description

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
DeviceChanged 
AttributesChanged 
AssemblyVariantsChanged 
PartsEdited 

Constructor & Destructor Documentation

◆ ComponentAssemblyOption() [1/4]

◆ ComponentAssemblyOption() [2/4]

ComponentAssemblyOption ( const ComponentAssemblyOption other)
noexcept

◆ ComponentAssemblyOption() [3/4]

ComponentAssemblyOption ( const SExpression node)
explicit
+ Here is the call graph for this function:

◆ ComponentAssemblyOption() [4/4]

ComponentAssemblyOption ( const Uuid device,
const AttributeList attributes,
const QSet< Uuid > &  assemblyVariants,
const PartList parts 
)

◆ ~ComponentAssemblyOption()

~ComponentAssemblyOption ( )
noexcept

Member Function Documentation

◆ getDevice()

const Uuid & getDevice ( ) const
inlinenoexcept

◆ getAttributes()

const AttributeList & getAttributes ( ) const
inlinenoexcept

◆ getAssemblyVariants()

const QSet< Uuid > & getAssemblyVariants ( ) const
inlinenoexcept

◆ getParts() [1/2]

PartList & getParts ( )
inlinenoexcept

◆ getParts() [2/2]

const PartList & getParts ( ) const
inlinenoexcept

◆ setDevice()

void setDevice ( const Uuid value)
noexcept

◆ setAttributes()

void setAttributes ( const AttributeList value)
noexcept

◆ setAssemblyVariants()

void setAssemblyVariants ( const QSet< Uuid > &  assemblyVariants)
noexcept

◆ 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=()

ComponentAssemblyOption & operator= ( const ComponentAssemblyOption rhs)
delete

◆ operator==()

bool operator== ( const ComponentAssemblyOption rhs) const
noexcept

◆ operator!=()

bool operator!= ( const ComponentAssemblyOption rhs) const
inlinenoexcept

◆ partListEdited()

void partListEdited ( const PartList list,
int  index,
const std::shared_ptr< const Part > &  obj,
PartList::Event  event 
)
privatenoexcept

Member Data Documentation

◆ onEdited

◆ mDevice

Uuid mDevice
private

Compatible device.

◆ mAttributes

AttributeList mAttributes
private

Default attributes to copy when adding new parts.

◆ mAssemblyVariants

QSet<Uuid> mAssemblyVariants
private

UUIDs of librepcb::AssemblyVariant this option is available for.

◆ mParts

PartList mParts
private

Parts available for assembly.

◆ mOnPartsEditedSlot

PartList::OnEditedSlot mOnPartsEditedSlot
private

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