com.trolltech.qt.gui
Class QTextBlockGroup

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.core.QObject
                  extended by com.trolltech.qt.gui.QTextObject
                      extended by com.trolltech.qt.gui.QTextBlockGroup
All Implemented Interfaces:
QtJambiInterface
Direct Known Subclasses:
QTextList

public class QTextBlockGroup
extends QTextObject

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
protected QTextBlockGroup(QTextDocument doc)
          Creates a new new block group for the given document.
 
Method Summary
protected  void blockFormatChanged(QTextBlock block)
          This function is called whenever the specified block of text is changed.
protected  void blockInserted(QTextBlock block)
          Appends the given block to the end of the group.
protected  java.util.List blockList()
          Returns a (possibly empty) list of all the blocks that are part of the block group.
protected  void blockRemoved(QTextBlock block)
          Removes the given block from the group; the block itself is not deleted, it simply isn't a member of this group anymore.
 
Methods inherited from class com.trolltech.qt.gui.QTextObject
document, format, formatIndex, objectIndex, setFormat
 
Methods inherited from class com.trolltech.qt.core.QObject
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QTextBlockGroup

protected QTextBlockGroup(QTextDocument doc)
Creates a new new block group for the given document.

Warning: This function should only be called from QTextDocument::createObject().

Method Detail

blockList

protected final java.util.List blockList()
Returns a (possibly empty) list of all the blocks that are part of the block group.


blockFormatChanged

protected void blockFormatChanged(QTextBlock block)
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.


blockInserted

protected void blockInserted(QTextBlock block)
Appends the given block to the end of the group.

Warning: If you reimplement this function you must call the base class implementation.


blockRemoved

protected void blockRemoved(QTextBlock block)
Removes the given block from the group; the block itself is not deleted, it simply isn't a member of this group anymore.