![]() |
Qt 6.x
The Qt SDK
|
\reentrant More...
#include <qtextobject.h>
Public Member Functions | |
constexpr | iterator ()=default |
Constructs an iterator for this text block. | |
Q_GUI_EXPORT QTextFragment | fragment () const |
Returns the text fragment the iterator currently points to. | |
bool | atEnd () const |
Returns true if the current item is the last item in the text block. | |
bool | operator== (const iterator &o) const |
Returns true if this iterator is the same as the other iterator; otherwise returns false . | |
bool | operator!= (const iterator &o) const |
Returns true if this iterator is different from the other iterator; otherwise returns false . | |
Q_GUI_EXPORT 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. | |
iterator | operator++ (int) |
The postfix ++ operator ( {i++}) advances the iterator to the next item in the text block and returns an iterator to the old current item. | |
Q_GUI_EXPORT iterator & | operator-- () |
The prefix – operator ( {–i}) makes the preceding item current and returns an iterator pointing to the new current item. | |
iterator | operator-- (int) |
The postfix – operator ( {i–}) makes the preceding item current and returns an iterator to the old current item. | |
Friends | |
class | QTextBlock |
\reentrant
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock. \inmodule QtGui
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:
Definition at line 210 of file qtextobject.h.
|
constexprdefault |
Constructs an iterator for this text block.
|
inline |
Returns true
if the current item is the last item in the text block.
Definition at line 223 of file qtextobject.h.
References e.
Referenced by QWidgetTextControlPrivate::activateLinkUnderCursor(), QQuickTextControlPrivate::activateLinkUnderCursor(), and QQuickTextNodeEngine::addTextBlock().
QTextFragment QTextBlock::iterator::fragment | ( | ) | const |
Returns the text fragment the iterator currently points to.
Definition at line 1487 of file qtextobject.cpp.
References e, and QTextObject::formatIndex().
Referenced by QQuickTextNodeEngine::addTextBlock().
|
inline |
Returns true if this iterator is different from the other iterator; otherwise returns false
.
Definition at line 226 of file qtextobject.h.
References o.
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.
Definition at line 1503 of file qtextobject.cpp.
References e, and QTextObject::formatIndex().
|
inline |
The postfix ++ operator ({i++}) advances the iterator to the next item in the text block and returns an iterator to the old current item.
Definition at line 228 of file qtextobject.h.
References operator++().
Referenced by operator++().
QTextBlock::iterator & QTextBlock::iterator::operator-- | ( | ) |
The prefix – operator ({–i}) makes the preceding item current and returns an iterator pointing to the new current item.
Definition at line 1519 of file qtextobject.cpp.
References QTextObject::formatIndex().
|
inline |
The postfix – operator ({i–}) makes the preceding item current and returns an iterator to the old current item.
Definition at line 230 of file qtextobject.h.
References operator--().
Referenced by operator--().
|
inline |
Returns true if this iterator is the same as the other iterator; otherwise returns false
.
Definition at line 225 of file qtextobject.h.
References o.
|
friend |
Definition at line 215 of file qtextobject.h.