LibrePCB Developers Documentation
SI_Symbol Class Referencefinal

The SI_Symbol class. More...

#include <si_symbol.h>

+ Inheritance diagram for SI_Symbol:
+ Collaboration diagram for SI_Symbol:

Public Types

enum class  Event
 
typedef Slot< SI_Symbol, EventOnEditedSlot
 

Signals

void textAdded (SI_Text &text)
 
void textRemoved (SI_Text &text)
 
void attributesChanged ()
 

Public Member Functions

 SI_Symbol ()=delete
 
 SI_Symbol (const SI_Symbol &other)=delete
 
 SI_Symbol (Schematic &schematic, const Uuid &uuid, ComponentInstance &cmpInstance, const Uuid &symbolItem, const Point &position, const Angle &rotation, bool mirrored, bool loadInitialTexts)
 
 ~SI_Symbol () noexcept
 
const UuidgetUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
bool getMirrored () const noexcept
 
QString getName () const noexcept
 
SI_SymbolPingetPin (const Uuid &pinUuid) const noexcept
 
const QHash< Uuid, SI_SymbolPin * > & getPins () const noexcept
 
ComponentInstancegetComponentInstance () const noexcept
 
const SymbolgetLibSymbol () const noexcept
 
const ComponentSymbolVariantItemgetCompSymbVarItem () const noexcept
 
void setPosition (const Point &newPos) noexcept
 
void setRotation (const Angle &newRotation) noexcept
 
void setMirrored (bool newMirrored) noexcept
 
TextList getDefaultTexts () const noexcept
 
const QMap< Uuid, SI_Text * > & getTexts () const noexcept
 
void addText (SI_Text &text)
 
void removeText (SI_Text &text)
 
void addToSchematic () override
 
void removeFromSchematic () override
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
SI_Symboloperator= (const SI_Symbol &rhs)=delete
 
- Public Member Functions inherited from SI_Base
 SI_Base ()=delete
 
 SI_Base (const SI_Base &other)=delete
 
 SI_Base (Schematic &schematic) noexcept
 
virtual ~SI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
SchematicgetSchematic () const noexcept
 
virtual bool isAddedToSchematic () const noexcept
 
virtual void addToSchematic ()
 
virtual void removeFromSchematic ()
 
SI_Baseoperator= (const SI_Base &rhs)=delete
 

Public Attributes

Signal< SI_Symbol, EventonEdited
 

Private Member Functions

bool checkAttributesValidity () const noexcept
 

Private Attributes

ComponentInstancemComponentInstance
 
const ComponentSymbolVariantItemmSymbVarItem
 
const SymbolmSymbol
 
QHash< Uuid, SI_SymbolPin * > mPins
 key: symbol pin UUID More...
 
QMap< Uuid, SI_Text * > mTexts
 key: text UUID More...
 
Uuid mUuid
 
Point mPosition
 
Angle mRotation
 
bool mMirrored
 

Additional Inherited Members

- Protected Attributes inherited from SI_Base
SchematicmSchematic
 

Detailed Description

The SI_Symbol class.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
PositionChanged 
RotationChanged 
MirroredChanged 

Constructor & Destructor Documentation

◆ SI_Symbol() [1/3]

SI_Symbol ( )
delete

◆ SI_Symbol() [2/3]

SI_Symbol ( const SI_Symbol other)
delete

◆ SI_Symbol() [3/3]

SI_Symbol ( Schematic schematic,
const Uuid uuid,
ComponentInstance cmpInstance,
const Uuid symbolItem,
const Point position,
const Angle rotation,
bool  mirrored,
bool  loadInitialTexts 
)
+ Here is the call graph for this function:

◆ ~SI_Symbol()

~SI_Symbol ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getPosition()

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

◆ getRotation()

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

◆ getMirrored()

bool getMirrored ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getName()

QString getName ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPin()

SI_SymbolPin * getPin ( const Uuid pinUuid) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPins()

const QHash< Uuid, SI_SymbolPin * > & getPins ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getComponentInstance()

ComponentInstance & getComponentInstance ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLibSymbol()

const Symbol & getLibSymbol ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCompSymbVarItem()

const ComponentSymbolVariantItem & getCompSymbVarItem ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setPosition()

void setPosition ( const Point newPos)
noexcept
+ Here is the caller graph for this function:

◆ setRotation()

void setRotation ( const Angle newRotation)
noexcept
+ Here is the caller graph for this function:

◆ setMirrored()

void setMirrored ( bool  newMirrored)
noexcept
+ Here is the caller graph for this function:

◆ getDefaultTexts()

TextList getDefaultTexts ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTexts()

const QMap< Uuid, SI_Text * > & getTexts ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ addText()

void addText ( SI_Text text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeText()

void removeText ( SI_Text text)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToSchematic()

void addToSchematic ( )
overridevirtual

Reimplemented from SI_Base.

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

◆ removeFromSchematic()

void removeFromSchematic ( )
overridevirtual

Reimplemented from SI_Base.

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

◆ 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=()

SI_Symbol & operator= ( const SI_Symbol rhs)
delete

◆ textAdded

void textAdded ( SI_Text text)
signal
+ Here is the caller graph for this function:

◆ textRemoved

void textRemoved ( SI_Text text)
signal
+ Here is the caller graph for this function:

◆ attributesChanged

void attributesChanged ( )
signal
+ Here is the caller graph for this function:

◆ checkAttributesValidity()

bool checkAttributesValidity ( ) const
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ onEdited

Signal<SI_Symbol, Event> onEdited

◆ mComponentInstance

ComponentInstance& mComponentInstance
private

◆ mSymbVarItem

const ComponentSymbolVariantItem* mSymbVarItem
private

◆ mSymbol

const Symbol* mSymbol
private

◆ mPins

QHash<Uuid, SI_SymbolPin*> mPins
private

key: symbol pin UUID

◆ mTexts

QMap<Uuid, SI_Text*> mTexts
private

key: text UUID

◆ mUuid

Uuid mUuid
private

◆ mPosition

Point mPosition
private

◆ mRotation

Angle mRotation
private

◆ mMirrored

bool mMirrored
private

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