20#ifndef LIBREPCB_CORE_SYMBOL_H
21#define LIBREPCB_CORE_SYMBOL_H
26#include "../../geometry/circle.h"
27#include "../../geometry/image.h"
28#include "../../geometry/polygon.h"
29#include "../../geometry/text.h"
30#include "../libraryelement.h"
75 const ElementName& name_en_US,
const QString& description_en_US,
76 const QString& keywords_en_US);
109 static std::unique_ptr<Symbol>
open(
110 std::unique_ptr<TransactionalDirectory> directory,
111 bool abortBeforeMigration =
false);
113 return QStringLiteral(
"sym");
116 return QStringLiteral(
"symbol");
123 Symbol(std::unique_ptr<TransactionalDirectory> directory,
126 const std::shared_ptr<const SymbolPin>& pin,
129 const std::shared_ptr<const Polygon>& polygon,
132 const std::shared_ptr<const Circle>& circle,
135 const std::shared_ptr<const Text>& text,
138 const std::shared_ptr<const Image>& image,
The LibraryElement class extends the LibraryBaseElement class with some attributes and methods which ...
Definition libraryelement.h:45
The SExpression class.
Definition sexpression.h:69
Slot< SerializableObjectList< SymbolPin, SymbolPinListNameProvider, OnEditedArgs... >, int, const std::shared_ptr< const SymbolPin > &, Event > OnEditedSlot
Definition serializableobjectlist.h:136
Event
Definition serializableobjectlist.h:126
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:56
ImageList & getImages() noexcept
Definition symbol.h:99
Symbol(const Symbol &other)=delete
Slot< Symbol, Event > OnEditedSlot
Definition symbol.h:69
PositiveLength mGridInterval
Definition symbol.h:142
const SymbolPinList & getPins() const noexcept
Definition symbol.h:92
SymbolPinList mPins
Definition symbol.h:144
TextList mTexts
Definition symbol.h:147
~Symbol() noexcept
Definition symbol.cpp:87
Signal< Symbol, Event > onEdited
Definition symbol.h:68
const PositiveLength & getGridInterval() const noexcept
Definition symbol.h:80
virtual RuleCheckMessageList runChecks() const override
Definition symbol.cpp:99
ImageList mImages
Definition symbol.h:148
PolygonList & getPolygons() noexcept
Definition symbol.h:93
CircleList mCircles
Definition symbol.h:146
void circlesEdited(const CircleList &list, int index, const std::shared_ptr< const Circle > &circle, CircleList::Event event) noexcept
Definition symbol.cpp:179
TextList & getTexts() noexcept
Definition symbol.h:97
const ImageList & getImages() const noexcept
Definition symbol.h:100
const PolygonList & getPolygons() const noexcept
Definition symbol.h:94
Event
Definition symbol.h:61
void pinsEdited(const SymbolPinList &list, int index, const std::shared_ptr< const SymbolPin > &pin, SymbolPinList::Event event) noexcept
Definition symbol.cpp:159
const CircleList & getCircles() const noexcept
Definition symbol.h:96
ImageList::OnEditedSlot mImagesEditedSlot
Definition symbol.h:155
PolygonList::OnEditedSlot mPolygonsEditedSlot
Definition symbol.h:152
const TextList & getTexts() const noexcept
Definition symbol.h:98
SymbolPinList & getPins() noexcept
Definition symbol.h:91
CircleList::OnEditedSlot mCirclesEditedSlot
Definition symbol.h:153
SymbolPinList::OnEditedSlot mPinsEditedSlot
Definition symbol.h:151
PolygonList mPolygons
Definition symbol.h:145
void polygonsEdited(const PolygonList &list, int index, const std::shared_ptr< const Polygon > &polygon, PolygonList::Event event) noexcept
Definition symbol.cpp:169
void textsEdited(const TextList &list, int index, const std::shared_ptr< const Text > &text, TextList::Event event) noexcept
Definition symbol.cpp:189
CircleList & getCircles() noexcept
Definition symbol.h:95
static QString getLongElementName() noexcept
Definition symbol.h:115
TextList::OnEditedSlot mTextsEditedSlot
Definition symbol.h:154
static std::unique_ptr< Symbol > open(std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
Definition symbol.cpp:104
bool isEmpty() const noexcept
Definition symbol.cpp:94
Symbol & operator=(const Symbol &rhs)=delete
virtual void serialize(SExpression &root) const override
Serialize into librepcb::SExpression node.
Definition symbol.cpp:136
void imagesEdited(const ImageList &list, int index, const std::shared_ptr< const Image > &image, ImageList::Event event) noexcept
Definition symbol.cpp:199
void setGridInterval(const PositiveLength &interval) noexcept
Definition symbol.h:85
static QString getShortElementName() noexcept
Definition symbol.h:112
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Version class represents a version number in the format "1.42.7".
Definition version.h:58
Definition occmodel.cpp:77
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition rulecheckmessage.h:104
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition elementname.h:84