QtBase
v6.3.1
|
#include <qtextdocumentlayout_p.h>
Properties | |
int | cursorWidth |
qreal | idealWidth |
bool | contentHasAlignment |
Properties inherited from QObject | |
QString | objectName |
the name of this object More... | |
Definition at line 65 of file qtextdocumentlayout_p.h.
|
explicit |
|
overridevirtual |
Returns the bounding rectangle of block.
Implements QAbstractTextDocumentLayout.
Definition at line 4124 of file qtextdocumentlayout.cpp.
bool QTextDocumentLayout::contentHasAlignment | ( | ) | const |
Definition at line 4207 of file qtextdocumentlayout.cpp.
int QTextDocumentLayout::cursorWidth | ( | ) | const |
Definition at line 4043 of file qtextdocumentlayout.cpp.
|
overrideprotectedvirtual |
This function is called whenever the contents of the document change. A change occurs when text is inserted, removed, or a combination of these two. The change is specified by position, charsRemoved, and charsAdded corresponding to the starting character position of the change, the number of characters removed from the document, and the number of characters added.
For example, when inserting the text "Hello" into an empty document, charsRemoved would be 0 and charsAdded would be 5 (the length of the string).
Replacing text is a combination of removing and inserting. For example, if the text "Hello" gets replaced by "Hi", charsRemoved would be 5 and charsAdded would be 2.
For subclasses of QAbstractTextDocumentLayout, this is the central function where a large portion of the work to lay out and position document contents is done.
For example, in a subclass that only arranges blocks of text, an implementation of this function would have to do the following:
\list
Implements QAbstractTextDocumentLayout.
Definition at line 3782 of file qtextdocumentlayout.cpp.
|
overridevirtual |
Returns the total size of the document's layout.
This information can be used by display widgets to update their scroll bars correctly.
Implements QAbstractTextDocumentLayout.
Definition at line 3996 of file qtextdocumentlayout.cpp.
|
overridevirtual |
Draws the layout with the given painter using the given context.
Implements QAbstractTextDocumentLayout.
Definition at line 3728 of file qtextdocumentlayout.cpp.
|
overrideprotectedvirtual |
This function is called to draw the inline object, object, with the given painter within the rectangle specified by rect using the specified text format.
posInDocument specifies the position of the object within the document.
The default implementation calls drawObject() on the object handlers. This function is called only within Qt. Subclasses can reimplement this function to customize the drawing of inline objects.
Reimplemented from QAbstractTextDocumentLayout.
Definition at line 3960 of file qtextdocumentlayout.cpp.
QSizeF QTextDocumentLayout::dynamicDocumentSize | ( | ) | const |
Definition at line 3983 of file qtextdocumentlayout.cpp.
int QTextDocumentLayout::dynamicPageCount | ( | ) | const |
Definition at line 3974 of file qtextdocumentlayout.cpp.
Definition at line 4195 of file qtextdocumentlayout.cpp.
|
overridevirtual |
Returns the bounding rectangle of frame.
Implements QAbstractTextDocumentLayout.
Definition at line 4095 of file qtextdocumentlayout.cpp.
|
overridevirtual |
Returns the cursor position for the given point with the specified accuracy. Returns -1 if no valid cursor position was found.
Implements QAbstractTextDocumentLayout.
Definition at line 3872 of file qtextdocumentlayout.cpp.
qreal QTextDocumentLayout::idealWidth | ( | ) | const |
Definition at line 4200 of file qtextdocumentlayout.cpp.
int QTextDocumentLayout::layoutStatus | ( | ) | const |
|
overridevirtual |
Returns the number of pages contained in the layout.
Implements QAbstractTextDocumentLayout.
Definition at line 3989 of file qtextdocumentlayout.cpp.
|
overrideprotectedvirtual |
Lays out the inline object item using the given text format.
posInDocument specifies the position of the object within the document.
The default implementation does nothing. This function is called only within Qt. Subclasses can reimplement this function to customize the position of inline objects.
Reimplemented from QAbstractTextDocumentLayout.
Definition at line 3933 of file qtextdocumentlayout.cpp.
|
overrideprotectedvirtual |
Sets the size of the inline object item corresponding to the text format.
posInDocument specifies the position of the object within the document.
The default implementation resizes the item to the size returned by the object handler's intrinsicSize() function. This function is called only within Qt. Subclasses can reimplement this function to customize the resizing of inline objects.
Reimplemented from QAbstractTextDocumentLayout.
Definition at line 3898 of file qtextdocumentlayout.cpp.
void QTextDocumentLayout::setCursorWidth | ( | int | width | ) |
Definition at line 4037 of file qtextdocumentlayout.cpp.
void QTextDocumentLayout::setFixedColumnWidth | ( | int | width | ) |
Definition at line 4049 of file qtextdocumentlayout.cpp.
QRectF QTextDocumentLayout::tableBoundingRect | ( | QTextTable * | table | ) | const |
Definition at line 4068 of file qtextdocumentlayout.cpp.
QRectF QTextDocumentLayout::tableCellBoundingRect | ( | QTextTable * | table, |
const QTextTableCell & | cell | ||
) | const |
|
overrideprotectedvirtual |
This event handler can be reimplemented in a subclass to receive timer events for the object.
QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.
Reimplemented from QObject.
Definition at line 4162 of file qtextdocumentlayout.cpp.
|
read |
Definition at line 118 of file qtextdocumentlayout_p.h.
|
readwrite |
Definition at line 118 of file qtextdocumentlayout_p.h.
|
read |
Definition at line 118 of file qtextdocumentlayout_p.h.