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

The BI_Polygon class. More...

#include <bi_polygon.h>

+ Inheritance diagram for BI_Polygon:
+ Collaboration diagram for BI_Polygon:

Public Member Functions

 BI_Polygon ()=delete
 
 BI_Polygon (const BI_Polygon &other)=delete
 
 BI_Polygon (Board &board, const BI_Polygon &other)
 
 BI_Polygon (Board &board, const SExpression &node)
 
 BI_Polygon (Board &board, const Polygon &polygon)
 
 BI_Polygon (Board &board, const Uuid &uuid, const GraphicsLayerName &layerName, const UnsignedLength &lineWidth, bool fill, bool isGrabArea, const Path &path)
 
 ~BI_Polygon () noexcept
 
PolygongetPolygon () noexcept
 
const PolygongetPolygon () const noexcept
 
const UuidgetUuid () const noexcept
 
bool isSelectable () const noexceptoverride
 
void addToBoard () override
 
void removeFromBoard () override
 
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
 
bool getIsMirrored () const noexceptoverride
 
QPainterPath getGrabAreaScenePx () const noexceptoverride
 
void setSelected (bool selected) noexceptoverride
 
BI_Polygonoperator= (const BI_Polygon &rhs)=delete
 
- Public Member Functions inherited from BI_Base
 BI_Base ()=delete
 
 BI_Base (const BI_Base &other)=delete
 
 BI_Base (Board &board) noexcept
 
virtual ~BI_Base () noexcept
 
ProjectgetProject () const noexcept
 
CircuitgetCircuit () const noexcept
 
BoardgetBoard () const noexcept
 
virtual bool isAddedToBoard () const noexcept
 
virtual bool isSelected () const noexcept
 
BI_Baseoperator= (const BI_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 Slots

void boardAttributesChanged ()
 

Private Member Functions

void init ()
 

Private Attributes

QScopedPointer< PolygonmPolygon
 
QScopedPointer
< PolygonGraphicsItem
mGraphicsItem
 

Additional Inherited Members

- Public Types inherited from BI_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 BI_Base
void addToBoard (QGraphicsItem *item) noexcept
 
void removeFromBoard (QGraphicsItem *item) noexcept
 
- Protected Attributes inherited from BI_Base
BoardmBoard
 

Detailed Description

The BI_Polygon class.

Author
ubruhin
Date
2016-01-12

Constructor & Destructor Documentation

BI_Polygon ( )
delete
BI_Polygon ( const BI_Polygon other)
delete
BI_Polygon ( Board board,
const BI_Polygon other 
)

+ Here is the call graph for this function:

BI_Polygon ( Board board,
const SExpression node 
)

+ Here is the call graph for this function:

BI_Polygon ( Board board,
const Polygon polygon 
)

+ Here is the call graph for this function:

BI_Polygon ( Board board,
const Uuid uuid,
const GraphicsLayerName layerName,
const UnsignedLength lineWidth,
bool  fill,
bool  isGrabArea,
const Path path 
)

+ Here is the call graph for this function:

~BI_Polygon ( )
noexcept

Member Function Documentation

Polygon& getPolygon ( )
inlinenoexcept

+ Here is the caller graph for this function:

const Polygon& getPolygon ( ) const
inlinenoexcept
const Uuid & getUuid ( ) const
noexcept
bool isSelectable ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addToBoard ( )
overridevirtual

Implements BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeFromBoard ( )
overridevirtual

Implements BI_Base.

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

Type_t getType ( ) const
inlineoverridevirtualnoexcept

Implements BI_Base.

const Point& getPosition ( ) const
inlineoverridevirtualnoexcept

Implements BI_Base.

bool getIsMirrored ( ) const
inlineoverridevirtualnoexcept

Implements BI_Base.

QPainterPath getGrabAreaScenePx ( ) const
overridevirtualnoexcept

Implements BI_Base.

+ Here is the caller graph for this function:

void setSelected ( bool  selected)
overridevirtualnoexcept

Reimplemented from BI_Base.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BI_Polygon& operator= ( const BI_Polygon rhs)
delete
void boardAttributesChanged ( )
privateslot

+ Here is the caller graph for this function:

void init ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

QScopedPointer<Polygon> mPolygon
private
QScopedPointer<PolygonGraphicsItem> mGraphicsItem
private

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