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

The Hole class. More...

#include <hole.h>

+ Inheritance diagram for Hole:
+ Collaboration diagram for Hole:

Public Types

enum  Event
 
typedef Slot< Hole, EventOnEditedSlot
 

Public Member Functions

 Hole ()=delete
 
 Hole (const Hole &other) noexcept
 
 Hole (const Uuid &uuid, const Hole &other) noexcept
 
 Hole (const Uuid &uuid, const Point &position, const PositiveLength &diameter) noexcept
 
 Hole (const SExpression &node)
 
 ~Hole () noexcept
 
const UuidgetUuid () const noexcept
 
const PointgetPosition () const noexcept
 
const PositiveLengthgetDiameter () const noexcept
 
bool setPosition (const Point &position) noexcept
 
bool setDiameter (const PositiveLength &diameter) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Hole &rhs) const noexcept
 
bool operator!= (const Hole &rhs) const noexcept
 
Holeoperator= (const Hole &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< Hole, EventonEdited
 

Private Attributes

Uuid mUuid
 
Point mPosition
 
PositiveLength mDiameter
 

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

Member Typedef Documentation

Member Enumeration Documentation

enum Event
strong
Enumerator
UuidChanged 
PositionChanged 
DiameterChanged 

Constructor & Destructor Documentation

Hole ( )
delete
Hole ( const Hole other)
noexcept
Hole ( const Uuid uuid,
const Hole other 
)
noexcept
Hole ( const Uuid uuid,
const Point position,
const PositiveLength diameter 
)
noexcept
Hole ( const SExpression node)
explicit
~Hole ( )
noexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept
const Point& getPosition ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const PositiveLength& getDiameter ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool setPosition ( const Point position)
noexcept

+ Here is the caller graph for this function:

bool setDiameter ( const PositiveLength diameter)
noexcept

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

bool operator== ( const Hole rhs) const
noexcept
bool operator!= ( const Hole rhs) const
inlinenoexcept
Hole & operator= ( const Hole rhs)
noexcept

Member Data Documentation

Signal<Hole, Event> onEdited
Uuid mUuid
private
Point mPosition
private
PositiveLength mDiameter
private

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