QTextLine Class Reference

QTextLine Class Reference

#include <qtextlayout.h>

Class Description

Definition at line 197 of file qtextlayout.h.

Public Types

enum  Edge { Leading, Trailing }
 
enum  CursorPosition { CursorBetweenCharacters, CursorOnCharacter }
 

Public Member Functions

 QTextLine ()
 
bool isValid () const
 
QRectF rect () const
 
qreal x () const
 
qreal y () const
 
qreal width () const
 
qreal ascent () const
 
qreal descent () const
 
qreal height () const
 
qreal leading () const
 
void setLeadingIncluded (bool included)
 
bool leadingIncluded () const
 
qreal naturalTextWidth () const
 
qreal horizontalAdvance () const
 
QRectF naturalTextRect () const
 
qreal cursorToX (int *cursorPos, Edge edge=Leading) const
 
qreal cursorToX (int cursorPos, Edge edge=Leading) const
 
int xToCursor (qreal x, CursorPosition=CursorBetweenCharacters) const
 
void setLineWidth (qreal width)
 
void setNumColumns (int columns)
 
void setNumColumns (int columns, qreal alignmentWidth)
 
void setPosition (const QPointF &pos)
 
QPointF position () const
 
int textStart () const
 
int textLength () const
 
int lineNumber () const
 
void draw (QPainter *p, const QPointF &point, const QTextLayout::FormatRange *selection=0) const
 

Friends

class QTextLayout
 
class QTextFragment
 

Member Enumeration Documentation

enum Edge
Enumerator
Leading 
Trailing 

Definition at line 219 of file qtextlayout.h.

219  {
220  Leading,
221  Trailing
222  };
Enumerator
CursorBetweenCharacters 
CursorOnCharacter 

Definition at line 223 of file qtextlayout.h.

Constructor & Destructor Documentation

QTextLine ( )
inline

Definition at line 200 of file qtextlayout.h.

200 : i(0), eng(0) {}

Member Function Documentation

bool isValid ( ) const
inline

Definition at line 201 of file qtextlayout.h.

201 { return eng; }
QRectF rect ( ) const
qreal x ( ) const
qreal y ( ) const
qreal width ( ) const
qreal ascent ( ) const
qreal descent ( ) const
qreal height ( ) const
qreal leading ( ) const
void setLeadingIncluded ( bool  included)
bool leadingIncluded ( ) const
qreal naturalTextWidth ( ) const
qreal horizontalAdvance ( ) const
QRectF naturalTextRect ( ) const
qreal cursorToX ( int cursorPos,
Edge  edge = Leading 
) const
qreal cursorToX ( int  cursorPos,
Edge  edge = Leading 
) const
inline

Definition at line 230 of file qtextlayout.h.

230 { return cursorToX(&cursorPos, edge); }
qreal cursorToX(int *cursorPos, Edge edge=Leading) const
int xToCursor ( qreal  x,
CursorPosition  = CursorBetweenCharacters 
) const
void setLineWidth ( qreal  width)
void setNumColumns ( int  columns)
void setNumColumns ( int  columns,
qreal  alignmentWidth 
)
void setPosition ( const QPointF pos)
QPointF position ( ) const
int textStart ( ) const
int textLength ( ) const
int lineNumber ( ) const
inline

Definition at line 243 of file qtextlayout.h.

243 { return i; }
void draw ( QPainter p,
const QPointF point,
const QTextLayout::FormatRange selection = 0 
) const

Friends And Related Function Documentation

friend class QTextLayout
friend

Definition at line 255 of file qtextlayout.h.

friend class QTextFragment
friend

Definition at line 256 of file qtextlayout.h.


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