#[repr(C)]pub struct QTreeWidgetItemIterator { /* private fields */ }
Expand description
The QTreeWidgetItemIterator class provides a way to iterate over the items in a QTreeWidget instance.
C++ 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) (*it)->setSelected(true); ++it; }
It is also possible to filter out certain types of node by passing certain flags to the constructor of QTreeWidgetItemIterator.
Implementations§
Source§impl QTreeWidgetItemIterator
impl QTreeWidgetItemIterator
Sourcepub unsafe fn add_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>
pub unsafe fn add_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>
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)
.
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.
Sourcepub unsafe fn copy_from(
&self,
it: impl CastInto<Ref<QTreeWidgetItemIterator>>,
) -> Ref<QTreeWidgetItemIterator>
pub unsafe fn copy_from( &self, it: impl CastInto<Ref<QTreeWidgetItemIterator>>, ) -> Ref<QTreeWidgetItemIterator>
Assignment. Makes a copy of it and returns a reference to its iterator.
Calls C++ function: QTreeWidgetItemIterator& QTreeWidgetItemIterator::operator=(const QTreeWidgetItemIterator& it)
.
Assignment. Makes a copy of it and returns a reference to its iterator.
Sourcepub unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>
pub unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>
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--()
.
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.
Sourcepub unsafe fn dec_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn dec_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>
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)
.
The postfix – operator (it–) makes the preceding matching item current and returns an iterator to the previously current item.
Sourcepub unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>
pub unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>
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++()
.
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.
Sourcepub unsafe fn inc_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn inc_postfix(&self, arg1: c_int) -> CppBox<QTreeWidgetItemIterator>
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)
.
The postfix ++ operator (it++) advances the iterator to the next matching item and returns an iterator to the previously current item.
Sourcepub unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>
pub unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>
Dereference operator. Returns a pointer to the current item.
Calls C++ function: QTreeWidgetItem* QTreeWidgetItemIterator::operator*() const
.
Dereference operator. Returns a pointer to the current item.
Sourcepub unsafe fn from_q_tree_widget_q_flags_iterator_flag(
widget: impl CastInto<Ptr<QTreeWidget>>,
flags: QFlags<IteratorFlag>,
) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn from_q_tree_widget_q_flags_iterator_flag( widget: impl CastInto<Ptr<QTreeWidget>>, flags: QFlags<IteratorFlag>, ) -> CppBox<QTreeWidgetItemIterator>
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 = …)
.
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.
Sourcepub unsafe fn from_q_tree_widget_item_q_flags_iterator_flag(
item: impl CastInto<Ptr<QTreeWidgetItem>>,
flags: QFlags<IteratorFlag>,
) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn from_q_tree_widget_item_q_flags_iterator_flag( item: impl CastInto<Ptr<QTreeWidgetItem>>, flags: QFlags<IteratorFlag>, ) -> CppBox<QTreeWidgetItemIterator>
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 = …)
.
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.
Sourcepub unsafe fn from_q_tree_widget(
widget: impl CastInto<Ptr<QTreeWidget>>,
) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn from_q_tree_widget( widget: impl CastInto<Ptr<QTreeWidget>>, ) -> CppBox<QTreeWidgetItemIterator>
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)
.
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.
Sourcepub unsafe fn from_q_tree_widget_item(
item: impl CastInto<Ptr<QTreeWidgetItem>>,
) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn from_q_tree_widget_item( item: impl CastInto<Ptr<QTreeWidgetItem>>, ) -> CppBox<QTreeWidgetItemIterator>
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)
.
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.
Sourcepub unsafe fn new_copy(
it: impl CastInto<Ref<QTreeWidgetItemIterator>>,
) -> CppBox<QTreeWidgetItemIterator>
pub unsafe fn new_copy( it: impl CastInto<Ref<QTreeWidgetItemIterator>>, ) -> CppBox<QTreeWidgetItemIterator>
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)
.
Constructs an iterator for the same QTreeWidget as it. The current iterator item is set to point on the current item of it.
Sourcepub unsafe fn sub_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>
pub unsafe fn sub_assign(&self, n: c_int) -> Ref<QTreeWidgetItemIterator>
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)
.
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§
Source§impl CppDeletable for QTreeWidgetItemIterator
impl CppDeletable for QTreeWidgetItemIterator
Source§impl Decrement for QTreeWidgetItemIterator
impl Decrement for QTreeWidgetItemIterator
Source§unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>
unsafe fn dec(&self) -> Ref<QTreeWidgetItemIterator>
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--()
.
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.
Source§type Output = Ref<QTreeWidgetItemIterator>
type Output = Ref<QTreeWidgetItemIterator>
Source§impl Increment for QTreeWidgetItemIterator
impl Increment for QTreeWidgetItemIterator
Source§unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>
unsafe fn inc(&self) -> Ref<QTreeWidgetItemIterator>
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++()
.
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.
Source§type Output = Ref<QTreeWidgetItemIterator>
type Output = Ref<QTreeWidgetItemIterator>
Source§impl Indirection for QTreeWidgetItemIterator
impl Indirection for QTreeWidgetItemIterator
Source§unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>
unsafe fn indirection(&self) -> Ptr<QTreeWidgetItem>
Dereference operator. Returns a pointer to the current item.
Calls C++ function: QTreeWidgetItem* QTreeWidgetItemIterator::operator*() const
.
Dereference operator. Returns a pointer to the current item.