20#ifndef LIBREPCB_CORE_SYMBOL_H
21#define LIBREPCB_CORE_SYMBOL_H
26#include "../../geometry/circle.h"
27#include "../../geometry/polygon.h"
28#include "../../geometry/text.h"
29#include "../libraryelement.h"
73 const ElementName& name_en_US,
const QString& description_en_US,
74 const QString& keywords_en_US);
94 static std::unique_ptr<Symbol>
open(
95 std::unique_ptr<TransactionalDirectory> directory,
96 bool abortBeforeMigration =
false);
98 return QStringLiteral(
"sym");
101 return QStringLiteral(
"symbol");
108 Symbol(std::unique_ptr<TransactionalDirectory> directory,
111 const std::shared_ptr<const SymbolPin>& pin,
114 const std::shared_ptr<const Polygon>& polygon,
117 const std::shared_ptr<const Circle>& circle,
120 const std::shared_ptr<const Text>& text,
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which ...
Definition: libraryelement.h:45
The SExpression class.
Definition: sexpression.h:69
Event
Definition: serializableobjectlist.h:126
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
The Symbol class represents the part of a component which is added to schematics.
Definition: symbol.h:55
Symbol(const Symbol &other)=delete
Slot< Symbol, Event > OnEditedSlot
Definition: symbol.h:67
const SymbolPinList & getPins() const noexcept
Definition: symbol.h:79
SymbolPinList mPins
Definition: symbol.h:124
TextList mTexts
Definition: symbol.h:127
~Symbol() noexcept
Definition: symbol.cpp:78
Signal< Symbol, Event > onEdited
Definition: symbol.h:66
virtual RuleCheckMessageList runChecks() const override
Definition: symbol.cpp:85
PolygonList & getPolygons() noexcept
Definition: symbol.h:80
CircleList mCircles
Definition: symbol.h:126
void circlesEdited(const CircleList &list, int index, const std::shared_ptr< const Circle > &circle, CircleList::Event event) noexcept
Definition: symbol.cpp:161
TextList & getTexts() noexcept
Definition: symbol.h:84
const PolygonList & getPolygons() const noexcept
Definition: symbol.h:81
Event
Definition: symbol.h:60
void pinsEdited(const SymbolPinList &list, int index, const std::shared_ptr< const SymbolPin > &pin, SymbolPinList::Event event) noexcept
Definition: symbol.cpp:141
const CircleList & getCircles() const noexcept
Definition: symbol.h:83
PolygonList::OnEditedSlot mPolygonsEditedSlot
Definition: symbol.h:131
const TextList & getTexts() const noexcept
Definition: symbol.h:85
SymbolPinList & getPins() noexcept
Definition: symbol.h:78
CircleList::OnEditedSlot mCirclesEditedSlot
Definition: symbol.h:132
SymbolPinList::OnEditedSlot mPinsEditedSlot
Definition: symbol.h:130
PolygonList mPolygons
Definition: symbol.h:125
void polygonsEdited(const PolygonList &list, int index, const std::shared_ptr< const Polygon > &polygon, PolygonList::Event event) noexcept
Definition: symbol.cpp:151
void textsEdited(const TextList &list, int index, const std::shared_ptr< const Text > &text, TextList::Event event) noexcept
Definition: symbol.cpp:171
CircleList & getCircles() noexcept
Definition: symbol.h:82
static QString getLongElementName() noexcept
Definition: symbol.h:100
TextList::OnEditedSlot mTextsEditedSlot
Definition: symbol.h:133
static std::unique_ptr< Symbol > open(std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
Definition: symbol.cpp:90
Symbol & operator=(const Symbol &rhs)=delete
virtual void serialize(SExpression &root) const override
Serialize into librepcb::SExpression node.
Definition: symbol.cpp:122
static QString getShortElementName() noexcept
Definition: symbol.h:97
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
The Version class represents a version number in the format "1.42.7".
Definition: version.h:58
Definition: occmodel.cpp:77
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition: rulecheckmessage.h:104
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition: elementname.h:84