LibrePCB Developers Documentation
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
 
TextgetText () noexcept
 
void setTextOverride (const tl::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
 
tl::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

◆ getText()

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

◆ setTextOverride()

void setTextOverride ( const tl::optional< QString > &  text)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shape()

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

◆ operator=()

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

◆ textEdited()

void textEdited ( const Text text,
Text::Event  event 
)
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 
)
overrideprivatevirtualnoexcept
+ Here is the caller graph for this function:

◆ updateText()

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

Member Data Documentation

◆ mText

Text& mText
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mTextOverride

tl::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: