LibrePCB Developers Documentation
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 PositiveLength &size, const PositiveLength &drillDiameter, const MaskConfig &exposureConfig) noexcept
 
 Via (const SExpression &node)
 
 ~Via () noexcept
 
const UuidgetUuid () const noexcept
 
const LayergetStartLayer () const noexcept
 
const LayergetEndLayer () const noexcept
 
const PointgetPosition () const noexcept
 
const PositiveLengthgetSize () const noexcept
 
const PositiveLengthgetDrillDiameter () const noexcept
 
const MaskConfiggetExposureConfig () const noexcept
 
Path getOutline (const Length &expansion=Length(0)) const noexcept
 
Path getSceneOutline (const Length &expansion=Length(0)) 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
 
QPainterPath toQPainterPathPx (const Length &expansion=Length(0)) const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setLayers (const Layer &from, const Layer &to)
 
bool setPosition (const Point &position) noexcept
 
bool setSize (const PositiveLength &size) noexcept
 
bool setDrillDiameter (const PositiveLength &diameter) noexcept
 
bool setExposureConfig (const MaskConfig &config) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
bool operator== (const Via &rhs) const noexcept
 
bool operator!= (const Via &rhs) const noexcept
 
Viaoperator= (const Via &rhs) noexcept
 

Static Public Member Functions

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 QPainterPath toQPainterPathPx (const PositiveLength &size, const PositiveLength &drillDiameter, const Length &expansion=Length(0)) noexcept
 

Public Attributes

Signal< Via, EventonEdited
 

Private Attributes

Uuid mUuid
 
const LayermStartLayer
 
const LayermEndLayer
 
Point mPosition
 
PositiveLength mSize
 
PositiveLength 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 
SizeChanged 
DrillDiameterChanged 
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 PositiveLength size,
const PositiveLength drillDiameter,
const MaskConfig exposureConfig 
)
noexcept

◆ 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:

◆ getSize()

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

◆ getDrillDiameter()

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

◆ getExposureConfig()

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

◆ getOutline() [1/2]

Path getOutline ( const Length expansion = Length(0)) const
noexcept
+ Here is the caller graph for this function:

◆ getSceneOutline()

Path getSceneOutline ( const Length expansion = Length(0)) const
noexcept
+ Here is the call graph for this function:
+ 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()

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

◆ toQPainterPathPx() [1/2]

QPainterPath toQPainterPathPx ( const Length expansion = Length(0)) 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

◆ setSize()

bool setSize ( const PositiveLength size)
noexcept

◆ setDrillDiameter()

bool setDrillDiameter ( const PositiveLength diameter)
noexcept

◆ 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

◆ getOutline() [2/2]

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

◆ toQPainterPathPx() [2/2]

QPainterPath toQPainterPathPx ( const PositiveLength size,
const PositiveLength drillDiameter,
const Length expansion = Length(0) 
)
staticnoexcept

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

◆ mSize

PositiveLength mSize
private

◆ mDrillDiameter

PositiveLength mDrillDiameter
private

◆ mExposureConfig

MaskConfig mExposureConfig
private

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