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

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Friends

# QTextBlock Class Reference

Search for all occurrences

## Detailed Description

Definition at line 198 of file qtextobject.h.

`#include <qtextobject.h>`

List of all members.

## Classes
class | iterator
## Public Types
typedef iterator | Iterator
## Public Member Functions
| QTextBlock (QTextDocumentPrivate *priv, int b)
| QTextBlock ()
| QTextBlock (const QTextBlock &o)
QTextBlock & | operator= (const QTextBlock &o)
bool | isValid () const
bool | operator== (const QTextBlock &o) const
bool | operator!= (const QTextBlock &o) const
bool | operator< (const QTextBlock &o) const
int | position () const
int | length () const
bool | contains (int position) const
QTextLayout * | layout () const
void | clearLayout ()
QTextBlockFormat | blockFormat () const
int | blockFormatIndex () const
QTextCharFormat | charFormat () const
int | charFormatIndex () const
Qt::LayoutDirection | textDirection () const
QString | text () const
const QTextDocument * | document () const
QTextList * | textList () const
QTextBlockUserData * | userData () const
void | setUserData (QTextBlockUserData *data)
int | userState () const
void | setUserState (int state)
int | revision () const
void | setRevision (int rev)
bool | isVisible () const
void | setVisible (bool visible)
int | blockNumber () const
int | firstLineNumber () const
void | setLineCount (int count)
int | lineCount () const
iterator | begin () const
iterator | end () const
QTextBlock | next () const
QTextBlock | previous () const
QTextDocumentPrivate * | docHandle () const
int | fragmentIndex () const
## Friends
class | QSyntaxHighlighter
class | QTextDocumentPrivate
class | QTextLayout

## Member Typedef Documentation

typedef iterator Iterator

Search for all occurrences

Definition at line 274 of file qtextobject.h.

## Constructor & Destructor Documentation

QTextBlock | ( | QTextDocumentPrivate * | priv,
|  | int | b
| ) |  | `[inline]`

Definition at line 202 of file qtextobject.h.

    : p(priv), n(b) {}

QTextBlock | ( |  | ) | `[inline]`

Definition at line 203 of file qtextobject.h.

    : p(0), n(0) {}

QTextBlock | ( | const QTextBlock & | o | ) | `[inline]`

Definition at line 204 of file qtextobject.h.

    : p(o.p), n(o.n) {}

## Member Function Documentation

QTextBlock& operator= | ( | const QTextBlock & | o | ) | `[inline]`

Definition at line 205 of file qtextobject.h.

    { p = o.p; n = o.n; return *this; }

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

Search for all occurrences

Definition at line 207 of file qtextobject.h.

    { return p != 0 && n != 0; }

bool operator== | ( | const QTextBlock & | o | ) | const `[inline]`

Definition at line 209 of file qtextobject.h.

    { return p == o.p && n == o.n; }

bool operator!= | ( | const QTextBlock & | o | ) | const `[inline]`

Definition at line 210 of file qtextobject.h.

    { return p != o.p || n != o.n; }

bool operator< | ( | const QTextBlock & | o | ) | const `[inline]`

Definition at line 211 of file qtextobject.h.

    { return position() < o.position(); }

int position | ( |  | ) | const

Search for all occurrences

int length | ( |  | ) | const

Search for all occurrences

bool contains | ( | int | position | ) | const

Search for all occurrences

QTextLayout* layout | ( |  | ) | const

Search for all occurrences

void clearLayout | ( |  | ) |

Search for all occurrences

QTextBlockFormat blockFormat | ( |  | ) | const

Search for all occurrences

int blockFormatIndex | ( |  | ) | const

Search for all occurrences

QTextCharFormat charFormat | ( |  | ) | const

Search for all occurrences

int charFormatIndex | ( |  | ) | const

Search for all occurrences

Qt::LayoutDirection textDirection | ( |  | ) | const

Search for all occurrences

QString text | ( |  | ) | const

Search for all occurrences

const QTextDocument* document | ( |  | ) | const

Search for all occurrences

QTextList* textList | ( |  | ) | const

Search for all occurrences

QTextBlockUserData* userData | ( |  | ) | const

Search for all occurrences

void setUserData | ( | QTextBlockUserData * | data | ) |

Search for all occurrences

int userState | ( |  | ) | const

Search for all occurrences

void setUserState | ( | int | state | ) |

Search for all occurrences

int revision | ( |  | ) | const

Search for all occurrences

void setRevision | ( | int | rev | ) |

Search for all occurrences

bool isVisible | ( |  | ) | const

Search for all occurrences

void setVisible | ( | bool | visible | ) |

Search for all occurrences

int blockNumber | ( |  | ) | const

Search for all occurrences

int firstLineNumber | ( |  | ) | const

Search for all occurrences

void setLineCount | ( | int | count | ) |

Search for all occurrences

int lineCount | ( |  | ) | const

Search for all occurrences

iterator begin | ( |  | ) | const

Search for all occurrences

iterator end | ( |  | ) | const

Search for all occurrences

QTextBlock next | ( |  | ) | const

Search for all occurrences

QTextBlock previous | ( |  | ) | const

Search for all occurrences

QTextDocumentPrivate* docHandle | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 282 of file qtextobject.h.

    { return p; }

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

Search for all occurrences

Definition at line 283 of file qtextobject.h.

    { return n; }

## Friends And Related Function Documentation

friend class QSyntaxHighlighter `[friend]`

Search for all occurrences

Definition at line 200 of file qtextobject.h.

friend class QTextDocumentPrivate `[friend]`

Search for all occurrences

Definition at line 288 of file qtextobject.h.

friend class QTextLayout `[friend]`

Search for all occurrences

Definition at line 289 of file qtextobject.h.

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

- QtGui/qtextobject.h

QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock
QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock QTextBlock