Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTextItemInt Class Reference

Internal QTextItem. More...

#include <qtextengine_p.h>

+ Inheritance diagram for QTextItemInt:
+ Collaboration diagram for QTextItemInt:

Public Member Functions

 QTextItemInt ()=default
 
 QTextItemInt (const QScriptItem &si, QFont *font, const QTextCharFormat &format=QTextCharFormat())
 
 QTextItemInt (const QGlyphLayout &g, QFont *font, const QChar *chars, int numChars, QFontEngine *fe, const QTextCharFormat &format=QTextCharFormat())
 
QTextItemInt midItem (QFontEngine *fontEngine, int firstGlyphIndex, int numGlyphs) const
 
void initWithScriptItem (const QScriptItem &si)
 
- Public Member Functions inherited from QTextItem
qreal descent () const
 Corresponds to the \l{QFontMetrics::descent()}{descent} of the piece of text that is drawn.
 
qreal ascent () const
 Corresponds to the \l{QFontMetrics::ascent()}{ascent} of the piece of text that is drawn.
 
qreal width () const
 Specifies the total width of the text to be drawn.
 
RenderFlags renderFlags () const
 Returns the render flags used.
 
QString text () const
 Returns the text that should be drawn.
 
QFont font () const
 Returns the font that should be used to draw the text.
 

Public Attributes

QFixed descent
 
QFixed ascent
 
QFixed width
 
RenderFlags flags
 
bool justified = false
 
QTextCharFormat::UnderlineStyle underlineStyle = QTextCharFormat::NoUnderline
 
const QTextCharFormat charFormat
 
int num_chars = 0
 
const QCharchars = nullptr
 
const unsigned short * logClusters = nullptr
 
const QFontf = nullptr
 
QGlyphLayout glyphs
 
QFontEnginefontEngine = nullptr
 

Additional Inherited Members

- Public Types inherited from QTextItem
enum  RenderFlag {
  RightToLeft = 0x1 , Overline = 0x10 , Underline = 0x20 , StrikeOut = 0x40 ,
  Dummy = 0xffffffff
}
 \value RightToLeft Render the text from right to left. More...
 

Detailed Description

Internal QTextItem.

Definition at line 267 of file qtextengine_p.h.

Constructor & Destructor Documentation

◆ QTextItemInt() [1/3]

QTextItemInt::QTextItemInt ( )
inlinedefault

◆ QTextItemInt() [2/3]

QTextItemInt::QTextItemInt ( const QScriptItem & si,
QFont * font,
const QTextCharFormat & format = QTextCharFormat() )

Definition at line 3750 of file qtextengine.cpp.

References fontEngine, initWithScriptItem(), and Q_ASSERT.

+ Here is the call graph for this function:

◆ QTextItemInt() [3/3]

QTextItemInt::QTextItemInt ( const QGlyphLayout & g,
QFont * font,
const QChar * chars,
int numChars,
QFontEngine * fe,
const QTextCharFormat & format = QTextCharFormat() )

Definition at line 3760 of file qtextengine.cpp.

Member Function Documentation

◆ initWithScriptItem()

void QTextItemInt::initWithScriptItem ( const QScriptItem & si)

Definition at line 3771 of file qtextengine.cpp.

References QScriptItem::analysis, ascent, QScriptItem::ascent, QScriptAnalysis::bidiLevel, QTextFormat::boolProperty(), charFormat, descent, QScriptItem::descent, QTextCharFormat::fontOverline(), QTextCharFormat::fontStrikeOut(), QTextFormat::FontUnderline, QTextFormat::hasProperty(), QTextItem::Overline, QTextItem::RightToLeft, QTextCharFormat::SingleUnderline, QTextItem::StrikeOut, QTextFormat::TextUnderlineStyle, QTextItem::Underline, underlineStyle, and QTextCharFormat::underlineStyle().

Referenced by QTextItemInt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ midItem()

QTextItemInt QTextItemInt::midItem ( QFontEngine * fontEngine,
int firstGlyphIndex,
int numGlyphs ) const

copy the structure items, adjusting the glyphs arrays to the right subarrays. the width of the returned QTextItemInt is not adjusted, for speed reasons

Definition at line 3798 of file qtextengine.cpp.

References chars, fontEngine, glyphs, logClusters, QGlyphLayout::mid(), and num_chars.

Referenced by QPainterPrivate::drawTextItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ ascent

QFixed QTextItemInt::ascent

Definition at line 281 of file qtextengine_p.h.

Referenced by QTextItem::ascent(), and initWithScriptItem().

◆ charFormat

const QTextCharFormat QTextItemInt::charFormat

Definition at line 287 of file qtextengine_p.h.

Referenced by initWithScriptItem().

◆ chars

const QChar* QTextItemInt::chars = nullptr

Definition at line 289 of file qtextengine_p.h.

Referenced by QPicturePaintEngine::drawTextItem(), and midItem().

◆ descent

QFixed QTextItemInt::descent

Definition at line 280 of file qtextengine_p.h.

Referenced by QTextItem::descent(), and initWithScriptItem().

◆ f

const QFont* QTextItemInt::f = nullptr

Definition at line 291 of file qtextengine_p.h.

Referenced by QTextItem::font().

◆ flags

RenderFlags QTextItemInt::flags

Definition at line 284 of file qtextengine_p.h.

Referenced by QTextItem::renderFlags().

◆ fontEngine

QFontEngine* QTextItemInt::fontEngine = nullptr

◆ glyphs

QGlyphLayout QTextItemInt::glyphs

Definition at line 293 of file qtextengine_p.h.

Referenced by midItem().

◆ justified

bool QTextItemInt::justified = false

Definition at line 285 of file qtextengine_p.h.

Referenced by QPicturePaintEngine::drawTextItem().

◆ logClusters

const unsigned short* QTextItemInt::logClusters = nullptr

Definition at line 290 of file qtextengine_p.h.

Referenced by midItem().

◆ num_chars

int QTextItemInt::num_chars = 0

Definition at line 288 of file qtextengine_p.h.

Referenced by midItem().

◆ underlineStyle

Definition at line 286 of file qtextengine_p.h.

Referenced by initWithScriptItem().

◆ width

QFixed QTextItemInt::width

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