LibrePCB Developers Documentation
ComponentSymbolVariant Class Referencefinal

The ComponentSymbolVariant class represents a symbol variant of a component. More...

#include <componentsymbolvariant.h>

+ Collaboration diagram for ComponentSymbolVariant:

Public Types

enum class  Event
 
typedef Slot< ComponentSymbolVariant, EventOnEditedSlot
 

Public Member Functions

 ComponentSymbolVariant ()=delete
 
 ComponentSymbolVariant (const ComponentSymbolVariant &other) noexcept
 
 ComponentSymbolVariant (const Uuid &uuid, const QString &norm, const ElementName &name_en_US, const QString &desc_en_US) noexcept
 
 ComponentSymbolVariant (const SExpression &node)
 
 ~ComponentSymbolVariant () noexcept
 
const UuidgetUuid () const noexcept
 
const QString & getNorm () const noexcept
 
const ElementNamegetName () const noexcept
 
const LocalizedNameMapgetNames () const noexcept
 
const LocalizedDescriptionMapgetDescriptions () const noexcept
 
bool setNorm (const QString &norm) noexcept
 
bool setName (const QString &locale, const ElementName &name) noexcept
 
bool setDescription (const QString &locale, const QString &desc) noexcept
 
bool setNames (const LocalizedNameMap &names) noexcept
 
bool setDescriptions (const LocalizedDescriptionMap &descriptions) noexcept
 
ComponentSymbolVariantItemListgetSymbolItems () noexcept
 
const ComponentSymbolVariantItemListgetSymbolItems () const noexcept
 
QSet< UuidgetAllSymbolUuids () const noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const ComponentSymbolVariant &rhs) const noexcept
 
bool operator!= (const ComponentSymbolVariant &rhs) const noexcept
 
ComponentSymbolVariantoperator= (const ComponentSymbolVariant &rhs) noexcept
 

Public Attributes

Signal< ComponentSymbolVariant, EventonEdited
 

Private Member Functions

void itemsEdited (const ComponentSymbolVariantItemList &list, int index, const std::shared_ptr< const ComponentSymbolVariantItem > &item, ComponentSymbolVariantItemList::Event event) noexcept
 

Private Attributes

Uuid mUuid
 
QString mNorm
 
LocalizedNameMap mNames
 
LocalizedDescriptionMap mDescriptions
 
ComponentSymbolVariantItemList mSymbolItems
 
ComponentSymbolVariantItemList::OnEditedSlot mOnItemsEditedSlot
 

Detailed Description

The ComponentSymbolVariant class represents a symbol variant of a component.

Following information is considered as the "interface" of a symbol variant and must therefore never be changed:

  • UUID
  • Symbol items (neither adding nor removing items is allowed)
    • UUID
    • Symbol UUID
    • Pin-signal-mapping

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
NormChanged 
NamesChanged 
DescriptionsChanged 
SymbolItemsEdited 

Constructor & Destructor Documentation

◆ ComponentSymbolVariant() [1/4]

◆ ComponentSymbolVariant() [2/4]

ComponentSymbolVariant ( const ComponentSymbolVariant other)
noexcept

◆ ComponentSymbolVariant() [3/4]

ComponentSymbolVariant ( const Uuid uuid,
const QString &  norm,
const ElementName name_en_US,
const QString &  desc_en_US 
)
noexcept

◆ ComponentSymbolVariant() [4/4]

ComponentSymbolVariant ( const SExpression node)
explicit

◆ ~ComponentSymbolVariant()

~ComponentSymbolVariant ( )
noexcept

Member Function Documentation

◆ getUuid()

const Uuid & getUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getNorm()

const QString & getNorm ( ) const
inlinenoexcept

◆ getName()

const ElementName & getName ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ getNames()

const LocalizedNameMap & getNames ( ) const
inlinenoexcept

◆ getDescriptions()

const LocalizedDescriptionMap & getDescriptions ( ) const
inlinenoexcept

◆ setNorm()

bool setNorm ( const QString &  norm)
noexcept
+ Here is the caller graph for this function:

◆ setName()

bool setName ( const QString &  locale,
const ElementName name 
)
noexcept
+ Here is the caller graph for this function:

◆ setDescription()

bool setDescription ( const QString &  locale,
const QString &  desc 
)
noexcept
+ Here is the caller graph for this function:

◆ setNames()

bool setNames ( const LocalizedNameMap names)
noexcept
+ Here is the caller graph for this function:

◆ setDescriptions()

bool setDescriptions ( const LocalizedDescriptionMap descriptions)
noexcept
+ Here is the caller graph for this function:

◆ getSymbolItems() [1/2]

ComponentSymbolVariantItemList & getSymbolItems ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ getSymbolItems() [2/2]

const ComponentSymbolVariantItemList & getSymbolItems ( ) const
inlinenoexcept

◆ getAllSymbolUuids()

QSet< Uuid > getAllSymbolUuids ( ) const
inlinenoexcept
+ Here is the call 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 ComponentSymbolVariant rhs) const
noexcept

◆ operator!=()

bool operator!= ( const ComponentSymbolVariant rhs) const
inlinenoexcept

◆ operator=()

ComponentSymbolVariant & operator= ( const ComponentSymbolVariant rhs)
noexcept

◆ itemsEdited()

void itemsEdited ( const ComponentSymbolVariantItemList list,
int  index,
const std::shared_ptr< const ComponentSymbolVariantItem > &  item,
ComponentSymbolVariantItemList::Event  event 
)
privatenoexcept

Member Data Documentation

◆ onEdited

◆ mUuid

Uuid mUuid
private

◆ mNorm

QString mNorm
private

◆ mNames

LocalizedNameMap mNames
private

◆ mDescriptions

LocalizedDescriptionMap mDescriptions
private

◆ mSymbolItems

ComponentSymbolVariantItemList mSymbolItems
private

◆ mOnItemsEditedSlot


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