LibrePCB Developers Documentation
SI_NetSegment Class Referencefinal

The SI_NetSegment class. More...

#include <si_netsegment.h>

+ Inheritance diagram for SI_NetSegment:
+ Collaboration diagram for SI_NetSegment:

Public Member Functions

 SI_NetSegment ()=delete
 
 SI_NetSegment (const SI_NetSegment &other)=delete
 
 SI_NetSegment (Schematic &schematic, const SExpression &node)
 
 SI_NetSegment (Schematic &schematic, NetSignal &signal)
 
 ~SI_NetSegment () noexcept
 
const UuidgetUuid () const noexcept
 
NetSignalgetNetSignal () const noexcept
 
bool isUsed () const noexcept
 
int getNetPointsAtScenePos (const Point &pos, QList< SI_NetPoint *> &points) const noexcept
 
int getNetLinesAtScenePos (const Point &pos, QList< SI_NetLine *> &lines) const noexcept
 
int getNetLabelsAtScenePos (const Point &pos, QList< SI_NetLabel *> &labels) const noexcept
 
QSet< QString > getForcedNetNames () const noexcept
 
QString getForcedNetName () const noexcept
 
Point calcNearestPoint (const Point &p) const noexcept
 
QSet< SI_SymbolPin * > getAllConnectedPins () const noexcept
 
void setNetSignal (NetSignal &netsignal)
 
const QList< SI_NetPoint * > & getNetPoints () const noexcept
 
SI_NetPointgetNetPointByUuid (const Uuid &uuid) const noexcept
 
const QList< SI_NetLine * > & getNetLines () const noexcept
 
SI_NetLinegetNetLineByUuid (const Uuid &uuid) const noexcept
 
void addNetPointsAndNetLines (const QList< SI_NetPoint *> &netpoints, const QList< SI_NetLine *> &netlines)
 
void removeNetPointsAndNetLines (const QList< SI_NetPoint *> &netpoints, const QList< SI_NetLine *> &netlines)
 
const QList< SI_NetLabel * > & getNetLabels () const noexcept
 
SI_NetLabelgetNetLabelByUuid (const Uuid &uuid) const noexcept
 
void addNetLabel (SI_NetLabel &netlabel)
 
void removeNetLabel (SI_NetLabel &netlabel)
 
void updateAllNetLabelAnchors () noexcept
 
void addToSchematic () override
 
void removeFromSchematic () override
 
void setSelectionRect (const QRectF rectPx) noexcept
 
void clearSelection () const noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
Type_t getType () const noexcept override
 
const PointgetPosition () const noexcept override
 
QPainterPath getGrabAreaScenePx () const noexcept override
 
bool isSelected () const noexcept override
 
void setSelected (bool selected) noexcept override
 
SI_NetSegmentoperator= (const SI_NetSegment &rhs)=delete
 
bool operator== (const SI_NetSegment &rhs) noexcept
 
bool operator!= (const SI_NetSegment &rhs) noexcept
 
- Public Member Functions inherited from SI_Base
 SI_Base ()=delete
 
 SI_Base (const SI_Base &other)=delete
 
 SI_Base (Schematic &schematic) noexcept
 
virtual ~SI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
SchematicgetSchematic () const noexcept
 
virtual bool isAddedToSchematic () const noexcept
 
SI_Baseoperator= (const SI_Base &rhs)=delete
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Private Member Functions

bool checkAttributesValidity () const noexcept
 
bool areAllNetPointsConnectedTogether () const noexcept
 
void findAllConnectedNetPoints (const SI_NetLineAnchor &p, QSet< const SI_SymbolPin *> &pins, QSet< const SI_NetPoint *> &points) const noexcept
 

Private Attributes

Uuid mUuid
 
NetSignalmNetSignal
 
QList< SI_NetPoint * > mNetPoints
 
QList< SI_NetLine * > mNetLines
 
QList< SI_NetLabel * > mNetLabels
 

Additional Inherited Members

- Public Types inherited from SI_Base
enum  Type_t
 
- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 
- Protected Member Functions inherited from SI_Base
void addToSchematic (SGI_Base *item) noexcept
 
void removeFromSchematic (SGI_Base *item) noexcept
 
- Protected Attributes inherited from SI_Base
SchematicmSchematic
 

Detailed Description

The SI_NetSegment class.

Todo:
Do not allow to create empty netsegments!

Constructor & Destructor Documentation

◆ SI_NetSegment() [1/4]

SI_NetSegment ( )
delete

◆ SI_NetSegment() [2/4]

SI_NetSegment ( const SI_NetSegment other)
delete

◆ SI_NetSegment() [3/4]

SI_NetSegment ( Schematic schematic,
const SExpression node 
)
+ Here is the call graph for this function:

◆ SI_NetSegment() [4/4]

SI_NetSegment ( Schematic schematic,
NetSignal signal 
)

◆ ~SI_NetSegment()

~SI_NetSegment ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getNetSignal()

NetSignal& getNetSignal ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isUsed()

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

◆ getNetPointsAtScenePos()

int getNetPointsAtScenePos ( const Point pos,
QList< SI_NetPoint *> &  points 
) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLinesAtScenePos()

int getNetLinesAtScenePos ( const Point pos,
QList< SI_NetLine *> &  lines 
) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLabelsAtScenePos()

int getNetLabelsAtScenePos ( const Point pos,
QList< SI_NetLabel *> &  labels 
) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getForcedNetNames()

QSet< QString > getForcedNetNames ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getForcedNetName()

QString getForcedNetName ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcNearestPoint()

Point calcNearestPoint ( const Point p) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllConnectedPins()

QSet< SI_SymbolPin * > getAllConnectedPins ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNetSignal()

void setNetSignal ( NetSignal netsignal)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetPoints()

const QList<SI_NetPoint*>& getNetPoints ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetPointByUuid()

SI_NetPoint * getNetPointByUuid ( const Uuid uuid) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLines()

const QList<SI_NetLine*>& getNetLines ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLineByUuid()

SI_NetLine * getNetLineByUuid ( const Uuid uuid) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNetPointsAndNetLines()

void addNetPointsAndNetLines ( const QList< SI_NetPoint *> &  netpoints,
const QList< SI_NetLine *> &  netlines 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeNetPointsAndNetLines()

void removeNetPointsAndNetLines ( const QList< SI_NetPoint *> &  netpoints,
const QList< SI_NetLine *> &  netlines 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLabels()

const QList<SI_NetLabel*>& getNetLabels ( ) const
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNetLabelByUuid()

SI_NetLabel * getNetLabelByUuid ( const Uuid uuid) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNetLabel()

void addNetLabel ( SI_NetLabel netlabel)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeNetLabel()

void removeNetLabel ( SI_NetLabel netlabel)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateAllNetLabelAnchors()

void updateAllNetLabelAnchors ( )
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addToSchematic()

void addToSchematic ( )
overridevirtual

Implements SI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFromSchematic()

void removeFromSchematic ( )
overridevirtual

Implements SI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSelectionRect()

void setSelectionRect ( const QRectF  rectPx)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearSelection()

void clearSelection ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getType()

Type_t getType ( ) const
inlineoverridevirtualnoexcept

Implements SI_Base.

◆ getPosition()

const Point& getPosition ( ) const
inlineoverridevirtualnoexcept

Implements SI_Base.

+ Here is the call graph for this function:

◆ getGrabAreaScenePx()

QPainterPath getGrabAreaScenePx ( ) const
overridevirtualnoexcept

Implements SI_Base.

+ Here is the caller graph for this function:

◆ isSelected()

bool isSelected ( ) const
overridevirtualnoexcept

Reimplemented from SI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSelected()

void setSelected ( bool  selected)
overridevirtualnoexcept

Reimplemented from SI_Base.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

SI_NetSegment& operator= ( const SI_NetSegment rhs)
delete
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const SI_NetSegment rhs)
inlinenoexcept

◆ operator!=()

bool operator!= ( const SI_NetSegment rhs)
inlinenoexcept
+ Here is the call graph for this function:

◆ checkAttributesValidity()

bool checkAttributesValidity ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ areAllNetPointsConnectedTogether()

bool areAllNetPointsConnectedTogether ( ) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAllConnectedNetPoints()

void findAllConnectedNetPoints ( const SI_NetLineAnchor p,
QSet< const SI_SymbolPin *> &  pins,
QSet< const SI_NetPoint *> &  points 
) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mUuid

Uuid mUuid
private

◆ mNetSignal

NetSignal* mNetSignal
private

◆ mNetPoints

QList<SI_NetPoint*> mNetPoints
private

◆ mNetLines

QList<SI_NetLine*> mNetLines
private

◆ mNetLabels

QList<SI_NetLabel*> mNetLabels
private

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