Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

iterator Class

(QTextFrame::iterator)

The iterator class provides an iterator for reading the contents of aQTextFrame.More...

Header:#include <iterator>

Public Functions

iterator()
iterator(const iterator & other)
boolatEnd() const
QTextBlockcurrentBlock() const
QTextFrame *currentFrame() const
QTextFrame *parentFrame() const
booloperator!=(const iterator & other) const
iterator &operator++()
iteratoroperator++(int)
iterator &operator--()
iteratoroperator--(int)
iterator &operator=(const iterator & other)
booloperator==(const iterator & other) const

Detailed Description

The iterator class provides an iterator for reading the contents of aQTextFrame.

A frame consists of an arbitrary sequence ofQTextBlocks and childQTextFrames. 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

iterator::iterator()

Constructs an invalid iterator.

iterator::iterator(constiterator & other)

Copy constructor. Constructs a copy of theother 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 alsocurrentFrame().

QTextFrame * iterator::currentFrame() const

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

See alsocurrentBlock().

QTextFrame * iterator::parentFrame() const

Returns the parent frame of the current frame.

See alsocurrentFrame() andQTextFrame::parentFrame().

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

Retuns true if the iterator is different from theother iterator; otherwise returns false.

iterator & iterator::operator++()

Moves the iterator to the next frame or block.

See alsocurrentBlock() andcurrentFrame().

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

iterator iterator::operator--(int)

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

iterator & iterator::operator=(constiterator & other)

Assignsother to this iterator and returns a reference to this iterator.

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

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

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp