LibrePCB Developers Documentation
PrimitiveCircleGraphicsItem Class Reference

The PrimitiveCircleGraphicsItem class. More...

#include <primitivecirclegraphicsitem.h>

+ Inheritance diagram for PrimitiveCircleGraphicsItem:
+ Collaboration diagram for PrimitiveCircleGraphicsItem:

Public Member Functions

 PrimitiveCircleGraphicsItem (const PrimitiveCircleGraphicsItem &other)=delete
 
 PrimitiveCircleGraphicsItem (QGraphicsItem *parent=nullptr) noexcept
 
virtual ~PrimitiveCircleGraphicsItem () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setDiameter (const UnsignedLength &dia) noexcept
 
void setLineWidth (const UnsignedLength &width) noexcept
 
void setLineLayer (const GraphicsLayer *layer) noexcept
 
void setFillLayer (const GraphicsLayer *layer) noexcept
 
virtual QRectF boundingRect () const noexcept override
 
virtual QPainterPath shape () const noexcept override
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
 
PrimitiveCircleGraphicsItemoperator= (const PrimitiveCircleGraphicsItem &rhs)=delete
 

Private Member Functions

void layerEdited (const GraphicsLayer &layer, GraphicsLayer::Event event) noexcept
 
void updateColors () noexcept
 
void updateBoundingRectAndShape () noexcept
 
void updateVisibility () noexcept
 

Private Attributes

const GraphicsLayermLineLayer
 
const GraphicsLayermFillLayer
 
QPen mPen
 
QPen mPenHighlighted
 
QBrush mBrush
 
QBrush mBrushHighlighted
 
QRectF mCircleRect
 
QRectF mBoundingRect
 
QPainterPath mShape
 
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
 

Detailed Description

Constructor & Destructor Documentation

◆ PrimitiveCircleGraphicsItem() [1/2]

◆ PrimitiveCircleGraphicsItem() [2/2]

PrimitiveCircleGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept

◆ ~PrimitiveCircleGraphicsItem()

~PrimitiveCircleGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ setPosition()

void setPosition ( const Point pos)
noexcept
+ Here is the caller graph for this function:

◆ setDiameter()

void setDiameter ( const UnsignedLength dia)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLineWidth()

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

◆ setLineLayer()

void setLineLayer ( const GraphicsLayer layer)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFillLayer()

void setFillLayer ( const GraphicsLayer layer)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ boundingRect()

virtual QRectF boundingRect ( ) const
inlineoverridevirtualnoexcept

◆ shape()

virtual QPainterPath shape ( ) const
inlineoverridevirtualnoexcept

Reimplemented in HoleGraphicsItem.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridevirtualnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

PrimitiveCircleGraphicsItem& operator= ( const PrimitiveCircleGraphicsItem rhs)
delete
+ Here is the caller graph for this function:

◆ layerEdited()

void layerEdited ( const GraphicsLayer layer,
GraphicsLayer::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateColors()

void updateColors ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBoundingRectAndShape()

void updateBoundingRectAndShape ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateVisibility()

void updateVisibility ( )
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mLineLayer

const GraphicsLayer* mLineLayer
private

◆ mFillLayer

const GraphicsLayer* mFillLayer
private

◆ mPen

QPen mPen
private

◆ mPenHighlighted

QPen mPenHighlighted
private

◆ mBrush

QBrush mBrush
private

◆ mBrushHighlighted

QBrush mBrushHighlighted
private

◆ mCircleRect

QRectF mCircleRect
private

◆ mBoundingRect

QRectF mBoundingRect
private

◆ mShape

QPainterPath mShape
private

◆ mOnLayerEditedSlot

GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
private

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