20#ifndef LIBREPCB_CORE_SI_SYMBOL_H
21#define LIBREPCB_CORE_SI_SYMBOL_H
26#include "../../../geometry/text.h"
27#include "../../../types/angle.h"
28#include "../../../types/point.h"
29#include "../../../types/uuid.h"
30#include "../../../utils/signalslot.h"
40class ComponentInstance;
41class ComponentSymbolVariantItem;
72 const Point& position,
const Angle& rotation,
bool mirrored,
73 bool loadInitialTexts);
81 QString
getName() const noexcept;
83 return mPins.value(pinUuid);
85 const QHash<Uuid, SI_SymbolPin*>&
getPins() const noexcept {
return mPins; }
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition angle.h:76
The ComponentInstance class.
Definition componentinstance.h:54
The ComponentSymbolVariantItem class represents one symbol of a component symbol variant.
Definition componentsymbolvariantitem.h:54
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The SExpression class.
Definition sexpression.h:69
The Schematic Item Base (SI_Base) class.
Definition si_base.h:45
The SI_Symbol class.
Definition si_symbol.h:54
const QHash< Uuid, SI_SymbolPin * > & getPins() const noexcept
Definition si_symbol.h:85
bool getMirrored() const noexcept
Definition si_symbol.h:80
const Angle & getRotation() const noexcept
Definition si_symbol.h:79
ComponentInstance & getComponentInstance() const noexcept
Definition si_symbol.h:86
const ComponentSymbolVariantItem & getCompSymbVarItem() const noexcept
Definition si_symbol.h:90
void setMirrored(bool newMirrored) noexcept
Definition si_symbol.cpp:143
QHash< Uuid, SI_SymbolPin * > mPins
key: symbol pin UUID
Definition si_symbol.h:131
Slot< SI_Symbol, Event > OnEditedSlot
Definition si_symbol.h:65
void textAdded(SI_Text &text)
const QMap< Uuid, SI_Text * > & getTexts() const noexcept
Definition si_symbol.h:101
ComponentInstance & mComponentInstance
Definition si_symbol.h:128
Uuid mUuid
Definition si_symbol.h:135
QString getName() const noexcept
Definition si_symbol.cpp:117
Event
Definition si_symbol.h:59
TextList getDefaultTexts() const noexcept
Definition si_symbol.cpp:154
bool checkAttributesValidity() const noexcept
Definition si_symbol.cpp:265
SI_Symbol & operator=(const SI_Symbol &rhs)=delete
void removeFromSchematic() override
Definition si_symbol.cpp:222
void removeText(SI_Text &text)
Definition si_symbol.cpp:188
SI_SymbolPin * getPin(const Uuid &pinUuid) const noexcept
Definition si_symbol.h:82
void setRotation(const Angle &newRotation) noexcept
Definition si_symbol.cpp:136
void textRemoved(SI_Text &text)
void addText(SI_Text &text)
Definition si_symbol.cpp:170
void addToSchematic() override
Definition si_symbol.cpp:203
~SI_Symbol() noexcept
Definition si_symbol.cpp:106
Angle mRotation
Definition si_symbol.h:137
const Point & getPosition() const noexcept
Definition si_symbol.h:78
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition si_symbol.cpp:241
const Symbol & getLibSymbol() const noexcept
Definition si_symbol.h:89
const Uuid & getUuid() const noexcept
Definition si_symbol.h:77
void setPosition(const Point &newPos) noexcept
Definition si_symbol.cpp:129
QMap< Uuid, SI_Text * > mTexts
key: text UUID
Definition si_symbol.h:132
bool mMirrored
Definition si_symbol.h:138
const ComponentSymbolVariantItem * mSymbVarItem
Definition si_symbol.h:129
Point mPosition
Definition si_symbol.h:136
Signal< SI_Symbol, Event > onEdited
Definition si_symbol.h:64
SI_Symbol(const SI_Symbol &other)=delete
const Symbol * mSymbol
Definition si_symbol.h:130
The SI_SymbolPin class.
Definition si_symbolpin.h:52
The SI_Text class represents a text label in a schematic.
Definition si_text.h:48
The Schematic class represents one schematic page of a project and is always part of a circuit.
Definition schematic.h:74
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The Slot class is used to receive signals from non-QObject derived classes.
Definition signalslot.h:170
The Symbol class represents the part of a component which is added to schematics.
Definition symbol.h:55
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
Definition occmodel.cpp:76