[][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 copy_from(
    &mut self,
    it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> MutRef<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_postfix(
    &mut 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_postfix(
    &mut 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 from_q_tree_widget_q_flags_iterator_flag(
    widget: impl CastInto<MutPtr<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<MutPtr<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<MutPtr<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<MutPtr<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.

Trait Implementations

impl AddAssign<i32> for QTreeWidgetItemIterator[src]

fn add_assign(&mut self, n: c_int)[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.

impl SubAssign<i32> for QTreeWidgetItemIterator[src]

fn sub_assign(&mut self, n: c_int)[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.

impl CppDeletable for QTreeWidgetItemIterator[src]

unsafe fn delete(&mut self)[src]

Destroys the iterator.

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

C++ documentation:

Destroys the iterator.

impl<'_> Decrement for &'_ mut QTreeWidgetItemIterator[src]

type Output = MutRef<QTreeWidgetItemIterator>

Output type.

fn dec(self) -> MutRef<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<'_> Indirection for &'_ QTreeWidgetItemIterator[src]

type Output = MutPtr<QTreeWidgetItem>

Output type.

fn indirection(self) -> MutPtr<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.

impl<'_> Increment for &'_ mut QTreeWidgetItemIterator[src]

type Output = MutRef<QTreeWidgetItemIterator>

Output type.

fn inc(self) -> MutRef<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.

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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.

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

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

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

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

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