Struct qt_gui::q_text_block::Iterator
source · #[repr(C)]pub struct Iterator { /* private fields */ }
Expand description
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
C++ class: QTextBlock::iterator
.
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
A block consists of a sequence of text fragments. This class provides a way to iterate over these, and read their contents. It does not provide a way to modify the internal structure or contents of the block.
An iterator can be constructed and used to access the fragments within a text block in the following way:
QTextBlock::iterator it; for (it = currentBlock.begin(); !(it.atEnd()); ++it) { QTextFragment currentFragment = it.fragment(); if (currentFragment.isValid()) processFragment(currentFragment); }
Implementations§
source§impl Iterator
impl Iterator
sourcepub unsafe fn at_end(&self) -> bool
pub unsafe fn at_end(&self) -> bool
Returns true
if the current item is the last item in the text block.
Calls C++ function: bool QTextBlock::iterator::atEnd() const
.
Returns true
if the current item is the last item in the text block.
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<Iterator>>
) -> Ref<Iterator>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<Iterator>> ) -> Ref<Iterator>
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
Calls C++ function: QTextBlock::iterator& QTextBlock::iterator::operator=(const QTextBlock::iterator& other)
.
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
A block consists of a sequence of text fragments. This class provides a way to iterate over these, and read their contents. It does not provide a way to modify the internal structure or contents of the block.
An iterator can be constructed and used to access the fragments within a text block in the following way:
QTextBlock::iterator it; for (it = currentBlock.begin(); !(it.atEnd()); ++it) { QTextFragment currentFragment = it.fragment(); if (currentFragment.isValid()) processFragment(currentFragment); }
sourcepub unsafe fn dec(&self) -> Ref<Iterator>
pub unsafe fn dec(&self) -> Ref<Iterator>
The prefix -- operator (--i
) makes the preceding item current and returns an iterator pointing to the new current item.
Calls C++ function: QTextBlock::iterator& QTextBlock::iterator::operator--()
.
The prefix – operator (–i
) makes the preceding item current and returns an iterator pointing to the new current item.
sourcepub unsafe fn dec_postfix(&self, arg1: c_int) -> CppBox<Iterator>
pub unsafe fn dec_postfix(&self, arg1: c_int) -> CppBox<Iterator>
The postfix -- operator (i--
) makes the preceding item current and returns an iterator to the old current item.
Calls C++ function: QTextBlock::iterator QTextBlock::iterator::operator--(int arg1)
.
The postfix – operator (i–
) makes the preceding item current and returns an iterator to the old current item.
sourcepub unsafe fn fragment(&self) -> CppBox<QTextFragment>
pub unsafe fn fragment(&self) -> CppBox<QTextFragment>
Returns the text fragment the iterator currently points to.
Calls C++ function: QTextFragment QTextBlock::iterator::fragment() const
.
Returns the text fragment the iterator currently points to.
sourcepub unsafe fn inc(&self) -> Ref<Iterator>
pub unsafe fn inc(&self) -> Ref<Iterator>
The prefix ++ operator (++i
) advances the iterator to the next item in the hash and returns an iterator to the new current item.
Calls C++ function: QTextBlock::iterator& QTextBlock::iterator::operator++()
.
The prefix ++ operator (++i
) advances the iterator to the next item in the hash and returns an iterator to the new current item.
sourcepub unsafe fn inc_postfix(&self, arg1: c_int) -> CppBox<Iterator>
pub unsafe fn inc_postfix(&self, arg1: c_int) -> CppBox<Iterator>
The postfix ++ operator (i++
) advances the iterator to the next item in the text block and returns an iterator to the old current item.
Calls C++ function: QTextBlock::iterator QTextBlock::iterator::operator++(int arg1)
.
The postfix ++ operator (i++
) advances the iterator to the next item in the text block and returns an iterator to the old current item.
sourcepub unsafe fn new() -> CppBox<Iterator>
pub unsafe fn new() -> CppBox<Iterator>
Constructs an iterator for this text block.
Calls C++ function: [constructor] void QTextBlock::iterator::iterator()
.
Constructs an iterator for this text block.
sourcepub unsafe fn new_copy(o: impl CastInto<Ref<Iterator>>) -> CppBox<Iterator>
pub unsafe fn new_copy(o: impl CastInto<Ref<Iterator>>) -> CppBox<Iterator>
Copy constructor. Constructs a copy of the other iterator.
Calls C++ function: [constructor] void QTextBlock::iterator::iterator(const QTextBlock::iterator& o)
.
Copy constructor. Constructs a copy of the other iterator.
Trait Implementations§
source§impl CppDeletable for Iterator
impl CppDeletable for Iterator
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
Calls C++ function: [destructor] void QTextBlock::iterator::~iterator()
.
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock.
A block consists of a sequence of text fragments. This class provides a way to iterate over these, and read their contents. It does not provide a way to modify the internal structure or contents of the block.
An iterator can be constructed and used to access the fragments within a text block in the following way:
QTextBlock::iterator it; for (it = currentBlock.begin(); !(it.atEnd()); ++it) { QTextFragment currentFragment = it.fragment(); if (currentFragment.isValid()) processFragment(currentFragment); }
source§impl Decrement for Iterator
impl Decrement for Iterator
source§unsafe fn dec(&self) -> Ref<Iterator>
unsafe fn dec(&self) -> Ref<Iterator>
The prefix -- operator (--i
) makes the preceding item current and returns an iterator pointing to the new current item.
Calls C++ function: QTextBlock::iterator& QTextBlock::iterator::operator--()
.
The prefix – operator (–i
) makes the preceding item current and returns an iterator pointing to the new current item.
source§impl Increment for Iterator
impl Increment for Iterator
source§unsafe fn inc(&self) -> Ref<Iterator>
unsafe fn inc(&self) -> Ref<Iterator>
The prefix ++ operator (++i
) advances the iterator to the next item in the hash and returns an iterator to the new current item.
Calls C++ function: QTextBlock::iterator& QTextBlock::iterator::operator++()
.
The prefix ++ operator (++i
) advances the iterator to the next item in the hash and returns an iterator to the new current item.
source§impl PartialEq<Ref<Iterator>> for Iterator
impl PartialEq<Ref<Iterator>> for Iterator
source§fn eq(&self, o: &Ref<Iterator>) -> bool
fn eq(&self, o: &Ref<Iterator>) -> bool
Retuns true if this iterator is the same as the other iterator; otherwise returns false
.
Calls C++ function: bool QTextBlock::iterator::operator==(const QTextBlock::iterator& o) const
.
Retuns true if this iterator is the same as the other iterator; otherwise returns false
.