LibrePCB Developers Documentation
NetLine Class Referencefinal

The NetLine class represents a net line within a schematic. More...

#include <netline.h>

+ Inheritance diagram for NetLine:
+ Collaboration diagram for NetLine:

Public Types

enum  Event
 
typedef Slot< NetLine, EventOnEditedSlot
 

Public Member Functions

 NetLine ()=delete
 
 NetLine (const NetLine &other) noexcept
 
 NetLine (const Uuid &uuid, const NetLine &other) noexcept
 
 NetLine (const Uuid &uuid, const UnsignedLength &width, const NetLineAnchor &start, const NetLineAnchor &end) noexcept
 
 NetLine (const SExpression &node, const Version &fileFormat)
 
 ~NetLine () noexcept
 
const UuidgetUuid () const noexcept
 
const UnsignedLengthgetWidth () const noexcept
 
const NetLineAnchorgetStartPoint () const noexcept
 
const NetLineAnchorgetEndPoint () const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setWidth (const UnsignedLength &width) noexcept
 
bool setStartPoint (const NetLineAnchor &start) noexcept
 
bool setEndPoint (const NetLineAnchor &end) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const NetLine &rhs) const noexcept
 
bool operator!= (const NetLine &rhs) const noexcept
 
NetLineoperator= (const NetLine &rhs) noexcept
 
- 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...
 

Public Attributes

Signal< NetLine, EventonEdited
 

Private Attributes

Uuid mUuid
 
UnsignedLength mWidth
 
NetLineAnchor mStart
 
NetLineAnchor mEnd
 

Additional Inherited Members

- 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)
 

Detailed Description

The NetLine class represents a net line within a schematic.

The main purpose of this class is to serialize and deserialize schematic net lines.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
WidthChanged 
StartPointChanged 
EndPointChanged 

Constructor & Destructor Documentation

◆ NetLine() [1/5]

NetLine ( )
delete

◆ NetLine() [2/5]

NetLine ( const NetLine other)
noexcept

◆ NetLine() [3/5]

NetLine ( const Uuid uuid,
const NetLine other 
)
noexcept

◆ NetLine() [4/5]

NetLine ( const Uuid uuid,
const UnsignedLength width,
const NetLineAnchor start,
const NetLineAnchor end 
)
noexcept

◆ NetLine() [5/5]

NetLine ( const SExpression node,
const Version fileFormat 
)

◆ ~NetLine()

~NetLine ( )
noexcept

Member Function Documentation

◆ getUuid()

const Uuid& getUuid ( ) const
inlinenoexcept

◆ getWidth()

const UnsignedLength& getWidth ( ) const
inlinenoexcept

◆ getStartPoint()

const NetLineAnchor& getStartPoint ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getEndPoint()

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

◆ setUuid()

bool setUuid ( const Uuid uuid)
noexcept
+ Here is the caller graph for this function:

◆ setWidth()

bool setWidth ( const UnsignedLength width)
noexcept
+ Here is the caller graph for this function:

◆ setStartPoint()

bool setStartPoint ( const NetLineAnchor start)
noexcept
+ Here is the caller graph for this function:

◆ setEndPoint()

bool setEndPoint ( const NetLineAnchor end)
noexcept
+ 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:

◆ operator==()

bool operator== ( const NetLine rhs) const
noexcept

◆ operator!=()

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

◆ operator=()

NetLine & operator= ( const NetLine rhs)
noexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ onEdited

Signal<NetLine, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mWidth

UnsignedLength mWidth
private

◆ mStart

NetLineAnchor mStart
private

◆ mEnd

NetLineAnchor mEnd
private

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