LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 noexceptoverride
 
virtual QPainterPath shape () const noexceptoverride
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexceptoverride
 
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 ( QGraphicsItem *  parent = nullptr)
explicitnoexcept
~PrimitiveCircleGraphicsItem ( )
virtualnoexcept

Member Function Documentation

void setPosition ( const Point pos)
noexcept
void setDiameter ( const UnsignedLength dia)
noexcept

+ Here is the call graph for this function:

void setLineWidth ( const UnsignedLength width)
noexcept
void setLineLayer ( const GraphicsLayer layer)
noexcept
void setFillLayer ( const GraphicsLayer layer)
noexcept

+ Here is the caller graph for this function:

virtual QRectF boundingRect ( ) const
inlineoverridevirtualnoexcept
virtual QPainterPath shape ( ) const
inlineoverridevirtualnoexcept

Reimplemented in HoleGraphicsItem.

+ Here is the caller graph for this function:

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridevirtualnoexcept

+ Here is the call graph for this function:

PrimitiveCircleGraphicsItem& operator= ( const PrimitiveCircleGraphicsItem rhs)
delete
void layerEdited ( const GraphicsLayer layer,
GraphicsLayer::Event  event 
)
privatenoexcept
void updateColors ( )
privatenoexcept

+ Here is the call graph for this function:

void updateBoundingRectAndShape ( )
privatenoexcept

+ Here is the call graph for this function:

void updateVisibility ( )
privatenoexcept

Member Data Documentation

const GraphicsLayer* mLineLayer
private
const GraphicsLayer* mFillLayer
private
QPen mPen
private
QPen mPenHighlighted
private
QBrush mBrush
private
QBrush mBrushHighlighted
private
QRectF mCircleRect
private
QRectF mBoundingRect
private
QPainterPath mShape
private
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
private

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