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

The FootprintPreviewGraphicsItem class. More...

#include <footprintpreviewgraphicsitem.h>

+ Inheritance diagram for FootprintPreviewGraphicsItem:
+ Collaboration diagram for FootprintPreviewGraphicsItem:

Signals

void attributesChanged () override
 This signal is emited when the value of attributes has changed. More...
 
- Signals inherited from AttributeProvider
virtual void attributesChanged ()=0
 This signal is emited when the value of attributes has changed. More...
 

Public Member Functions

 FootprintPreviewGraphicsItem (const IF_GraphicsLayerProvider &layerProvider, const QStringList &localeOrder, const Footprint &footprint, const Package *package=nullptr, const Component *component=nullptr, const AttributeProvider *attrProvider=nullptr) noexcept
 
 ~FootprintPreviewGraphicsItem () noexcept
 
void setDrawBoundingRect (bool enable) noexcept
 
void updateCacheAndRepaint () noexcept
 
QRectF boundingRect () const noexceptoverride
 
QPainterPath shape () const noexceptoverride
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) noexceptoverride
 
- Public Member Functions inherited from AttributeProvider
 AttributeProvider () noexcept
 
 AttributeProvider (const AttributeProvider &other)=delete
 
AttributeProvideroperator= (const AttributeProvider &rhs)=delete
 
virtual ~AttributeProvider () noexcept
 
QString getAttributeValue (const QString &key) const noexcept
 Get the value of an attribute which can be used in texts (like "{{NAME}}") More...
 
virtual QString getUserDefinedAttributeValue (const QString &key) const noexcept
 Get the value of a user defined attribute (if available) More...
 
virtual QVector< const
AttributeProvider * > 
getAttributeProviderParents () const noexcept
 Get all parent attribute providers (fallback if attribute not found) More...
 

Private Member Functions

 FootprintPreviewGraphicsItem ()=delete
 
 FootprintPreviewGraphicsItem (const FootprintPreviewGraphicsItem &other)=delete
 
FootprintPreviewGraphicsItemoperator= (const FootprintPreviewGraphicsItem &rhs)=delete
 
QString getBuiltInAttributeValue (const QString &key) const noexceptoverride
 Get the value of a built-in attribute (if available) More...
 

Private Attributes

const IF_GraphicsLayerProvidermLayerProvider
 
const FootprintmFootprint
 
const PackagemPackage
 
const ComponentmComponent
 
const AttributeProvidermAttributeProvider
 
bool mDrawBoundingRect
 
QStringList mLocaleOrder
 
StrokeTextList mStrokeTexts
 
QRectF mBoundingRect
 
QPainterPath mShape
 

Detailed Description

The FootprintPreviewGraphicsItem class.

Author
ubruhin
Date
2015-04-21

Constructor & Destructor Documentation

FootprintPreviewGraphicsItem ( const IF_GraphicsLayerProvider layerProvider,
const QStringList &  localeOrder,
const Footprint footprint,
const Package package = nullptr,
const Component component = nullptr,
const AttributeProvider attrProvider = nullptr 
)
explicitnoexcept
FootprintPreviewGraphicsItem ( )
privatedelete

Member Function Documentation

void setDrawBoundingRect ( bool  enable)
noexcept

+ Here is the call graph for this function:

void updateCacheAndRepaint ( )
noexcept

+ Here is the call graph for this function:

QRectF boundingRect ( ) const
inlineoverridenoexcept
QPainterPath shape ( ) const
inlineoverridenoexcept
void paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
overridenoexcept

+ Here is the call graph for this function:

void attributesChanged ( )
inlineoverridesignal

This signal is emited when the value of attributes has changed.

All derived classes must emit this signal when some attributes have changed their values (only attributes which can be fetched with getAttributeValue(), inclusive all attributes from all "parent" classes).

FootprintPreviewGraphicsItem& operator= ( const FootprintPreviewGraphicsItem rhs)
privatedelete
QString getBuiltInAttributeValue ( const QString &  key) const
overrideprivatevirtualnoexcept

Get the value of a built-in attribute (if available)

Parameters
keyThe attribute name (e.g. "NAME" for "{{NAME}}")
Returns
The value of the attribute (empty string if not found)

Reimplemented from AttributeProvider.

Member Data Documentation

const IF_GraphicsLayerProvider& mLayerProvider
private
const Footprint& mFootprint
private
const Package* mPackage
private
const Component* mComponent
private
const AttributeProvider* mAttributeProvider
private
bool mDrawBoundingRect
private
QStringList mLocaleOrder
private
StrokeTextList mStrokeTexts
private
QRectF mBoundingRect
private
QPainterPath mShape
private

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