Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QTextObject Class

The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together. More...

 #include <QTextObject>

Inherits: QObject.

Inherited by: QTextBlockGroup and QTextFrame.

Note: All functions in this class are reentrant.

Public Functions

QTextDocument * document() const
QTextFormat format() const
int formatIndex() const
int objectIndex() const
  • 31 public functions inherited from QObject

Protected Functions

QTextObject(QTextDocument * document)
~QTextObject()
void setFormat(const QTextFormat & format)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 2 signal inherited from QObject
  • 11 static public members inherited from QObject

Detailed Description

The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together.

The common grouping text objects are lists (QTextList), frames (QTextFrame), and tables (QTextTable). A text object has an associated format() and document().

There are essentially two kinds of text objects: those that are used with blocks (block formats), and those that are used with characters (character formats). The first kind are derived from QTextBlockGroup, and the second kind from QTextFrame.

You rarely need to use this class directly. When creating custom text objects, you will also need to reimplement QTextDocument::createObject() which acts as a factory method for creating text objects.

See also QTextDocument and Text Object Example.

Member Function Documentation

QTextObject::QTextObject(QTextDocument * document) [protected]

Creates a new QTextObject for the given document.

Warning: This function should never be called directly, but only from QTextDocument::createObject().

QTextObject::~QTextObject() [protected]

Destroys the text object.

Warning: Text objects are owned by the document, so you should never destroy them yourself.

QTextDocument * QTextObject::document() const

Returns the document this object belongs to.

See also format().

QTextFormat QTextObject::format() const

Returns the text object's format.

See also setFormat() and document().

int QTextObject::formatIndex() const

Returns the index of the object's format in the document's internal list of formats.

See also QTextDocument::allFormats().

int QTextObject::objectIndex() const

Returns the object index of this object. This can be used together with QTextFormat::setObjectIndex().

void QTextObject::setFormat(const QTextFormat & format) [protected]

Sets the text object's format.

See also format().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web