LibrePCB Developers Documentation
Circle Class Reference

The Circle class. More...

#include <circle.h>

+ Inheritance diagram for Circle:
+ Collaboration diagram for Circle:

Public Types

enum  Event
 
typedef Slot< Circle, EventOnEditedSlot
 

Public Member Functions

 Circle ()=delete
 
 Circle (const Circle &other) noexcept
 
 Circle (const Uuid &uuid, const Circle &other) noexcept
 
 Circle (const Uuid &uuid, const GraphicsLayerName &layerName, const UnsignedLength &lineWidth, bool fill, bool isGrabArea, const Point &center, const PositiveLength &diameter) noexcept
 
 Circle (const SExpression &node)
 
virtual ~Circle () noexcept
 
const UuidgetUuid () const noexcept
 
const GraphicsLayerNamegetLayerName () const noexcept
 
const UnsignedLengthgetLineWidth () const noexcept
 
bool isFilled () const noexcept
 
bool isGrabArea () const noexcept
 
const PointgetCenter () const noexcept
 
const PositiveLengthgetDiameter () const noexcept
 
bool setLayerName (const GraphicsLayerName &name) noexcept
 
bool setLineWidth (const UnsignedLength &width) noexcept
 
bool setIsFilled (bool isFilled) noexcept
 
bool setIsGrabArea (bool isGrabArea) noexcept
 
bool setCenter (const Point &center) noexcept
 
bool setDiameter (const PositiveLength &dia) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Circle &rhs) const noexcept
 
bool operator!= (const Circle &rhs) const noexcept
 
Circleoperator= (const Circle &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< Circle, EventonEdited
 

Private Attributes

Uuid mUuid
 
GraphicsLayerName mLayerName
 
UnsignedLength mLineWidth
 
bool mIsFilled
 
bool mIsGrabArea
 
Point mCenter
 
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 Circle class.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum Event
strong
Enumerator
UuidChanged 
LayerNameChanged 
LineWidthChanged 
IsFilledChanged 
IsGrabAreaChanged 
CenterChanged 
DiameterChanged 

Constructor & Destructor Documentation

◆ Circle() [1/5]

Circle ( )
delete

◆ Circle() [2/5]

Circle ( const Circle other)
noexcept

◆ Circle() [3/5]

Circle ( const Uuid uuid,
const Circle other 
)
noexcept

◆ Circle() [4/5]

Circle ( const Uuid uuid,
const GraphicsLayerName layerName,
const UnsignedLength lineWidth,
bool  fill,
bool  isGrabArea,
const Point center,
const PositiveLength diameter 
)
noexcept

◆ Circle() [5/5]

Circle ( const SExpression node)
explicit

◆ ~Circle()

~Circle ( )
virtualnoexcept

Member Function Documentation

◆ getUuid()

const Uuid& getUuid ( ) const
inlinenoexcept

◆ getLayerName()

const GraphicsLayerName& getLayerName ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLineWidth()

const UnsignedLength& getLineWidth ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isFilled()

bool isFilled ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isGrabArea()

bool isGrabArea ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCenter()

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

◆ getDiameter()

const PositiveLength& getDiameter ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setLayerName()

bool setLayerName ( const GraphicsLayerName name)
noexcept
+ Here is the caller graph for this function:

◆ setLineWidth()

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

◆ setIsFilled()

bool setIsFilled ( bool  isFilled)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setIsGrabArea()

bool setIsGrabArea ( bool  isGrabArea)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCenter()

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

◆ setDiameter()

bool setDiameter ( const PositiveLength dia)
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 Circle rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

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

◆ operator=()

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

Member Data Documentation

◆ onEdited

Signal<Circle, Event> onEdited

◆ mUuid

Uuid mUuid
private

◆ mLayerName

GraphicsLayerName mLayerName
private

◆ mLineWidth

UnsignedLength mLineWidth
private

◆ mIsFilled

bool mIsFilled
private

◆ mIsGrabArea

bool mIsGrabArea
private

◆ mCenter

Point mCenter
private

◆ mDiameter

PositiveLength mDiameter
private

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