20 #ifndef LIBREPCB_CORE_SYMBOLPIN_H 21 #define LIBREPCB_CORE_SYMBOLPIN_H 26 #include "../../serialization/serializableobjectlist.h" 27 #include "../../types/alignment.h" 28 #include "../../types/angle.h" 29 #include "../../types/circuitidentifier.h" 30 #include "../../types/length.h" 31 #include "../../types/point.h" 75 const Angle& rotation,
const Point& namePosition,
115 return !(*
this == rhs);
154 static constexpr
const char* tagname =
"pin";
const Uuid & getUuid() const noexcept
Definition: symbolpin.h:82
Point getNumbersPosition(bool flipped) const noexcept
Definition: symbolpin.cpp:87
static Alignment getNumbersAlignment(bool flipped) noexcept
Definition: symbolpin.h:132
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition: symbolpin.cpp:179
The Alignment class.
Definition: alignment.h:115
~SymbolPin() noexcept
Definition: symbolpin.cpp:80
bool setNameRotation(const Angle &rotation) noexcept
Definition: symbolpin.cpp:145
Definition: occmodel.cpp:76
static VAlign bottom() noexcept
Definition: alignment.h:90
The Angle class is used to represent an angle (for example 12.75 degrees)
Definition: angle.h:76
CircuitIdentifier mName
Definition: symbolpin.h:139
Definition: symbolpin.h:153
const Angle & getRotation() const noexcept
Definition: symbolpin.h:86
bool setNameHeight(const PositiveLength &height) noexcept
Definition: symbolpin.cpp:155
static Alignment getDefaultNameAlignment() noexcept
Definition: symbolpin.h:126
const Point & getPosition() const noexcept
Definition: symbolpin.h:84
Alignment mNameAlignment
Definition: symbolpin.h:146
Slot< SymbolPin, Event > OnEditedSlot
Definition: symbolpin.h:68
bool operator!=(const SymbolPin &rhs) const noexcept
Definition: symbolpin.h:114
const Angle & getNameRotation() const noexcept
Definition: symbolpin.h:88
const Alignment & getNameAlignment() const noexcept
Definition: symbolpin.h:90
const PositiveLength & getNameHeight() const noexcept
Definition: symbolpin.h:89
static HAlign left() noexcept
Definition: alignment.h:52
Point mNamePosition
Definition: symbolpin.h:143
SymbolPin & operator=(const SymbolPin &rhs) noexcept
Definition: symbolpin.cpp:212
static PositiveLength getDefaultNameHeight() noexcept
Definition: symbolpin.h:123
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5...
Definition: point.h:78
UnsignedLength mLength
Definition: symbolpin.h:141
bool setNamePosition(const Point &position) noexcept
Definition: symbolpin.cpp:135
const Point & getNamePosition() const noexcept
Definition: symbolpin.h:87
const UnsignedLength & getLength() const noexcept
Definition: symbolpin.h:85
bool setPosition(const Point &pos) noexcept
Definition: symbolpin.cpp:105
type_safe::constrained_type< QString, CircuitIdentifierConstraint, CircuitIdentifierVerifier > CircuitIdentifier
Definition: circuitidentifier.h:93
PositiveLength mNameHeight
Definition: symbolpin.h:145
bool operator==(const SymbolPin &rhs) const noexcept
Definition: symbolpin.cpp:199
bool setName(const CircuitIdentifier &name) noexcept
Definition: symbolpin.cpp:95
The SymbolPin class represents one pin of a symbol.
Definition: symbolpin.h:51
bool setLength(const UnsignedLength &length) noexcept
Definition: symbolpin.cpp:115
Event
Definition: symbolpin.h:56
Signal< SymbolPin, Event > onEdited
Definition: symbolpin.h:67
static VAlign center() noexcept
Definition: alignment.h:89
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition: length.h:785
static VAlign top() noexcept
Definition: alignment.h:88
Point mPosition
Definition: symbolpin.h:140
const CircuitIdentifier & getName() const noexcept
Definition: symbolpin.h:83
static PositiveLength getNumbersHeight() noexcept
Definition: symbolpin.h:129
bool setRotation(const Angle &rotation) noexcept
Definition: symbolpin.cpp:125
Angle mNameRotation
Definition: symbolpin.h:144
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:56
The Length class is used to represent a length (for example 12.75 millimeters)
Definition: length.h:82
static HAlign right() noexcept
Definition: alignment.h:54
The SExpression class.
Definition: sexpression.h:66
Angle mRotation
Definition: symbolpin.h:142
Uuid mUuid
Definition: symbolpin.h:138
bool setNameAlignment(const Alignment &align) noexcept
Definition: symbolpin.cpp:165
static Point getDefaultNamePosition(const UnsignedLength &length) noexcept
Definition: symbolpin.h:120
type_safe::constrained_type< Length, UnsignedLengthConstraint, UnsignedLengthVerifier > UnsignedLength
Definition: length.h:670