LibrePCB Developers Documentation
SymbolPin Class Referencefinal

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

#include <symbolpin.h>

+ Collaboration diagram for SymbolPin:

Public Types

enum class  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, const Point &namePosition, const Angle &nameRotation, const PositiveLength &nameHeight, const Alignment &nameAlign) 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
 
const PointgetNamePosition () const noexcept
 
const AnglegetNameRotation () const noexcept
 
const PositiveLengthgetNameHeight () const noexcept
 
const AlignmentgetNameAlignment () const noexcept
 
Point getNumbersPosition (bool flipped) 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
 
bool setNamePosition (const Point &position) noexcept
 
bool setNameRotation (const Angle &rotation) noexcept
 
bool setNameHeight (const PositiveLength &height) noexcept
 
bool setNameAlignment (const Alignment &align) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const SymbolPin &rhs) const noexcept
 
bool operator!= (const SymbolPin &rhs) const noexcept
 
SymbolPinoperator= (const SymbolPin &rhs) noexcept
 

Static Public Member Functions

static Point getDefaultNamePosition (const UnsignedLength &length) noexcept
 
static PositiveLength getDefaultNameHeight () noexcept
 
static Alignment getDefaultNameAlignment () noexcept
 
static PositiveLength getNumbersHeight () noexcept
 
static Alignment getNumbersAlignment (bool flipped) noexcept
 

Public Attributes

Signal< SymbolPin, EventonEdited
 

Private Attributes

Uuid mUuid
 
CircuitIdentifier mName
 
Point mPosition
 
UnsignedLength mLength
 
Angle mRotation
 
Point mNamePosition
 
Angle mNameRotation
 
PositiveLength mNameHeight
 
Alignment mNameAlignment
 

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 class Event
strong
Enumerator
UuidChanged 
NameChanged 
PositionChanged 
LengthChanged 
RotationChanged 
NamePositionChanged 
NameRotationChanged 
NameHeightChanged 
NameAlignmentChanged 

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,
const Point namePosition,
const Angle nameRotation,
const PositiveLength nameHeight,
const Alignment nameAlign 
)
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 caller graph for this function:

◆ getNamePosition()

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

◆ getNameRotation()

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

◆ getNameHeight()

const PositiveLength & getNameHeight ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getNameAlignment()

const Alignment & getNameAlignment ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getNumbersPosition()

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

◆ setPosition()

bool setPosition ( const Point pos)
noexcept

◆ setLength()

bool setLength ( const UnsignedLength length)
noexcept

◆ setRotation()

bool setRotation ( const Angle rotation)
noexcept

◆ setName()

bool setName ( const CircuitIdentifier name)
noexcept

◆ setNamePosition()

bool setNamePosition ( const Point position)
noexcept

◆ setNameRotation()

bool setNameRotation ( const Angle rotation)
noexcept

◆ setNameHeight()

bool setNameHeight ( const PositiveLength height)
noexcept

◆ setNameAlignment()

bool setNameAlignment ( const Alignment align)
noexcept

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

◆ operator!=()

bool operator!= ( const SymbolPin rhs) const
inlinenoexcept

◆ operator=()

SymbolPin & operator= ( const SymbolPin rhs)
noexcept

◆ getDefaultNamePosition()

static Point getDefaultNamePosition ( const UnsignedLength length)
inlinestaticnoexcept
+ Here is the caller graph for this function:

◆ getDefaultNameHeight()

static PositiveLength getDefaultNameHeight ( )
inlinestaticnoexcept
+ Here is the caller graph for this function:

◆ getDefaultNameAlignment()

static Alignment getDefaultNameAlignment ( )
inlinestaticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNumbersHeight()

static PositiveLength getNumbersHeight ( )
inlinestaticnoexcept
+ Here is the caller graph for this function:

◆ getNumbersAlignment()

static Alignment getNumbersAlignment ( bool  flipped)
inlinestaticnoexcept
+ 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

◆ mNamePosition

Point mNamePosition
private

◆ mNameRotation

Angle mNameRotation
private

◆ mNameHeight

PositiveLength mNameHeight
private

◆ mNameAlignment

Alignment mNameAlignment
private

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