[][src]Struct qt_widgets::QTreeWidgetItemIterator

#[repr(C)]pub struct QTreeWidgetItemIterator { /* fields omitted */ }

The QTreeWidgetItemIterator class provides a way to iterate over the items in a QTreeWidget instance.

C++ class: QTreeWidgetItemIterator.

C++ documentation:

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) (*it)->setSelected(true); ++it; }

It is also possible to filter out certain types of node by passing certain flags to the constructor of QTreeWidgetItemIterator.

Methods

impl QTreeWidgetItemIterator[src]

pub unsafe fn add_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>[src]

Makes the iterator go forward by n matching items. (If n is negative, the iterator goes backward.)

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator+=(int n).

C++ documentation:

Makes the iterator go forward by n matching items. (If n is negative, the iterator goes backward.)

If the current item is beyond the last item, the current item pointer is set to 0. Returns the resulting iterator.

pub unsafe fn copy_from(
    &self,
    it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> Ref<QTreeWidgetItemIterator>
[src]

Assignment. Makes a copy of it and returns a reference to its iterator.

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator=(const QTreeWidgetItemIterator& it).

C++ documentation:

Assignment. Makes a copy of it and returns a reference to its iterator.

pub unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>[src]

The prefix -- operator (--it) advances the iterator to the previous matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the first matching item.

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator--().

C++ documentation:

The prefix -- operator (--it) advances the iterator to the previous matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the first matching item.

pub unsafe fn dec_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>[src]

The postfix -- operator (it--) makes the preceding matching item current and returns an iterator to the previously current item.

Calls C++ function: QTreeWidgetItemIterator QTreeWidgetItemIterator::operator--(int arg1).

C++ documentation:

The postfix -- operator (it--) makes the preceding matching item current and returns an iterator to the previously current item.

pub unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>[src]

The prefix ++ operator (++it) advances the iterator to the next matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the last matching item.

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator++().

C++ documentation:

The prefix ++ operator (++it) advances the iterator to the next matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the last matching item.

pub unsafe fn inc_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>[src]

The postfix ++ operator (it++) advances the iterator to the next matching item and returns an iterator to the previously current item.

Calls C++ function: QTreeWidgetItemIterator QTreeWidgetItemIterator::operator++(int arg1).

C++ documentation:

The postfix ++ operator (it++) advances the iterator to the next matching item and returns an iterator to the previously current item.

pub unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>[src]

Dereference operator. Returns a pointer to the current item.

Calls C++ function: QTreeWidgetItem* QTreeWidgetItemIterator::operator*() const.

C++ documentation:

Dereference operator. Returns a pointer to the current item.

pub unsafe fn from_q_tree_widget_q_flags_iterator_flag(
    widget: impl CastInto<Ptr<QTreeWidget>>,
    flags: QFlags<IteratorFlag>
) -> CppBox<QTreeWidgetItemIterator>
[src]

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.

Calls C++ function: [constructor] void QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidget* widget, QFlags<QTreeWidgetItemIterator::IteratorFlag> flags = …).

C++ documentation:

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.

pub unsafe fn from_q_tree_widget_item_q_flags_iterator_flag(
    item: impl CastInto<Ptr<QTreeWidgetItem>>,
    flags: QFlags<IteratorFlag>
) -> CppBox<QTreeWidgetItemIterator>
[src]

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.

Calls C++ function: [constructor] void QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidgetItem* item, QFlags<QTreeWidgetItemIterator::IteratorFlag> flags = …).

C++ documentation:

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.

pub unsafe fn from_q_tree_widget(
    widget: impl CastInto<Ptr<QTreeWidget>>
) -> CppBox<QTreeWidgetItemIterator>
[src]

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.

Calls C++ function: [constructor] void QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidget* widget).

C++ documentation:

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.

pub unsafe fn from_q_tree_widget_item(
    item: impl CastInto<Ptr<QTreeWidgetItem>>
) -> CppBox<QTreeWidgetItemIterator>
[src]

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.

Calls C++ function: [constructor] void QTreeWidgetItemIterator::QTreeWidgetItemIterator(QTreeWidgetItem* item).

C++ documentation:

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.

pub unsafe fn new_copy(
    it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> CppBox<QTreeWidgetItemIterator>
[src]

Constructs an iterator for the same QTreeWidget as it. The current iterator item is set to point on the current item of it.

Calls C++ function: [constructor] void QTreeWidgetItemIterator::QTreeWidgetItemIterator(const QTreeWidgetItemIterator& it).

C++ documentation:

Constructs an iterator for the same QTreeWidget as it. The current iterator item is set to point on the current item of it.

pub unsafe fn sub_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>[src]

Makes the iterator go backward by n matching items. (If n is negative, the iterator goes forward.)

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator-=(int n).

C++ documentation:

Makes the iterator go backward by n matching items. (If n is negative, the iterator goes forward.)

If the current item is ahead of the last item, the current item pointer is set to 0. Returns the resulting iterator.

Trait Implementations

impl CppDeletable for QTreeWidgetItemIterator[src]

unsafe fn delete(&self)[src]

Destroys the iterator.

Calls C++ function: [destructor] void QTreeWidgetItemIterator::~QTreeWidgetItemIterator().

C++ documentation:

Destroys the iterator.

impl Decrement for QTreeWidgetItemIterator[src]

type Output = Ref<QTreeWidgetItemIterator>

Output type.

unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>[src]

The prefix -- operator (--it) advances the iterator to the previous matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the first matching item.

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator--().

C++ documentation:

The prefix -- operator (--it) advances the iterator to the previous matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the first matching item.

impl Increment for QTreeWidgetItemIterator[src]

type Output = Ref<QTreeWidgetItemIterator>

Output type.

unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>[src]

The prefix ++ operator (++it) advances the iterator to the next matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the last matching item.

Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator++().

C++ documentation:

The prefix ++ operator (++it) advances the iterator to the next matching item and returns a reference to the resulting iterator. Sets the current pointer to 0 if the current item is the last matching item.

impl Indirection for QTreeWidgetItemIterator[src]

type Output = Ptr<QTreeWidgetItem>

Output type.

unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>[src]

Dereference operator. Returns a pointer to the current item.

Calls C++ function: QTreeWidgetItem* QTreeWidgetItemIterator::operator*() const.

C++ documentation:

Dereference operator. Returns a pointer to the current item.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.