#[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.

C++ documentation:

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

source

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.

C++ documentation:

Returns true if the current item is the last item in the text block.

source

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).

C++ documentation:

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

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--().

C++ documentation:

The prefix – operator (–i) makes the preceding item current and returns an iterator pointing to the new current item.

source

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).

C++ documentation:

The postfix – operator (i–) makes the preceding item current and returns an iterator to the old current item.

source

pub unsafe fn fragment(&self) -> CppBox<QTextFragment>

Returns the text fragment the iterator currently points to.

Calls C++ function: QTextFragment QTextBlock::iterator::fragment() const.

C++ documentation:

Returns the text fragment the iterator currently points to.

source

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++().

C++ documentation:

The prefix ++ operator (++i) advances the iterator to the next item in the hash and returns an iterator to the new current item.

source

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).

C++ documentation:

The postfix ++ operator (i++) advances the iterator to the next item in the text block and returns an iterator to the old current item.

source

pub unsafe fn new() -> CppBox<Iterator>

Constructs an iterator for this text block.

Calls C++ function: [constructor] void QTextBlock::iterator::iterator().

C++ documentation:

Constructs an iterator for this text block.

source

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).

C++ documentation:

Copy constructor. Constructs a copy of the other iterator.

Trait Implementations§

source§

impl CppDeletable for Iterator

source§

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().

C++ documentation:

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

source§

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--().

C++ documentation:

The prefix – operator (–i) makes the preceding item current and returns an iterator pointing to the new current item.

§

type Output = Ref<Iterator>

Output type.
source§

impl Increment for Iterator

source§

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++().

C++ documentation:

The prefix ++ operator (++i) advances the iterator to the next item in the hash and returns an iterator to the new current item.

§

type Output = Ref<Iterator>

Output type.
source§

impl PartialEq<Ref<Iterator>> for Iterator

source§

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.

C++ documentation:

Retuns true if this iterator is the same as the other iterator; otherwise returns false.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.