Qt 4.8
Public Functions | Public Variables | Properties | List of all members
QStaticTextItem Class Reference

#include <qstatictext_p.h>

Public Functions

QFontEnginefontEngine () const
 
void operator= (const QStaticTextItem &other)
 
 QStaticTextItem ()
 
 QStaticTextItem (const QStaticTextItem &other)
 
void setFontEngine (QFontEngine *fe)
 
void setUserData (QStaticTextUserData *newUserData)
 
QStaticTextUserDatauserData () const
 
 ~QStaticTextItem ()
 

Public Variables

union {
   QFixedPoint *   glyphPositions
 
   int   positionOffset
 
}; 
 
union {
   int   glyphOffset
 
   glyph_t *   glyphs
 
}; 
 
union {
   int   charOffset
 
   QChar *   chars
 
}; 
 
QColor color
 
QFont font
 
int numChars
 
int numGlyphs
 
char useBackendOptimizations: 1
 
char userDataNeedsUpdate: 1
 

Properties

QFontEnginem_fontEngine
 
QStaticTextUserDatam_userData
 

Detailed Description

Definition at line 78 of file qstatictext_p.h.

Constructors and Destructors

◆ QStaticTextItem() [1/2]

QStaticTextItem::QStaticTextItem ( )
inline

Definition at line 81 of file qstatictext_p.h.

81  : chars(0), numChars(0), useBackendOptimizations(false),
char useBackendOptimizations
QStaticTextUserData * m_userData
QFontEngine * m_fontEngine

◆ QStaticTextItem() [2/2]

QStaticTextItem::QStaticTextItem ( const QStaticTextItem other)
inline

Definition at line 84 of file qstatictext_p.h.

85  {
86  operator=(other);
87  }
void operator=(const QStaticTextItem &other)
Definition: qstatictext_p.h:89

◆ ~QStaticTextItem()

QStaticTextItem::~QStaticTextItem ( )

Definition at line 723 of file qstatictext.cpp.

724 {
725  if (m_userData != 0 && !m_userData->ref.deref())
726  delete m_userData;
727  if (!m_fontEngine->ref.deref())
728  delete m_fontEngine;
729 }
QAtomicInt ref
bool deref()
Atomically decrements the value of this QAtomicInt.
QStaticTextUserData * m_userData
QFontEngine * m_fontEngine

Functions

◆ fontEngine()

QFontEngine* QStaticTextItem::fontEngine ( ) const
inline

◆ operator=()

void QStaticTextItem::operator= ( const QStaticTextItem other)
inline

Definition at line 89 of file qstatictext_p.h.

90  {
92  glyphs = other.glyphs;
93  chars = other.chars;
94  numGlyphs = other.numGlyphs;
95  numChars = other.numChars;
96  font = other.font;
97  color = other.color;
100 
101  m_fontEngine = 0;
102  m_userData = 0;
103  setUserData(other.userData());
104  setFontEngine(other.fontEngine());
105  }
void setUserData(QStaticTextUserData *newUserData)
QFontEngine * fontEngine() const
QFixedPoint * glyphPositions
void setFontEngine(QFontEngine *fe)
char useBackendOptimizations
QStaticTextUserData * m_userData
QFontEngine * m_fontEngine
QStaticTextUserData * userData() const
glyph_t * glyphs

◆ setFontEngine()

void QStaticTextItem::setFontEngine ( QFontEngine fe)

Definition at line 731 of file qstatictext.cpp.

Referenced by QPainterPrivate::drawGlyphs(), QGL2PaintEngineEx::drawTextItem(), QOpenGLPaintEngine::drawTextItem(), and QStaticTextPrivate::get().

732 {
733  if (m_fontEngine != 0) {
734  if (!m_fontEngine->ref.deref())
735  delete m_fontEngine;
736  }
737 
738  m_fontEngine = fe;
739  if (m_fontEngine != 0)
740  m_fontEngine->ref.ref();
741 }
QAtomicInt ref
bool ref()
Atomically increments the value of this QAtomicInt.
bool deref()
Atomically decrements the value of this QAtomicInt.
QFontEngine * m_fontEngine

◆ setUserData()

void QStaticTextItem::setUserData ( QStaticTextUserData newUserData)
inline

Definition at line 109 of file qstatictext_p.h.

Referenced by QGL2PaintEngineExPrivate::drawCachedGlyphs().

110  {
111  if (m_userData == newUserData)
112  return;
113 
114  if (m_userData != 0 && !m_userData->ref.deref())
115  delete m_userData;
116 
117  m_userData = newUserData;
118  if (m_userData != 0)
119  m_userData->ref.ref();
120  }
bool ref()
Atomically increments the value of this QAtomicInt.
bool deref()
Atomically decrements the value of this QAtomicInt.
QStaticTextUserData * m_userData

◆ userData()

QStaticTextUserData* QStaticTextItem::userData ( ) const
inline

Definition at line 121 of file qstatictext_p.h.

Referenced by QGL2PaintEngineExPrivate::drawCachedGlyphs(), and operator=().

121 { return m_userData; }
QStaticTextUserData * m_userData

Properties

◆ @283

union { ... }

◆ @285

union { ... }

◆ @287

union { ... }

◆ charOffset

int QStaticTextItem::charOffset

◆ chars

QChar* QStaticTextItem::chars

◆ color

QColor QStaticTextItem::color

◆ font

QFont QStaticTextItem::font

◆ glyphOffset

int QStaticTextItem::glyphOffset

◆ glyphPositions

QFixedPoint* QStaticTextItem::glyphPositions

◆ glyphs

glyph_t* QStaticTextItem::glyphs

◆ m_fontEngine

QFontEngine* QStaticTextItem::m_fontEngine
private

Definition at line 152 of file qstatictext_p.h.

◆ m_userData

QStaticTextUserData* QStaticTextItem::m_userData
private

Definition at line 153 of file qstatictext_p.h.

◆ numChars

int QStaticTextItem::numChars

◆ numGlyphs

int QStaticTextItem::numGlyphs

◆ positionOffset

int QStaticTextItem::positionOffset

◆ useBackendOptimizations

char QStaticTextItem::useBackendOptimizations

◆ userDataNeedsUpdate

char QStaticTextItem::userDataNeedsUpdate

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