20#ifndef LIBREPCB_CORE_VIA_H
21#define LIBREPCB_CORE_VIA_H
26#include "../exceptions.h"
27#include "../serialization/serializableobjectlist.h"
28#include "../types/length.h"
29#include "../types/maskconfig.h"
30#include "../types/point.h"
53 Q_DECLARE_TR_FUNCTIONS(
Via)
70 Via(
const Via& other)
noexcept;
71 Via(
const Uuid& uuid,
const Via& other)
noexcept;
119 bool operator==(const
Via& rhs) const noexcept;
120 bool operator!=(const
Via& rhs) const noexcept {
return !(*
this == rhs); }
127 const
Layer& to) noexcept;
129 const
Layer& to) noexcept;
149 static constexpr const char* tagname =
"via";
The Layer class provides all supported geometry layers.
Definition layer.h:42
The Length class is used to represent a length (for example 12.75 millimeters)
Definition length.h:82
The MaskConfig class defines how to add automatic stop mask or solder paste.
Definition maskconfig.h:45
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition path.h:57
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 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 Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Via class represents a via of a board.
Definition via.h:52
PositiveLength mDrillDiameter
Definition via.h:140
bool setExposureConfig(const MaskConfig &config) noexcept
Definition via.cpp:189
QPainterPath toQPainterPathPx(const Length &expansion=Length(0)) const noexcept
Definition via.cpp:122
bool setPosition(const Point &position) noexcept
Definition via.cpp:159
bool setSize(const PositiveLength &size) noexcept
Definition via.cpp:169
Via & operator=(const Via &rhs) noexcept
Definition via.cpp:230
~Via() noexcept
Definition via.cpp:82
const Layer * mEndLayer
Definition via.h:137
bool isBlind() const noexcept
Definition via.cpp:102
const MaskConfig & getExposureConfig() const noexcept
Definition via.h:88
Uuid mUuid
Definition via.h:135
PositiveLength mSize
Definition via.h:139
const PositiveLength & getDrillDiameter() const noexcept
Definition via.h:85
bool isThrough() const noexcept
Definition via.cpp:97
const PositiveLength & getSize() const noexcept
Definition via.h:84
const Layer & getEndLayer() const noexcept
Definition via.h:82
bool isBuried() const noexcept
Definition via.cpp:109
const Layer & getStartLayer() const noexcept
Definition via.h:81
bool setLayers(const Layer &from, const Layer &to)
Definition via.cpp:140
Signal< Via, Event > onEdited
Definition via.h:65
bool setDrillDiameter(const PositiveLength &diameter) noexcept
Definition via.cpp:179
bool isOnLayer(const Layer &layer) const noexcept
Definition via.cpp:114
const Layer * mStartLayer
Definition via.h:136
const Point & getPosition() const noexcept
Definition via.h:83
void serialize(SExpression &root) const
Serialize into librepcb::SExpression node.
Definition via.cpp:203
const Uuid & getUuid() const noexcept
Definition via.h:80
Path getOutline(const Length &expansion=Length(0)) const noexcept
Definition via.cpp:89
Path getSceneOutline(const Length &expansion=Length(0)) const noexcept
Definition via.cpp:93
MaskConfig mExposureConfig
Definition via.h:141
bool setUuid(const Uuid &uuid) noexcept
Definition via.cpp:130
bool isOnAnyLayer(const QSet< const Layer * > &layers) const noexcept
Definition via.cpp:118
Point mPosition
Definition via.h:138
Slot< Via, Event > OnEditedSlot
Definition via.h:66
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810