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

The Circle class. More...

#include <circle.h>

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

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
 
void setLayerName (const GraphicsLayerName &name) noexcept
 
void setLineWidth (const UnsignedLength &width) noexcept
 
void setIsFilled (bool isFilled) noexcept
 
void setIsGrabArea (bool isGrabArea) noexcept
 
void setCenter (const Point &center) noexcept
 
void setDiameter (const PositiveLength &dia) noexcept
 
Circletranslate (const Point &offset) noexcept
 
void registerObserver (IF_CircleObserver &object) const noexcept
 
void unregisterObserver (IF_CircleObserver &object) const 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...
 

Private Attributes

Uuid mUuid
 
GraphicsLayerName mLayerName
 
UnsignedLength mLineWidth
 
bool mIsFilled
 
bool mIsGrabArea
 
Point mCenter
 
PositiveLength mDiameter
 
QSet< IF_CircleObserver * > mObservers
 A list of all observer objects. More...
 

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.

Constructor & Destructor Documentation

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

+ Here is the call graph for this function:

~Circle ( )
virtualnoexcept

Member Function Documentation

const Uuid& getUuid ( ) const
inlinenoexcept
const GraphicsLayerName& getLayerName ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const UnsignedLength& getLineWidth ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isFilled ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool isGrabArea ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const Point& getCenter ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const PositiveLength& getDiameter ( ) const
inlinenoexcept
void setLayerName ( const GraphicsLayerName name)
noexcept

+ Here is the caller graph for this function:

void setLineWidth ( const UnsignedLength width)
noexcept

+ Here is the caller graph for this function:

void setIsFilled ( bool  isFilled)
noexcept

+ Here is the caller graph for this function:

void setIsGrabArea ( bool  isGrabArea)
noexcept

+ Here is the caller graph for this function:

void setCenter ( const Point center)
noexcept

+ Here is the caller graph for this function:

void setDiameter ( const PositiveLength dia)
noexcept

+ Here is the caller graph for this function:

Circle & translate ( const Point offset)
noexcept

+ Here is the caller graph for this function:

void registerObserver ( IF_CircleObserver object) const
noexcept
void unregisterObserver ( IF_CircleObserver object) const
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 Circle rhs) const
noexcept
bool operator!= ( const Circle rhs) const
inlinenoexcept
Circle & operator= ( const Circle rhs)
noexcept

Member Data Documentation

Uuid mUuid
private
GraphicsLayerName mLayerName
private
UnsignedLength mLineWidth
private
bool mIsFilled
private
bool mIsGrabArea
private
Point mCenter
private
PositiveLength mDiameter
private
QSet<IF_CircleObserver*> mObservers
mutableprivate

A list of all observer objects.


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