[−][src]Struct qt_widgets::QTreeWidgetItemIterator
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.
Methods
impl QTreeWidgetItemIterator
[src]
pub unsafe fn copy_from(
&mut self,
it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> MutRef<QTreeWidgetItemIterator>
[src]
&mut self,
it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> MutRef<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.
pub unsafe fn dec_postfix(
&mut self,
arg1: c_int
) -> CppBox<QTreeWidgetItemIterator>
[src]
&mut 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.
pub unsafe fn inc_postfix(
&mut self,
arg1: c_int
) -> CppBox<QTreeWidgetItemIterator>
[src]
&mut 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.
pub unsafe fn from_q_tree_widget_q_flags_iterator_flag(
widget: impl CastInto<MutPtr<QTreeWidget>>,
flags: QFlags<IteratorFlag>
) -> CppBox<QTreeWidgetItemIterator>
[src]
widget: impl CastInto<MutPtr<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.
pub unsafe fn from_q_tree_widget_item_q_flags_iterator_flag(
item: impl CastInto<MutPtr<QTreeWidgetItem>>,
flags: QFlags<IteratorFlag>
) -> CppBox<QTreeWidgetItemIterator>
[src]
item: impl CastInto<MutPtr<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.
pub unsafe fn from_q_tree_widget(
widget: impl CastInto<MutPtr<QTreeWidget>>
) -> CppBox<QTreeWidgetItemIterator>
[src]
widget: impl CastInto<MutPtr<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.
pub unsafe fn from_q_tree_widget_item(
item: impl CastInto<MutPtr<QTreeWidgetItem>>
) -> CppBox<QTreeWidgetItemIterator>
[src]
item: impl CastInto<MutPtr<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.
pub unsafe fn new_copy(
it: impl CastInto<Ref<QTreeWidgetItemIterator>>
) -> CppBox<QTreeWidgetItemIterator>
[src]
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.
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)
.
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)
.
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()
.
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--()
.
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
.
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++()
.
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
impl Send for QTreeWidgetItemIterator
impl Unpin for QTreeWidgetItemIterator
impl Sync for QTreeWidgetItemIterator
impl UnwindSafe for QTreeWidgetItemIterator
impl RefUnwindSafe for QTreeWidgetItemIterator
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,