IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

iterator Class

The iterator class provides an iterator for reading the contents of a QTextFrame.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

iterator Class

  • Header: iterator

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Group: iterator is part of Rich Text Processing APIs

Detailed Description

A frame consists of an arbitrary sequence of QTextBlocks and child QTextFrames. This class provides a way to iterate over the child objects of a frame, and read their contents. It does not provide a way to modify the contents of the frame.

Member Function Documentation

 

[constexpr] iterator::iterator()

Constructs an invalid iterator.

bool iterator::atEnd() const

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

QTextBlock iterator::currentBlock() const

Returns the current block the iterator points to. If the iterator points to a child frame, the returned block is invalid.

See Also

See also currentFrame()

QTextFrame *iterator::currentFrame() const

Returns the current frame pointed to by the iterator, or nullptr if the iterator currently points to a block.

See Also

See also currentBlock()

QTextFrame *iterator::parentFrame() const

Returns the parent frame of the current frame.

See Also

bool iterator::operator!=(const iterator &other) const

Returns true if the iterator is different from the other iterator; otherwise returns false.

iterator &iterator::operator++()

Moves the iterator to the next frame or block.

See Also

See also currentBlock(), currentFrame()

iterator iterator::operator++(int)

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

iterator &iterator::operator--()

Moves the iterator to the previous frame or block.

See Also

See also currentBlock(), currentFrame()

iterator iterator::operator--(int)

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

bool iterator::operator==(const iterator &other) const

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+