LibrePCB Developers Documentation
Loading...
Searching...
No Matches
Via Class Referencefinal

The Via class represents a via of a board. More...

#include <via.h>

+ Collaboration diagram for Via:

Public Types

enum class  Event
 
typedef Slot< Via, EventOnEditedSlot
 

Public Member Functions

 Via ()=delete
 
 Via (const Via &other) noexcept
 
 Via (const Uuid &uuid, const Via &other) noexcept
 
 Via (const Uuid &uuid, const Layer &startLayer, const Layer &endLayer, const Point &position, const std::optional< PositiveLength > &drillDiameter, const std::optional< PositiveLength > &size, const MaskConfig &exposureConfig)
 
 Via (const SExpression &node)
 
 ~Via () noexcept
 
const UuidgetUuid () const noexcept
 
const LayergetStartLayer () const noexcept
 
const LayergetEndLayer () const noexcept
 
const PointgetPosition () const noexcept
 
const std::optional< PositiveLength > & getDrillDiameter () const noexcept
 
const std::optional< PositiveLength > & getSize () const noexcept
 
const MaskConfiggetExposureConfig () const noexcept
 
bool isThrough () const noexcept
 
bool isBlind () const noexcept
 
bool isBuried () const noexcept
 
bool isOnLayer (const Layer &layer) const noexcept
 
bool isOnAnyLayer (const QSet< const Layer * > &layers) const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setLayers (const Layer &from, const Layer &to)
 
bool setPosition (const Point &position) noexcept
 
bool setDrillAndSize (const std::optional< PositiveLength > &drill, const std::optional< PositiveLength > &size)
 
bool setExposureConfig (const MaskConfig &config) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node.
 
bool operator== (const Via &rhs) const noexcept
 
bool operator!= (const Via &rhs) const noexcept
 
Viaoperator= (const Via &rhs) noexcept
 

Static Public Member Functions

static PositiveLength calcSizeFromRules (const PositiveLength &drill, const BoundedUnsignedRatio &ratio) noexcept
 
static Path getOutline (const PositiveLength &size, const Length &expansion=Length(0)) noexcept
 
static bool isOnLayer (const Layer &layer, const Layer &from, const Layer &to) noexcept
 
static bool isOnAnyLayer (const QSet< const Layer * > &layers, const Layer &from, const Layer &to) noexcept
 
static QPainterPath toQPainterPathPx (const PositiveLength &drillDiameter, const PositiveLength &size, const Length &expansion=Length(0)) noexcept
 

Public Attributes

Signal< Via, EventonEdited
 

Private Attributes

Uuid mUuid
 
const LayermStartLayer
 
const LayermEndLayer
 
Point mPosition
 
std::optional< PositiveLengthmDrillDiameter
 Guaranteed to be <= mSize.
 
std::optional< PositiveLengthmSize
 Guaranteed to be >= mDrillDiameter.
 
MaskConfig mExposureConfig
 

Detailed Description

The Via class represents a via of a board.

The main purpose of this class is to serialize and deserialize vias contained in boards.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
UuidChanged 
LayersChanged 
PositionChanged 
DrillOrSizeChanged 
ExposureConfigChanged 

Constructor & Destructor Documentation

◆ Via() [1/5]

Via ( )
delete

◆ Via() [2/5]

Via ( const Via other)
noexcept

◆ Via() [3/5]

Via ( const Uuid uuid,
const Via other 
)
noexcept

◆ Via() [4/5]

Via ( const Uuid uuid,
const Layer startLayer,
const Layer endLayer,
const Point position,
const std::optional< PositiveLength > &  drillDiameter,
const std::optional< PositiveLength > &  size,
const MaskConfig exposureConfig 
)
+ Here is the call graph for this function:

◆ Via() [5/5]

Via ( const SExpression node)
explicit
+ Here is the call graph for this function:

◆ ~Via()

~Via ( )
noexcept

Member Function Documentation

◆ getUuid()

const Uuid & getUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getStartLayer()

const Layer & getStartLayer ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getEndLayer()

const Layer & getEndLayer ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPosition()

const Point & getPosition ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDrillDiameter()

const std::optional< PositiveLength > & getDrillDiameter ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getSize()

const std::optional< PositiveLength > & getSize ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getExposureConfig()

const MaskConfig & getExposureConfig ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isThrough()

bool isThrough ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBlind()

bool isBlind ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBuried()

bool isBuried ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isOnLayer() [1/2]

bool isOnLayer ( const Layer layer) const
noexcept
+ Here is the caller graph for this function:

◆ isOnAnyLayer() [1/2]

bool isOnAnyLayer ( const QSet< const Layer * > &  layers) const
noexcept
+ Here is the caller graph for this function:

◆ setUuid()

bool setUuid ( const Uuid uuid)
noexcept

◆ setLayers()

bool setLayers ( const Layer from,
const Layer to 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

bool setPosition ( const Point position)
noexcept

◆ setDrillAndSize()

bool setDrillAndSize ( const std::optional< PositiveLength > &  drill,
const std::optional< PositiveLength > &  size 
)
+ Here is the caller graph for this function:

◆ setExposureConfig()

bool setExposureConfig ( const MaskConfig config)
noexcept

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator==()

bool operator== ( const Via rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Via rhs) const
inlinenoexcept

◆ operator=()

Via & operator= ( const Via rhs)
noexcept

◆ calcSizeFromRules()

PositiveLength calcSizeFromRules ( const PositiveLength drill,
const BoundedUnsignedRatio ratio 
)
staticnoexcept
+ Here is the caller graph for this function:

◆ getOutline()

Path getOutline ( const PositiveLength size,
const Length expansion = Length(0) 
)
staticnoexcept
+ Here is the call graph for this function:

◆ isOnLayer() [2/2]

bool isOnLayer ( const Layer layer,
const Layer from,
const Layer to 
)
staticnoexcept

◆ isOnAnyLayer() [2/2]

bool isOnAnyLayer ( const QSet< const Layer * > &  layers,
const Layer from,
const Layer to 
)
staticnoexcept

◆ toQPainterPathPx()

QPainterPath toQPainterPathPx ( const PositiveLength drillDiameter,
const PositiveLength size,
const Length expansion = Length(0) 
)
staticnoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ onEdited

Signal<Via, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mStartLayer

const Layer* mStartLayer
private

◆ mEndLayer

const Layer* mEndLayer
private

◆ mPosition

Point mPosition
private

◆ mDrillDiameter

std::optional<PositiveLength> mDrillDiameter
private

Guaranteed to be <= mSize.

◆ mSize

std::optional<PositiveLength> mSize
private

Guaranteed to be >= mDrillDiameter.

◆ mExposureConfig

MaskConfig mExposureConfig
private

The documentation for this class was generated from the following files: