45 #include <QtCore/qobject.h> 46 #include <QtGui/qtextformat.h> 47 #include <QtGui/qglyphrun.h> 76 int formatIndex()
const;
80 int objectIndex()
const;
102 virtual void blockInserted(
const QTextBlock &block);
103 virtual void blockRemoved(
const QTextBlock &block);
104 virtual void blockFormatChanged(
const QTextBlock &block);
118 virtual ~QTextFrameLayoutData();
135 int firstPosition()
const;
136 int lastPosition()
const;
165 bool atEnd()
const {
return !cf && cb == e; }
208 inline bool isValid()
const {
return p != 0 && n != 0; }
216 bool contains(
int position)
const;
221 int blockFormatIndex()
const;
223 int charFormatIndex()
const;
236 int userState()
const;
237 void setUserState(
int state);
239 int revision()
const;
240 void setRevision(
int rev);
242 bool isVisible()
const;
243 void setVisible(
bool visible);
245 int blockNumber()
const;
246 int firstLineNumber()
const;
248 void setLineCount(
int count);
249 int lineCount()
const;
264 bool atEnd()
const {
return n == e; }
305 inline bool isValid()
const {
return p && n; }
313 bool contains(
int position)
const;
316 int charFormatIndex()
const;
319 #if !defined(QT_NO_RAWFONT) 335 #endif // QTEXTOBJECT_H
QTextFragment(const QTextFragment &o)
Copies the content (text and format) of the other text fragment to this text fragment.
iterator operator++(int)
The postfix ++ operator (i++) advances the iterator to the next item in the text block and returns an...
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
#define QT_END_NAMESPACE
This macro expands to.
int fragmentIndex() const
bool operator!=(const iterator &o) const
Retuns true if the iterator is different from the other iterator; otherwise returns false...
QTextFragment & operator=(const QTextFragment &o)
Assigns the content (text and format) of the other text fragment to this text fragment.
QTextDocument * document() const
Returns the QTextDocument on which this syntax highlighter is installed.
The QTextFrame class represents a frame in a QTextDocument.
bool atEnd() const
Returns true if the current item is the last item in the text block.
void setUserData(uint id, QObjectUserData *data)
QObjectUserData * userData(uint id) const
iterator operator--(int)
The postfix ā operator (iā) makes the preceding item current and returns an iterator to the old cur...
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
iterator Iterator
Qt-style synonym for QTextFrame::iterator.
iterator begin() const
Returns a text block iterator pointing to the beginning of the text block.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
const QTextDocumentPrivate * p
The QString class provides a Unicode character string.
iterator(const QTextDocumentPrivate *priv, int begin, int end, int f)
The QObject class is the base class of all Qt objects.
bool operator!=(const iterator &o) const
Retuns true if this iterator is different from the other iterator; otherwise returns false...
bool operator==(const QTextBlock &o) const
Returns true if this text block is the same as the other text block.
QTextBlock next() const
Returns the text block in the document after this block, or an empty text block if this is the last o...
int position() const
Returns the index of the block's first character within the document.
QTextFrameFormat toFrameFormat() const
Returns this format as a frame format.
Q_DECLARE_TYPEINFO(QTextFrame::iterator, Q_MOVABLE_TYPE)
QTextBlock previous() const
Returns the text block in the document before this block, or an empty text block if this is the first...
bool isValid() const
Returns true if this is a valid text fragment (i.
bool operator<(const QTextFragment &o) const
Returns true if this text fragment appears earlier in the document than the other text fragment; othe...
#define QT_BEGIN_NAMESPACE
This macro expands to.
iterator(const iterator &o)
Copy constructor.
The QTextFormat class provides formatting information for a QTextDocument.
The QTextCursor class offers an API to access and modify QTextDocuments.
bool operator==(const iterator &o) const
Retuns true if this iterator is the same as the other iterator; otherwise returns false...
QTextBlock & operator=(const QTextBlock &o)
Assigns the other text block to this text block.
The QTextBlock class provides a container for text fragments in a QTextDocument.
static const char * data(const QByteArray &arr)
iterator operator--(int)
The postfix ā operator (iā) makes the preceding item in the current frame, and returns an iterator ...
bool operator<(const QTextBlock &o) const
Returns true if this text block occurs before the other text block in the document.
The QTextFragment class holds a piece of text in a QTextDocument with a single QTextCharFormat.
The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock...
The iterator class provides an iterator for reading the contents of a QTextFrame. ...
The QTextBlockUserData class is used to associate custom data with blocks of text.
QTextFormat format() const
Returns the text object's format.
int position() const
Returns the position of this text fragment in the document.
const QTextDocumentPrivate * p
The QTextLayout class is used to lay out and render text.
QTextFragment(const QTextDocumentPrivate *priv, int f, int fe)
iterator Iterator
Qt-style synonym for QTextBlock::iterator.
void setFormat(const QTextFormat &format)
Sets the text object's format.
The QTextBlockGroup class provides a container for text blocks within a QTextDocument.
The QSyntaxHighlighter class allows you to define syntax highlighting rules, and in addition you can ...
bool operator!=(const QTextBlock &o) const
Returns true if this text block is different from the other text block.
bool operator!=(const QTextFragment &o) const
Returns true if this text fragment is different (at a different position) from the other text fragmen...
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
The QTextTableCell class represents the properties of a cell in a QTextTable.
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument...
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.
bool operator==(const QTextFragment &o) const
Returns true if this text fragment is the same (at the same position) as the other text fragment; oth...
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
bool isValid() const
Returns true if this text block is valid; otherwise returns false.
The QTextList class provides a decorated list of items in a QTextDocument.
QTextFrame * parentFrame() const
Returns the parent frame of the current frame.
#define Q_DECLARE_PRIVATE(Class)
bool atEnd() const
Returns true if the current item is the last item in the text frame.
QTextBlock(QTextDocumentPrivate *priv, int b)
QTextDocumentPrivate * docHandle() const
QTextBlock(const QTextBlock &o)
Copies the other text block's attributes to this text block.
The QTextObject class is a base class for different kinds of objects that can group parts of a QTextD...
static const KeyPair *const end
QTextFragment()
Creates a new empty text fragment.
bool operator==(const iterator &o) const
Retuns true if the iterator is the same as the other iterator; otherwise returns false.
void setFrameFormat(const QTextFrameFormat &format)
Sets the frame's format.
QTextFrameFormat frameFormat() const
Returns the frame's format.
iterator()
Constructs an iterator for this text block.