LibrePCB Developers Documentation
TextGraphicsItem Class Referencefinal

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

#include <textgraphicsitem.h>

+ Inheritance diagram for TextGraphicsItem:
+ 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
 
 ~TextGraphicsItem () noexcept
 
TextgetText () noexcept
 
TextGraphicsItemoperator= (const TextGraphicsItem &rhs)=delete
 
- Public Member Functions inherited from PrimitiveTextGraphicsItem
 PrimitiveTextGraphicsItem (const PrimitiveTextGraphicsItem &other)=delete
 
 PrimitiveTextGraphicsItem (QGraphicsItem *parent=nullptr) noexcept
 
virtual ~PrimitiveTextGraphicsItem () noexcept
 
void setPosition (const Point &pos) noexcept
 
void setRotation (const Angle &rot) noexcept
 
void setText (const QString &text) noexcept
 
void setHeight (const PositiveLength &height) noexcept
 
void setAlignment (const Alignment &align) noexcept
 
void setFont (Font font) noexcept
 
void setLayer (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
 
PrimitiveTextGraphicsItemoperator= (const PrimitiveTextGraphicsItem &rhs)=delete
 

Private Member Functions

void textEdited (const Text &text, Text::Event event) noexcept
 

Private Attributes

TextmText
 
const IF_GraphicsLayerProvidermLayerProvider
 
QScopedPointer< OriginCrossGraphicsItemmOriginCrossGraphicsItem
 
Text::OnEditedSlot mOnEditedSlot
 

Additional Inherited Members

- Public Types inherited from PrimitiveTextGraphicsItem
enum  Font
 

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 ( )
noexcept

Member Function Documentation

◆ getText()

Text& getText ( )
inlinenoexcept
+ Here is the call graph for this function:
+ 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:

Member Data Documentation

◆ mText

Text& mText
private

◆ mLayerProvider

const IF_GraphicsLayerProvider& mLayerProvider
private

◆ mOriginCrossGraphicsItem

QScopedPointer<OriginCrossGraphicsItem> mOriginCrossGraphicsItem
private

◆ mOnEditedSlot

Text::OnEditedSlot mOnEditedSlot
private

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