LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
 
void layerColorChanged (const GraphicsLayer &layer, const QColor &newColor) noexceptoverride
 
void layerHighlightColorChanged (const GraphicsLayer &layer, const QColor &newColor) noexceptoverride
 
void layerVisibleChanged (const GraphicsLayer &layer, bool newVisible) noexceptoverride
 
void layerEnabledChanged (const GraphicsLayer &layer, bool newEnabled) noexceptoverride
 
void layerDestroyed (const GraphicsLayer &layer) noexceptoverride
 
QRectF boundingRect () const noexceptoverride
 
QPainterPath shape () const noexceptoverride
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexceptoverride
 
PrimitivePathGraphicsItemoperator= (const PrimitivePathGraphicsItem &rhs)=delete
 
- Public Member Functions inherited from IF_GraphicsLayerObserver
virtual ~IF_GraphicsLayerObserver ()
 

Private Member Functions

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
 

Detailed Description

The PrimitivePathGraphicsItem class.

Author
ubruhin
Date
2017-05-28

Constructor & Destructor Documentation

PrimitivePathGraphicsItem ( QGraphicsItem *  parent = nullptr)
explicitnoexcept
~PrimitivePathGraphicsItem ( )
virtualnoexcept

+ Here is the call graph for this function:

Member Function Documentation

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

+ Here is the caller graph for this function:

void setFillLayer ( const GraphicsLayer layer)
noexcept

+ Here is the caller graph for this function:

void layerColorChanged ( const GraphicsLayer layer,
const QColor &  newColor 
)
overridevirtualnoexcept
void layerHighlightColorChanged ( const GraphicsLayer layer,
const QColor &  newColor 
)
overridevirtualnoexcept
void layerVisibleChanged ( const GraphicsLayer layer,
bool  newVisible 
)
overridevirtualnoexcept
void layerEnabledChanged ( const GraphicsLayer layer,
bool  newEnabled 
)
overridevirtualnoexcept
void layerDestroyed ( const GraphicsLayer layer)
overridevirtualnoexcept
QRectF boundingRect ( ) const
inlineoverridenoexcept
QPainterPath shape ( ) const
inlineoverridenoexcept

+ Here is the caller graph for this function:

void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept
PrimitivePathGraphicsItem& operator= ( const PrimitivePathGraphicsItem rhs)
delete
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
QPainterPath mPainterPath
private
QRectF mBoundingRect
private
QPainterPath mShape
private

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