LibrePCB Developers Documentation
Loading...
Searching...
No Matches
StrokeTextGraphicsItem Class Referencefinal

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

#include <stroketextgraphicsitem.h>

Inherits QGraphicsItemGroup.

+ Collaboration diagram for StrokeTextGraphicsItem:

Public Member Functions

 StrokeTextGraphicsItem ()=delete
 
 StrokeTextGraphicsItem (const StrokeTextGraphicsItem &other)=delete
 
 StrokeTextGraphicsItem (StrokeText &text, const IF_GraphicsLayerProvider &lp, const StrokeFont &font, QGraphicsItem *parent=nullptr) noexcept
 
virtual ~StrokeTextGraphicsItem () noexcept
 
StrokeTextgetObj () noexcept
 
void setTextOverride (const std::optional< QString > &text) noexcept
 
QPainterPath shape () const noexcept override
 
StrokeTextGraphicsItemoperator= (const StrokeTextGraphicsItem &rhs)=delete
 

Private Member Functions

void strokeTextEdited (const StrokeText &text, StrokeText::Event event) noexcept
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) noexcept override
 
void updateLayer (const Layer &layer) noexcept
 
void updateText () noexcept
 
void updateTransform () noexcept
 

Private Attributes

StrokeTextmText
 
const IF_GraphicsLayerProvidermLayerProvider
 
const StrokeFontmFont
 
std::optional< QString > mTextOverride
 
QScopedPointer< PrimitivePathGraphicsItemmPathGraphicsItem
 
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,
const StrokeFont font,
QGraphicsItem *  parent = nullptr 
)
noexcept

◆ ~StrokeTextGraphicsItem()

~StrokeTextGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ getObj()

StrokeText & getObj ( )
inlinenoexcept

◆ setTextOverride()

void setTextOverride ( const std::optional< QString > &  text)
noexcept

◆ shape()

QPainterPath shape ( ) const
overridenoexcept

◆ operator=()

StrokeTextGraphicsItem & operator= ( const StrokeTextGraphicsItem rhs)
delete

◆ strokeTextEdited()

void strokeTextEdited ( const StrokeText text,
StrokeText::Event  event 
)
privatenoexcept

◆ itemChange()

QVariant itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprivatenoexcept

◆ updateLayer()

void updateLayer ( const Layer layer)
privatenoexcept

◆ updateText()

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

◆ updateTransform()

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

Member Data Documentation

◆ mText

StrokeText& mText
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mFont

const StrokeFont& mFont
private

◆ mTextOverride

std::optional<QString> mTextOverride
private

◆ mPathGraphicsItem

QScopedPointer<PrimitivePathGraphicsItem> mPathGraphicsItem
private

◆ mOriginCrossGraphicsItem

QScopedPointer<OriginCrossGraphicsItem> mOriginCrossGraphicsItem
private

◆ mOnEditedSlot

StrokeText::OnEditedSlot mOnEditedSlot
private

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