Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QTreeWidgetItemIterator

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.gui.QTreeWidgetItemIterator

All Implemented Interfaces:
  QtJambiInterface

    public class QTreeWidgetItemIterator

extends QtJambiObject

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`.

See Also:
  `QTreeWidget`, Model/View Programming, `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` This QFlag class provides flags for the int enum.

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, 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

### QTreeWidgetItemIterator

    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`.

### QTreeWidgetItemIterator

    public QTreeWidgetItemIterator(QTreeWidget widget)

  Equivalent to `QTreeWidgetItemIterator`(`widget`, All).

### QTreeWidgetItemIterator

    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.

  See Also:
    `QTreeWidgetItemIterator::IteratorFlag`

### QTreeWidgetItemIterator

    public QTreeWidgetItemIterator(QTreeWidgetItem item)

  Equivalent to `QTreeWidgetItemIterator`(`item`, All).

### QTreeWidgetItemIterator

    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.

  See Also:
    `QTreeWidgetItemIterator::IteratorFlag`

Method Detail

### fromNativePointer

    public static QTreeWidgetItemIterator fromNativePointer(QNativePointer nativePointer)

  This function returns the QTreeWidgetItemIterator instance pointed to by nativePointer

  Parameters:
    `nativePointer` - the QNativePointer of which object should be returned.

### nativePointerArray

    public static QNativePointer nativePointerArray(QTreeWidgetItemIterator[] array)

  This function returns a QNativePointer that is pointing to the specified QTreeWidgetItemIterator array.

  Parameters:
    `array` - the array that the returned pointer will point to.
  Returns:
    a QNativePointer that is pointing to the specified array.

### next

    public final void next(int i)

  This function advances the iterator by `i` items.

### previous

    public final void previous(int i)

  Makes the iterator go backwards by `i` items.

### next

    public final void next()

  Advances the iterator by one item.

### previous

    public final void previous()

  Makes the iterator go backwards by one item.

### current

    public final QTreeWidgetItem current()

  Returns the current item.

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD