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

The TextGraphicsItem class is the graphical representation of a librepcb::Text. More...

#include <textgraphicsitem.h>

Inherits QGraphicsItemGroup.

+ Collaboration diagram for TextGraphicsItem:

Public Member Functions

 TextGraphicsItem ()=delete
 
 TextGraphicsItem (const TextGraphicsItem &other)=delete
 
 TextGraphicsItem (Text &text, const IF_GraphicsLayerProvider &lp, QGraphicsItem *parent=nullptr) noexcept
 
virtual ~TextGraphicsItem () noexcept
 
TextgetObj () noexcept
 
void setTextOverride (const std::optional< QString > &text) noexcept
 
QPainterPath shape () const noexcept override
 
TextGraphicsItemoperator= (const TextGraphicsItem &rhs)=delete
 

Private Member Functions

void textEdited (const Text &text, Text::Event event) noexcept
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) noexcept override
 
void updateText () noexcept
 

Private Attributes

TextmText
 
const IF_GraphicsLayerProvidermLayerProvider
 
std::optional< QString > mTextOverride
 
QScopedPointer< PrimitiveTextGraphicsItemmTextGraphicsItem
 
QScopedPointer< OriginCrossGraphicsItemmOriginCrossGraphicsItem
 
Text::OnEditedSlot mOnEditedSlot
 

Detailed Description

The TextGraphicsItem class is the graphical representation of a librepcb::Text.

Constructor & Destructor Documentation

◆ TextGraphicsItem() [1/3]

TextGraphicsItem ( )
delete

◆ TextGraphicsItem() [2/3]

TextGraphicsItem ( const TextGraphicsItem other)
delete

◆ TextGraphicsItem() [3/3]

TextGraphicsItem ( Text text,
const IF_GraphicsLayerProvider lp,
QGraphicsItem *  parent = nullptr 
)
noexcept

◆ ~TextGraphicsItem()

~TextGraphicsItem ( )
virtualnoexcept

Member Function Documentation

◆ getObj()

Text & getObj ( )
inlinenoexcept

◆ setTextOverride()

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

◆ shape()

QPainterPath shape ( ) const
overridenoexcept

◆ operator=()

TextGraphicsItem & operator= ( const TextGraphicsItem rhs)
delete

◆ textEdited()

void textEdited ( const Text text,
Text::Event  event 
)
privatenoexcept

◆ itemChange()

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

◆ updateText()

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

Member Data Documentation

◆ mText

Text& mText
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mTextOverride

std::optional<QString> mTextOverride
private

◆ mTextGraphicsItem

QScopedPointer<PrimitiveTextGraphicsItem> mTextGraphicsItem
private

◆ mOriginCrossGraphicsItem

QScopedPointer<OriginCrossGraphicsItem> mOriginCrossGraphicsItem
private

◆ mOnEditedSlot

Text::OnEditedSlot mOnEditedSlot
private

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