- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Friends

# QTextLine Class Reference

Search for all occurrences

## Detailed Description

Definition at line 186 of file qtextlayout.h.

`#include <qtextlayout.h>`

List of all members.

## 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

## Member Enumeration Documentation

enum Edge

Search for all occurrences

Enumerator:

  Leading | Search for all occurrences
  Trailing | Search for all occurrences

Definition at line 208 of file qtextlayout.h.

                  {
            Leading,
            Trailing
        };

enum CursorPosition

Search for all occurrences

Enumerator:

  CursorBetweenCharacters | Search for all occurrences
  CursorOnCharacter | Search for all occurrences

Definition at line 212 of file qtextlayout.h.

                            {
            CursorBetweenCharacters,
            CursorOnCharacter
        };

## Constructor & Destructor Documentation

QTextLine | ( |  | ) | `[inline]`

Definition at line 189 of file qtextlayout.h.

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

## Member Function Documentation

bool isValid | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 190 of file qtextlayout.h.

    { return eng; }

QRectF rect | ( |  | ) | const

Search for all occurrences

qreal x | ( |  | ) | const

Search for all occurrences

qreal y | ( |  | ) | const

Search for all occurrences

qreal width | ( |  | ) | const

Search for all occurrences

qreal ascent | ( |  | ) | const

Search for all occurrences

qreal descent | ( |  | ) | const

Search for all occurrences

qreal height | ( |  | ) | const

Search for all occurrences

qreal leading | ( |  | ) | const

Search for all occurrences

void setLeadingIncluded | ( | bool | included | ) |

Search for all occurrences

bool leadingIncluded | ( |  | ) | const

Search for all occurrences

qreal naturalTextWidth | ( |  | ) | const

Search for all occurrences

qreal horizontalAdvance | ( |  | ) | const

Search for all occurrences

QRectF naturalTextRect | ( |  | ) | const

Search for all occurrences

qreal cursorToX | ( | int * | cursorPos,
|  | Edge | edge = `Leading`
| ) |  | const

Search for all occurrences

qreal cursorToX | ( | int | cursorPos,
|  | Edge | edge = `Leading`
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 219 of file qtextlayout.h.

    { return cursorToX(&cursorPos, edge); }

int xToCursor | ( | qreal | x,
|  | CursorPosition | = `CursorBetweenCharacters`
| ) |  | const

Search for all occurrences

void setLineWidth | ( | qreal | width | ) |

Search for all occurrences

void setNumColumns | ( | int | columns | ) |

Search for all occurrences

void setNumColumns | ( | int | columns,
|  | qreal | alignmentWidth
| ) |  |

Search for all occurrences

void setPosition | ( | const QPointF & | pos | ) |

Search for all occurrences

QPointF position | ( |  | ) | const

Search for all occurrences

int textStart | ( |  | ) | const

Search for all occurrences

int textLength | ( |  | ) | const

Search for all occurrences

int lineNumber | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 232 of file qtextlayout.h.

    { return i; }

void draw | ( | QPainter * | p,
|  | const QPointF & | point,
|  | const QTextLayout::FormatRange * | selection = `0`
| ) |  | const

Search for all occurrences

## Friends And Related Function Documentation

friend class QTextLayout `[friend]`

Search for all occurrences

Definition at line 239 of file qtextlayout.h.

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

- QtGui/qtextlayout.h

QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine
QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine QTextLine