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

The Polygon class. More...

#include <polygon.h>

+ Inheritance diagram for Polygon:
+ Collaboration diagram for Polygon:

Public Types

enum  Event
 
typedef Slot< Polygon, EventOnEditedSlot
 

Public Member Functions

 Polygon ()=delete
 
 Polygon (const Polygon &other) noexcept
 
 Polygon (const Uuid &uuid, const Polygon &other) noexcept
 
 Polygon (const Uuid &uuid, const GraphicsLayerName &layerName, const UnsignedLength &lineWidth, bool fill, bool isGrabArea, const Path &path) noexcept
 
 Polygon (const SExpression &node)
 
 ~Polygon () noexcept
 
const UuidgetUuid () const noexcept
 
const GraphicsLayerNamegetLayerName () const noexcept
 
const UnsignedLengthgetLineWidth () const noexcept
 
bool isFilled () const noexcept
 
bool isGrabArea () const noexcept
 
const PathgetPath () 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 setPath (const Path &path) noexcept
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
bool operator== (const Polygon &rhs) const noexcept
 
bool operator!= (const Polygon &rhs) const noexcept
 
Polygonoperator= (const Polygon &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< Polygon, EventonEdited
 

Private Attributes

Uuid mUuid
 
GraphicsLayerName mLayerName
 
UnsignedLength mLineWidth
 
bool mIsFilled
 
bool mIsGrabArea
 
Path mPath
 

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

Member Typedef Documentation

Member Enumeration Documentation

enum Event
strong
Enumerator
UuidChanged 
LayerNameChanged 
LineWidthChanged 
IsFilledChanged 
IsGrabAreaChanged 
PathChanged 

Constructor & Destructor Documentation

Polygon ( )
delete
Polygon ( const Polygon other)
noexcept
Polygon ( const Uuid uuid,
const Polygon other 
)
noexcept
Polygon ( const Uuid uuid,
const GraphicsLayerName layerName,
const UnsignedLength lineWidth,
bool  fill,
bool  isGrabArea,
const Path path 
)
noexcept
Polygon ( const SExpression node)
explicit
~Polygon ( )
noexcept

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 Path& getPath ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

bool setLayerName ( const GraphicsLayerName name)
noexcept

+ Here is the caller graph for this function:

bool setLineWidth ( const UnsignedLength width)
noexcept

+ Here is the caller graph for this function:

bool setIsFilled ( bool  isFilled)
noexcept

+ Here is the caller graph for this function:

bool setIsGrabArea ( bool  isGrabArea)
noexcept

+ Here is the caller graph for this function:

bool setPath ( const Path path)
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 Polygon rhs) const
noexcept
bool operator!= ( const Polygon rhs) const
inlinenoexcept
Polygon & operator= ( const Polygon rhs)
noexcept

Member Data Documentation

Signal<Polygon, Event> onEdited
Uuid mUuid
private
GraphicsLayerName mLayerName
private
UnsignedLength mLineWidth
private
bool mIsFilled
private
bool mIsGrabArea
private
Path mPath
private

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