|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.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 = new QTreeWidgetItemIterator(treeWidget); while (it.current() != null) { if (it.current().text(0).equals(itemText)) treeWidget.setItemSelected(it, true); it.next(); }It is also possible to filter out certain types of node by passing certain
flags
to the constructor of QTreeWidgetItemIterator. QTreeWidget
, Model/View Programming, and QTreeWidgetItem
.
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
|
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 | |
---|---|
QTreeWidgetItemIterator(QTreeWidget widget)
Constructs an iterator for the given widget that uses the specified flags to determine which items are found during iteration. |
|
QTreeWidgetItemIterator(QTreeWidgetItem item)
Constructs an iterator for the given item that uses the specified flags to determine which items are found during iteration. |
|
QTreeWidgetItemIterator(QTreeWidgetItemIterator it)
Constructs an iterator for the same QTreeWidget as it. |
|
QTreeWidgetItemIterator(QTreeWidgetItem item,
QTreeWidgetItemIterator.IteratorFlag[] flags)
This is an overloaded method provided for convenience. |
|
QTreeWidgetItemIterator(QTreeWidgetItem item,
QTreeWidgetItemIterator.IteratorFlags flags)
Constructs an iterator for the given widget that uses the specified flags to determine which items are found during iteration. |
|
QTreeWidgetItemIterator(QTreeWidget widget,
QTreeWidgetItemIterator.IteratorFlag[] flags)
|
|
QTreeWidgetItemIterator(QTreeWidget widget,
QTreeWidgetItemIterator.IteratorFlags flags)
|
Method Summary | |
---|---|
QTreeWidgetItemIterator |
clone()
This method is reimplemented for internal reasons |
QTreeWidgetItem |
current()
Returns the current item. |
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, 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 |
---|
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(QTreeWidget widget, QTreeWidgetItemIterator.IteratorFlag[] flags)
public QTreeWidgetItemIterator(QTreeWidget widget)
QTreeWidgetItemIterator::IteratorFlag
.
public QTreeWidgetItemIterator(QTreeWidget widget, QTreeWidgetItemIterator.IteratorFlags flags)
public QTreeWidgetItemIterator(QTreeWidgetItem item, QTreeWidgetItemIterator.IteratorFlag[] flags)
public QTreeWidgetItemIterator(QTreeWidgetItem item)
QTreeWidgetItemIterator::IteratorFlag
.
public QTreeWidgetItemIterator(QTreeWidgetItem item, QTreeWidgetItemIterator.IteratorFlags flags)
QTreeWidgetItemIterator::IteratorFlag
.
public QTreeWidgetItemIterator(QTreeWidgetItemIterator it)
QTreeWidget
as it. The current iterator item is set to point on the current item of it.
Method Detail |
---|
public final void next(int i)
public final void previous(int i)
public final void next()
public final void previous()
public final QTreeWidgetItem current()
public QTreeWidgetItemIterator clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |