LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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,
Event
OnEditedSlot
 

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
ComponentSymbolVariantItemSuffix
getSuffix () 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,
Event
onEdited
 

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

Member Enumeration Documentation

enum Event
strong
Enumerator
UuidChanged 
SymbolUuidChanged 
SymbolPositionChanged 
SymbolRotationChanged 
IsRequiredChanged 
SuffixChanged 
PinSignalMapEdited 

Constructor & Destructor Documentation

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

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Uuid& getSymbolUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Point& getSymbolPosition ( ) const
inlinenoexcept
const Angle& getSymbolRotation ( ) const
inlinenoexcept
bool isRequired ( ) const
inlinenoexcept
const ComponentSymbolVariantItemSuffix& getSuffix ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool setSymbolUuid ( const Uuid uuid)
noexcept

+ Here is the caller graph for this function:

bool setSymbolPosition ( const Point pos)
noexcept

+ Here is the caller graph for this function:

bool setSymbolRotation ( const Angle rot)
noexcept

+ Here is the caller graph for this function:

bool setIsRequired ( bool  required)
noexcept

+ Here is the caller graph for this function:

bool setSuffix ( const ComponentSymbolVariantItemSuffix suffix)
noexcept

+ Here is the caller graph for this function:

ComponentPinSignalMap& getPinSignalMap ( )
inlinenoexcept

+ Here is the caller graph for this function:

const ComponentPinSignalMap& getPinSignalMap ( ) const
inlinenoexcept
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:

bool operator== ( const ComponentSymbolVariantItem rhs) const
noexcept
bool operator!= ( const ComponentSymbolVariantItem rhs) const
inlinenoexcept
ComponentSymbolVariantItem & operator= ( const ComponentSymbolVariantItem rhs)
noexcept
void pinSignalMapEdited ( const ComponentPinSignalMap map,
int  index,
const std::shared_ptr< const ComponentPinSignalMapItem > &  item,
ComponentPinSignalMap::Event  event 
)
privatenoexcept

Member Data Documentation

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

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