iterator 类

class QTextFrame ::iterator

iterator 类提供迭代器用于读取内容从 QTextFrame . 更多...

公共函数

iterator ()
bool atEnd () const
QTextBlock currentBlock () const
QTextFrame * currentFrame () const
QTextFrame * parentFrame () const
bool operator!= (const QTextFrame::iterator & other ) const
QTextFrame::iterator & operator++ ()
QTextFrame::iterator operator++ (int)
QTextFrame::iterator & operator-- ()
QTextFrame::iterator operator-- (int)
bool operator== (const QTextFrame::iterator & other ) const

详细描述

A frame consists of an arbitrary sequence of QTextBlock s and child QTextFrame s. 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.

成员函数文档编制

[constexpr noexcept] iterator:: iterator ()

构造无效迭代器。

bool iterator:: atEnd () const

返回 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.

另请参阅 currentFrame ().

QTextFrame *iterator:: currentFrame () const

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

另请参阅 currentBlock ().

QTextFrame *iterator:: parentFrame () const

返回当前帧的父级帧。

另请参阅 currentFrame () 和 QTextFrame::parentFrame ().

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

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

QTextFrame::iterator &iterator:: operator++ ()

将迭代器移到下一帧或块。

另请参阅 currentBlock () 和 currentFrame ().

QTextFrame::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.

QTextFrame::iterator &iterator:: operator-- ()

将迭代器移到上一帧或块。

另请参阅 currentBlock () 和 currentFrame ().

QTextFrame::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 QTextFrame::iterator & other ) const

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