|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QTreeWidgetItemIterator
public class QTreeWidgetItemIterator
The QTreeWidgetItemIterator class provides a way to iterate over the items in a QTreeWidget instance.
The iterator will walk the items in a pre-order traversal order, thus visiting the parent node before it continues to the child nodes.
For example, the following code examples each item in a tree, checking the text in the first column against a user-specified search string:
QTreeWidgetItemIterator it(treeWidget); while (*it) { if ((*it)->text(0) == itemText) treeWidget->setItemSelected(*it, true); ++it; }
It is also possible to filter out certain types of node by passing certain flags to the constructor of QTreeWidgetItemIterator.
Nested Class Summary | |
---|---|
static class |
QTreeWidgetItemIterator.IteratorFlag
These flags can be passed to a QTreeWidgetItemIterator constructor (OR-ed together if more than one is used), so that the iterator will only iterate over items that match the given flags. |
static class |
QTreeWidgetItemIterator.IteratorFlags
This QFlag class provides flags for the int enum. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QTreeWidgetItemIterator(QTreeWidget widget)
Equivalent to QTreeWidgetItemIterator(widget, All). |
|
QTreeWidgetItemIterator(QTreeWidgetItem item)
Equivalent to QTreeWidgetItemIterator(item, All). |
|
QTreeWidgetItemIterator(QTreeWidgetItemIterator it)
Constructs an iterator for the same QTreeWidget as it. |
|
QTreeWidgetItemIterator(QTreeWidgetItem item,
QTreeWidgetItemIterator.IteratorFlags flags)
Constructs an iterator for the given item that uses the specified flags to determine which items are found during iteration. |
|
QTreeWidgetItemIterator(QTreeWidget widget,
QTreeWidgetItemIterator.IteratorFlags flags)
Constructs an iterator for the given widget that uses the specified flags to determine which items are found during iteration. |
Method Summary | |
---|---|
QTreeWidgetItem |
current()
Returns the current item. |
static QTreeWidgetItemIterator |
fromNativePointer(QNativePointer nativePointer)
This function returns the QTreeWidgetItemIterator instance pointed to by nativePointer |
static QNativePointer |
nativePointerArray(QTreeWidgetItemIterator[] array)
This function returns a QNativePointer that is pointing to the specified QTreeWidgetItemIterator array. |
void |
next()
Advances the iterator by one item. |
void |
next(int i)
This function advances the iterator by i items. |
void |
previous()
Makes the iterator go backwards by one item. |
void |
previous(int i)
Makes the iterator go backwards by i items. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QTreeWidgetItemIterator(QTreeWidgetItemIterator it)
Constructs an iterator for the same QTreeWidget as it. The current iterator item is set to point on the current item of it.
public QTreeWidgetItemIterator(QTreeWidget widget)
Equivalent to QTreeWidgetItemIterator(widget, All).
public QTreeWidgetItemIterator(QTreeWidget widget, QTreeWidgetItemIterator.IteratorFlags flags)
Constructs an iterator for the given widget that uses the specified flags to determine which items are found during iteration. The iterator is set to point to the first top-level item contained in the widget, or the next matching item if the top-level item doesn't match the flags.
public QTreeWidgetItemIterator(QTreeWidgetItem item)
Equivalent to QTreeWidgetItemIterator(item, All).
public QTreeWidgetItemIterator(QTreeWidgetItem item, QTreeWidgetItemIterator.IteratorFlags flags)
Constructs an iterator for the given item that uses the specified flags to determine which items are found during iteration. The iterator is set to point to item, or the next matching item if item doesn't match the flags.
Method Detail |
---|
public static QTreeWidgetItemIterator fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QTreeWidgetItemIterator[] array)
array
- the array that the returned pointer will point to.
public final void next(int i)
public final void previous(int i)
public final void next()
public final void previous()
public final QTreeWidgetItem current()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |