LibrePCB Developers Documentation
StrokeTextGraphicsItem Class Referencefinal

The StrokeTextGraphicsItem class is the graphical representation of a librepcb::StrokeText. More...

#include <stroketextgraphicsitem.h>

+ Inheritance diagram for StrokeTextGraphicsItem:
+ Collaboration diagram for StrokeTextGraphicsItem:

Public Member Functions

 StrokeTextGraphicsItem ()=delete
 
 StrokeTextGraphicsItem (const StrokeTextGraphicsItem &other)=delete
 
 StrokeTextGraphicsItem (StrokeText &text, const IF_GraphicsLayerProvider &lp, QGraphicsItem *parent=nullptr) noexcept
 
 ~StrokeTextGraphicsItem () noexcept
 
StrokeTextgetText () noexcept
 
QPainterPath shape () const noexcept override
 
StrokeTextGraphicsItemoperator= (const StrokeTextGraphicsItem &rhs)=delete
 
- Public Member Functions inherited from PrimitivePathGraphicsItem
 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 strokeTextEdited (const StrokeText &text, StrokeText::Event event) noexcept
 
void updateLayer (const GraphicsLayerName &layerName) noexcept
 
void updateTransform () noexcept
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) noexcept override
 

Private Attributes

StrokeTextmText
 
const IF_GraphicsLayerProvidermLayerProvider
 
QScopedPointer< OriginCrossGraphicsItemmOriginCrossGraphicsItem
 
StrokeText::OnEditedSlot mOnEditedSlot
 

Detailed Description

The StrokeTextGraphicsItem class is the graphical representation of a librepcb::StrokeText.

Constructor & Destructor Documentation

◆ StrokeTextGraphicsItem() [1/3]

◆ StrokeTextGraphicsItem() [2/3]

◆ StrokeTextGraphicsItem() [3/3]

StrokeTextGraphicsItem ( StrokeText text,
const IF_GraphicsLayerProvider lp,
QGraphicsItem *  parent = nullptr 
)
noexcept
+ Here is the call graph for this function:

◆ ~StrokeTextGraphicsItem()

~StrokeTextGraphicsItem ( )
noexcept

Member Function Documentation

◆ getText()

StrokeText& getText ( )
inlinenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shape()

QPainterPath shape ( ) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

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

◆ strokeTextEdited()

void strokeTextEdited ( const StrokeText text,
StrokeText::Event  event 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLayer()

void updateLayer ( const GraphicsLayerName layerName)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTransform()

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

◆ itemChange()

QVariant itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprivatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mText

StrokeText& mText
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mOriginCrossGraphicsItem

QScopedPointer<OriginCrossGraphicsItem> mOriginCrossGraphicsItem
private

◆ mOnEditedSlot

StrokeText::OnEditedSlot mOnEditedSlot
private

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