Qt 6.x
The Qt SDK
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 3737 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 3747 of file qtextengine.cpp.

Member Function Documentation

◆ initWithScriptItem()

void QTextItemInt::initWithScriptItem ( const QScriptItem si)

Definition at line 3758 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 3785 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

◆ charFormat

const QTextCharFormat QTextItemInt::charFormat

◆ chars

◆ descent

◆ f

const QFont* QTextItemInt::f = nullptr

Definition at line 291 of file qtextengine_p.h.

Referenced by draw_text_item_win(), and QTextItem::font().

◆ flags

◆ fontEngine

◆ glyphs

◆ 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 QPainter::drawText(), QPdfEnginePrivate::drawTextItem(), and midItem().

◆ num_chars

◆ underlineStyle

Definition at line 286 of file qtextengine_p.h.

Referenced by QPainterPrivate::drawTextItem(), and initWithScriptItem().

◆ width


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