LibrePCB Developers Documentation
ComponentSymbolVariantItem Class Referencefinal

The ComponentSymbolVariantItem class represents one symbol of a component symbol variant. More...

#include <componentsymbolvariantitem.h>

+ Collaboration diagram for ComponentSymbolVariantItem:

Public Types

enum class  Event
 
typedef Slot< ComponentSymbolVariantItem, EventOnEditedSlot
 

Public Member Functions

 ComponentSymbolVariantItem ()=delete
 
 ComponentSymbolVariantItem (const ComponentSymbolVariantItem &other) noexcept
 
 ComponentSymbolVariantItem (const Uuid &uuid, const Uuid &symbolUuid, const Point &symbolPos, const Angle &symbolRotation, bool isRequired, const ComponentSymbolVariantItemSuffix &suffix) noexcept
 
 ComponentSymbolVariantItem (const SExpression &node)
 
 ~ComponentSymbolVariantItem () noexcept
 
const UuidgetUuid () const noexcept
 
const UuidgetSymbolUuid () const noexcept
 
const PointgetSymbolPosition () const noexcept
 
const AnglegetSymbolRotation () const noexcept
 
bool isRequired () const noexcept
 
const ComponentSymbolVariantItemSuffixgetSuffix () const noexcept
 
bool setSymbolUuid (const Uuid &uuid) noexcept
 
bool setSymbolPosition (const Point &pos) noexcept
 
bool setSymbolRotation (const Angle &rot) noexcept
 
bool setIsRequired (bool required) noexcept
 
bool setSuffix (const ComponentSymbolVariantItemSuffix &suffix) noexcept
 
ComponentPinSignalMapgetPinSignalMap () noexcept
 
const ComponentPinSignalMapgetPinSignalMap () const noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const ComponentSymbolVariantItem &rhs) const noexcept
 
bool operator!= (const ComponentSymbolVariantItem &rhs) const noexcept
 
ComponentSymbolVariantItemoperator= (const ComponentSymbolVariantItem &rhs) noexcept
 

Public Attributes

Signal< ComponentSymbolVariantItem, EventonEdited
 

Private Member Functions

void pinSignalMapEdited (const ComponentPinSignalMap &map, int index, const std::shared_ptr< const ComponentPinSignalMapItem > &item, ComponentPinSignalMap::Event event) noexcept
 

Private Attributes

Uuid mUuid
 
Uuid mSymbolUuid
 
Point mSymbolPos
 
Angle mSymbolRot
 
bool mIsRequired
 
ComponentSymbolVariantItemSuffix mSuffix
 
ComponentPinSignalMap mPinSignalMap
 
ComponentPinSignalMap::OnEditedSlot mOnPinSignalMapEditedSlot
 

Detailed Description

The ComponentSymbolVariantItem class represents one symbol of a component symbol variant.

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

  • UUID
  • Symbol UUID
  • Pin-signal-mapping

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
SymbolUuidChanged 
SymbolPositionChanged 
SymbolRotationChanged 
IsRequiredChanged 
SuffixChanged 
PinSignalMapEdited 

Constructor & Destructor Documentation

◆ ComponentSymbolVariantItem() [1/4]

◆ ComponentSymbolVariantItem() [2/4]

◆ ComponentSymbolVariantItem() [3/4]

ComponentSymbolVariantItem ( const Uuid uuid,
const Uuid symbolUuid,
const Point symbolPos,
const Angle symbolRotation,
bool  isRequired,
const ComponentSymbolVariantItemSuffix suffix 
)
noexcept

◆ ComponentSymbolVariantItem() [4/4]

ComponentSymbolVariantItem ( const SExpression node)
explicit

◆ ~ComponentSymbolVariantItem()

Member Function Documentation

◆ getUuid()

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

◆ getSymbolUuid()

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

◆ getSymbolPosition()

const Point & getSymbolPosition ( ) const
inlinenoexcept

◆ getSymbolRotation()

const Angle & getSymbolRotation ( ) const
inlinenoexcept

◆ isRequired()

bool isRequired ( ) const
inlinenoexcept

◆ getSuffix()

const ComponentSymbolVariantItemSuffix & getSuffix ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setSymbolUuid()

bool setSymbolUuid ( const Uuid uuid)
noexcept
+ Here is the caller graph for this function:

◆ setSymbolPosition()

bool setSymbolPosition ( const Point pos)
noexcept
+ Here is the caller graph for this function:

◆ setSymbolRotation()

bool setSymbolRotation ( const Angle rot)
noexcept
+ Here is the caller graph for this function:

◆ setIsRequired()

bool setIsRequired ( bool  required)
noexcept
+ Here is the caller graph for this function:

◆ setSuffix()

bool setSuffix ( const ComponentSymbolVariantItemSuffix suffix)
noexcept
+ Here is the caller graph for this function:

◆ getPinSignalMap() [1/2]

ComponentPinSignalMap & getPinSignalMap ( )
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPinSignalMap() [2/2]

const ComponentPinSignalMap & getPinSignalMap ( ) const
inlinenoexcept

◆ 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 ComponentSymbolVariantItem rhs) const
noexcept

◆ operator!=()

bool operator!= ( const ComponentSymbolVariantItem rhs) const
inlinenoexcept

◆ operator=()

ComponentSymbolVariantItem & operator= ( const ComponentSymbolVariantItem rhs)
noexcept

◆ pinSignalMapEdited()

void pinSignalMapEdited ( const ComponentPinSignalMap map,
int  index,
const std::shared_ptr< const ComponentPinSignalMapItem > &  item,
ComponentPinSignalMap::Event  event 
)
privatenoexcept

Member Data Documentation

◆ onEdited

◆ mUuid

Uuid mUuid
private

◆ mSymbolUuid

Uuid mSymbolUuid
private

◆ mSymbolPos

Point mSymbolPos
private

◆ mSymbolRot

Angle mSymbolRot
private

◆ mIsRequired

bool mIsRequired
private

◆ mSuffix

◆ mPinSignalMap

ComponentPinSignalMap mPinSignalMap
private

◆ mOnPinSignalMapEditedSlot

ComponentPinSignalMap::OnEditedSlot mOnPinSignalMapEditedSlot
private

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