LibrePCB Developers Documentation
NetLabel Class Referencefinal

The NetLabel class represents a net text label of a schematic. More...

#include <netlabel.h>

+ Inheritance diagram for NetLabel:
+ Collaboration diagram for NetLabel:

Public Types

enum  Event
 
typedef Slot< NetLabel, EventOnEditedSlot
 

Public Member Functions

 NetLabel ()=delete
 
 NetLabel (const NetLabel &other) noexcept
 
 NetLabel (const Uuid &uuid, const NetLabel &other) noexcept
 
 NetLabel (const Uuid &uuid, const Point &position, const Angle &rotation, bool mirrored) noexcept
 
 NetLabel (const SExpression &node, const Version &fileFormat)
 
 ~NetLabel () noexcept
 
const UuidgetUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const AnglegetRotation () const noexcept
 
bool getMirrored () const noexcept
 
bool setUuid (const Uuid &uuid) noexcept
 
bool setPosition (const Point &position) noexcept
 
bool setRotation (const Angle &rotation) noexcept
 
bool setMirrored (const bool mirrored) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const NetLabel &rhs) const noexcept
 
bool operator!= (const NetLabel &rhs) const noexcept
 
NetLabeloperator= (const NetLabel &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< NetLabel, EventonEdited
 

Private Attributes

Uuid mUuid
 
Point mPosition
 
Angle mRotation
 
bool mMirrored
 

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 NetLabel class represents a net text label of a schematic.

The main purpose of this class is to serialize and deserialize net labels contained in schematics.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
PositionChanged 
RotationChanged 
MirroredChanged 

Constructor & Destructor Documentation

◆ NetLabel() [1/5]

NetLabel ( )
delete

◆ NetLabel() [2/5]

NetLabel ( const NetLabel other)
noexcept

◆ NetLabel() [3/5]

NetLabel ( const Uuid uuid,
const NetLabel other 
)
noexcept

◆ NetLabel() [4/5]

NetLabel ( const Uuid uuid,
const Point position,
const Angle rotation,
bool  mirrored 
)
noexcept

◆ NetLabel() [5/5]

NetLabel ( const SExpression node,
const Version fileFormat 
)
+ Here is the call graph for this function:

◆ ~NetLabel()

~NetLabel ( )
noexcept

Member Function Documentation

◆ getUuid()

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

◆ getPosition()

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

◆ getRotation()

const Angle& getRotation ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getMirrored()

bool getMirrored ( ) 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:

◆ setPosition()

bool setPosition ( const Point position)
noexcept
+ Here is the caller graph for this function:

◆ setRotation()

bool setRotation ( const Angle rotation)
noexcept
+ Here is the caller graph for this function:

◆ setMirrored()

bool setMirrored ( const bool  mirrored)
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 NetLabel rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

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

◆ operator=()

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

Member Data Documentation

◆ onEdited

Signal<NetLabel, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mPosition

Point mPosition
private

◆ mRotation

Angle mRotation
private

◆ mMirrored

bool mMirrored
private

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