The QTextBlockGroup class provides a container for text blocks within a QTextDocument. More...
#include <QTextBlockGroup>
Inherits: QTextObject.
Inherited by: QTextList.
Note: All functions in this class are reentrant.
QTextBlockGroup ( QTextDocument * document ) | |
~QTextBlockGroup () | |
virtual void | blockFormatChanged ( const QTextBlock & block ) |
virtual void | blockInserted ( const QTextBlock & block ) |
QList<QTextBlock> | blockList () const |
virtual void | blockRemoved ( const QTextBlock & block ) |
The QTextBlockGroup class provides a container for text blocks within a QTextDocument.
Block groups can be used to organize blocks of text within a document. They maintain an up-to-date list of the text blocks that belong to them, even when text blocks are being edited.
Each group has a parent document which is specified when the group is constructed.
Text blocks can be inserted into a group with blockInserted(), and removed with blockRemoved(). If a block's format is changed, blockFormatChanged() is called.
The list of blocks in the group is returned by blockList(). Note that the blocks in the list are not necessarily adjacent elements in the document; for example, the top-level items in a multi-level list will be separated by the items in lower levels of the list.
See also QTextBlock and QTextDocument.
Creates a new new block group for the given document.
Warning: This function should only be called from QTextDocument::createObject().
Destroys this block group; the blocks are not deleted, they simply don't belong to this block anymore.
This function is called whenever the specified block of text is changed. The text block is a member of this group.
The base class implementation does nothing.
Appends the given block to the end of the group.
Warning: If you reimplement this function you must call the base class implementation.
Returns a (possibly empty) list of all the blocks that are part of the block group.
Removes the given block from the group; the block itself is not deleted, it simply isn't a member of this group anymore.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.