LibrePCB Developers Documentation
PrimitivePathGraphicsItem Class Reference

The PrimitivePathGraphicsItem class. More...

#include <primitivepathgraphicsitem.h>

+ Inheritance diagram for PrimitivePathGraphicsItem:
+ Collaboration diagram for PrimitivePathGraphicsItem:

Public Member Functions

 PrimitivePathGraphicsItem (const PrimitivePathGraphicsItem &other)=delete
 
 PrimitivePathGraphicsItem (QGraphicsItem *parent=nullptr) noexcept
 
virtual ~PrimitivePathGraphicsItem () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void setPath (const QPainterPath &path) noexcept
 
void setLineWidth (const UnsignedLength &width) noexcept
 
void setLineLayer (const GraphicsLayer *layer) noexcept
 
void setFillLayer (const GraphicsLayer *layer) noexcept
 
QRectF boundingRect () const noexcept override
 
QPainterPath shape () const noexcept override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexcept override
 
PrimitivePathGraphicsItemoperator= (const PrimitivePathGraphicsItem &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
 
QPainterPath mPainterPath
 
QRectF mBoundingRect
 
QPainterPath mShape
 
GraphicsLayer::OnEditedSlot mOnLayerEditedSlot
 

Detailed Description

Constructor & Destructor Documentation

◆ PrimitivePathGraphicsItem() [1/2]

◆ PrimitivePathGraphicsItem() [2/2]

PrimitivePathGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept

◆ ~PrimitivePathGraphicsItem()

~PrimitivePathGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ setPosition()

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

◆ setRotation()

void setRotation ( const Angle rot)
noexcept

◆ setPath()

void setPath ( const QPainterPath &  path)
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()

QRectF boundingRect ( ) const
inlineoverridenoexcept

◆ shape()

QPainterPath shape ( ) const
inlineoverridenoexcept
+ 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 
)
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

PrimitivePathGraphicsItem& operator= ( const PrimitivePathGraphicsItem 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

◆ mPainterPath

QPainterPath mPainterPath
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: