LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SI_NetLine Class Referencefinal

The SI_NetLine class. More...

#include <si_netline.h>

+ Inheritance diagram for SI_NetLine:
+ Collaboration diagram for SI_NetLine:

Public Member Functions

 SI_NetLine ()=delete
 
 SI_NetLine (const SI_NetLine &other)=delete
 
 SI_NetLine (SI_NetSegment &segment, const SExpression &node, const QHash< Uuid, SI_NetLineAnchor * > &netPointAnchorMap)
 
 SI_NetLine (SI_NetSegment &segment, SI_NetLineAnchor &startPoint, SI_NetLineAnchor &endPoint, const UnsignedLength &width)
 
 ~SI_NetLine () noexcept
 
SI_NetSegmentgetNetSegment () const noexcept
 
const UuidgetUuid () const noexcept
 
const UnsignedLengthgetWidth () const noexcept
 
SI_NetLineAnchorgetStartPoint () const noexcept
 
SI_NetLineAnchorgetEndPoint () const noexcept
 
SI_NetLineAnchorgetOtherPoint (const SI_NetLineAnchor &firstPoint) const noexcept
 
NetSignalgetNetSignalOfNetSegment () const noexcept
 
void setWidth (const UnsignedLength &width) noexcept
 
void addToSchematic () override
 
void removeFromSchematic () override
 
void updateLine () noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
Type_t getType () const noexceptoverride
 
const PointgetPosition () const noexceptoverride
 
QPainterPath getGrabAreaScenePx () const noexceptoverride
 
void setSelected (bool selected) noexceptoverride
 
SI_NetLineoperator= (const SI_NetLine &rhs)=delete
 
- 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
 
virtual bool isSelected () 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

void init ()
 
SI_NetLineAnchordeserializeAnchor (const SExpression &root, const QString &oldKey, const QString &newKey, const QHash< Uuid, SI_NetLineAnchor * > &netPointAnchorMap) const
 
void serializeAnchor (SExpression &root, SI_NetLineAnchor *anchor) const
 

Private Attributes

SI_NetSegmentmNetSegment
 
QScopedPointer< SGI_NetLinemGraphicsItem
 
Point mPosition
 the center of startpoint and endpoint More...
 
QMetaObject::Connection mHighlightChangedConnection
 
Uuid mUuid
 
SI_NetLineAnchormStartPoint
 
SI_NetLineAnchormEndPoint
 
UnsignedLength mWidth
 

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_NetLine class.

Constructor & Destructor Documentation

SI_NetLine ( )
delete
SI_NetLine ( const SI_NetLine other)
delete
SI_NetLine ( SI_NetSegment segment,
const SExpression node,
const QHash< Uuid, SI_NetLineAnchor * > &  netPointAnchorMap 
)

+ Here is the call graph for this function:

SI_NetLine ( SI_NetSegment segment,
SI_NetLineAnchor startPoint,
SI_NetLineAnchor endPoint,
const UnsignedLength width 
)

+ Here is the call graph for this function:

~SI_NetLine ( )
noexcept

Member Function Documentation

SI_NetSegment& getNetSegment ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Uuid& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const UnsignedLength& getWidth ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

SI_NetLineAnchor& getStartPoint ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

SI_NetLineAnchor& getEndPoint ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

SI_NetLineAnchor * getOtherPoint ( const SI_NetLineAnchor firstPoint) const
noexcept

+ Here is the caller graph for this function:

NetSignal & getNetSignalOfNetSegment ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setWidth ( const UnsignedLength width)
noexcept
void addToSchematic ( )
overridevirtual

Implements SI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeFromSchematic ( )
overridevirtual

Implements SI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateLine ( )
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

Type_t getType ( ) const
inlineoverridevirtualnoexcept

Implements SI_Base.

const Point& getPosition ( ) const
inlineoverridevirtualnoexcept

Implements SI_Base.

QPainterPath getGrabAreaScenePx ( ) const
overridevirtualnoexcept

Implements SI_Base.

+ Here is the caller graph for this function:

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:

SI_NetLine& operator= ( const SI_NetLine rhs)
delete
void init ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SI_NetLineAnchor * deserializeAnchor ( const SExpression root,
const QString &  oldKey,
const QString &  newKey,
const QHash< Uuid, SI_NetLineAnchor * > &  netPointAnchorMap 
) const
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void serializeAnchor ( SExpression root,
SI_NetLineAnchor anchor 
) const
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

SI_NetSegment& mNetSegment
private
QScopedPointer<SGI_NetLine> mGraphicsItem
private
Point mPosition
private

the center of startpoint and endpoint

QMetaObject::Connection mHighlightChangedConnection
private
Uuid mUuid
private
SI_NetLineAnchor* mStartPoint
private
SI_NetLineAnchor* mEndPoint
private
UnsignedLength mWidth
private

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