LibrePCB Developers Documentation
ComponentSymbolVariantItem Class Referencefinal

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

#include <componentsymbolvariantitem.h>

+ Inheritance diagram for ComponentSymbolVariantItem:
+ Collaboration diagram for ComponentSymbolVariantItem:

Public Types

enum  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 override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const ComponentSymbolVariantItem &rhs) const noexcept
 
bool operator!= (const ComponentSymbolVariantItem &rhs) const noexcept
 
ComponentSymbolVariantItemoperator= (const ComponentSymbolVariantItem &rhs) noexcept
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

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
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

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 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 call graph for this function:
+ 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
+ Here is the call graph for this function:

◆ serialize()

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const ComponentSymbolVariantItem rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

bool operator!= ( const ComponentSymbolVariantItem rhs) const
inlinenoexcept
+ Here is the call graph for this function:

◆ operator=()

ComponentSymbolVariantItem & operator= ( const ComponentSymbolVariantItem rhs)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pinSignalMapEdited()

void pinSignalMapEdited ( const ComponentPinSignalMap map,
int  index,
const std::shared_ptr< const ComponentPinSignalMapItem > &  item,
ComponentPinSignalMap::Event  event 
)
privatenoexcept
+ Here is the caller graph for this function:

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: