LibrePCB Developers Documentation
SymbolPin Class Referencefinal

The SymbolPin class represents one pin of a symbol. More...

#include <symbolpin.h>

+ Inheritance diagram for SymbolPin:
+ Collaboration diagram for SymbolPin:

Public Types

enum  Event
 
typedef Slot< SymbolPin, EventOnEditedSlot
 

Public Member Functions

 SymbolPin ()=delete
 
 SymbolPin (const SymbolPin &other) noexcept
 
 SymbolPin (const Uuid &uuid, const CircuitIdentifier &name, const Point &position, const UnsignedLength &length, const Angle &rotation) noexcept
 
 SymbolPin (const SExpression &node)
 
 ~SymbolPin () noexcept
 
const UuidgetUuid () const noexcept
 
const CircuitIdentifiergetName () const noexcept
 
const PointgetPosition () const noexcept
 
const UnsignedLengthgetLength () const noexcept
 
const AnglegetRotation () const noexcept
 
bool setPosition (const Point &pos) noexcept
 
bool setLength (const UnsignedLength &length) noexcept
 
bool setRotation (const Angle &rotation) noexcept
 
bool setName (const CircuitIdentifier &name) noexcept
 
void registerGraphicsItem (SymbolPinGraphicsItem &item) noexcept
 
void unregisterGraphicsItem (SymbolPinGraphicsItem &item) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const SymbolPin &rhs) const noexcept
 
bool operator!= (const SymbolPin &rhs) const noexcept
 
SymbolPinoperator= (const SymbolPin &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< SymbolPin, EventonEdited
 

Private Attributes

Uuid mUuid
 
CircuitIdentifier mName
 
Point mPosition
 
UnsignedLength mLength
 
Angle mRotation
 
SymbolPinGraphicsItemmRegisteredGraphicsItem
 

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 SymbolPin class represents one pin of a symbol.

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

  • UUID

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
NameChanged 
PositionChanged 
LengthChanged 
RotationChanged 

Constructor & Destructor Documentation

◆ SymbolPin() [1/4]

SymbolPin ( )
delete

◆ SymbolPin() [2/4]

SymbolPin ( const SymbolPin other)
noexcept

◆ SymbolPin() [3/4]

SymbolPin ( const Uuid uuid,
const CircuitIdentifier name,
const Point position,
const UnsignedLength length,
const Angle rotation 
)
noexcept

◆ SymbolPin() [4/4]

SymbolPin ( const SExpression node)
explicit

◆ ~SymbolPin()

~SymbolPin ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getName()

const CircuitIdentifier& getName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPosition()

const Point& getPosition ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLength()

const UnsignedLength& getLength ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getRotation()

const Angle& getRotation ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

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

◆ setLength()

bool setLength ( const UnsignedLength length)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRotation()

bool setRotation ( const Angle rotation)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

bool setName ( const CircuitIdentifier name)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerGraphicsItem()

void registerGraphicsItem ( SymbolPinGraphicsItem item)
noexcept
+ Here is the caller graph for this function:

◆ unregisterGraphicsItem()

void unregisterGraphicsItem ( SymbolPinGraphicsItem item)
noexcept
+ Here is the caller 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 SymbolPin rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

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

◆ operator=()

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

Member Data Documentation

◆ onEdited

Signal<SymbolPin, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mName

CircuitIdentifier mName
private

◆ mPosition

Point mPosition
private

◆ mLength

UnsignedLength mLength
private

◆ mRotation

Angle mRotation
private

◆ mRegisteredGraphicsItem

SymbolPinGraphicsItem* mRegisteredGraphicsItem
private

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