![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\reentrant More...
#include <qtextlayout.h>
Public Member Functions | |
QTextInlineObject (int i, QTextEngine *e) | |
QTextInlineObject () | |
bool | isValid () const |
Returns true if this inline object is valid; otherwise returns false. | |
QRectF | rect () const |
Returns the inline object's rectangle. | |
qreal | width () const |
Returns the inline object's width. | |
qreal | ascent () const |
Returns the inline object's ascent. | |
qreal | descent () const |
Returns the inline object's descent. | |
qreal | height () const |
Returns the inline object's total height. | |
Qt::LayoutDirection | textDirection () const |
Returns if the object should be laid out right-to-left or left-to-right. | |
void | setWidth (qreal w) |
Sets the inline object's width to w. | |
void | setAscent (qreal a) |
Sets the inline object's ascent to a. | |
void | setDescent (qreal d) |
Sets the inline object's descent to d. | |
int | textPosition () const |
The position of the inline object within the text layout. | |
int | formatIndex () const |
Returns an integer describing the format of the inline object within the text layout. | |
QTextFormat | format () const |
Returns format of the inline object within the text layout. |
Friends | |
class | QTextLayout |
\reentrant
The QTextInlineObject class represents an inline object in a QAbstractTextDocumentLayout and its implementations. \inmodule QtGui
Normally, you do not need to create a QTextInlineObject. It is used by QAbstractTextDocumentLayout to handle inline objects when implementing a custom layout.
The inline object has various attributes that can be set, for example using, setWidth(), setAscent(), and setDescent(). The rectangle it occupies is given by rect(), and its direction by textDirection(). Its position in the text layout is given by textPosition(), and its format is given by format().
Definition at line 33 of file qtextlayout.h.
|
inline |
Creates a new inline object for the item at position i in the text engine e.
Definition at line 36 of file qtextlayout.h.
|
inline |
Definition at line 37 of file qtextlayout.h.
qreal QTextInlineObject::ascent | ( | ) | const |
Returns the inline object's ascent.
Definition at line 141 of file qtextlayout.cpp.
qreal QTextInlineObject::descent | ( | ) | const |
Returns the inline object's descent.
Definition at line 151 of file qtextlayout.cpp.
QTextFormat QTextInlineObject::format | ( | ) | const |
Returns format of the inline object within the text layout.
Definition at line 217 of file qtextlayout.cpp.
int QTextInlineObject::formatIndex | ( | ) | const |
Returns an integer describing the format of the inline object within the text layout.
Definition at line 209 of file qtextlayout.cpp.
qreal QTextInlineObject::height | ( | ) | const |
|
inline |
Returns true
if this inline object is valid; otherwise returns false.
Definition at line 38 of file qtextlayout.h.
QRectF QTextInlineObject::rect | ( | ) | const |
Returns the inline object's rectangle.
Definition at line 120 of file qtextlayout.cpp.
Sets the inline object's ascent to a.
Definition at line 182 of file qtextlayout.cpp.
Sets the inline object's descent to d.
Definition at line 192 of file qtextlayout.cpp.
Qt::LayoutDirection QTextInlineObject::textDirection | ( | ) | const |
Returns if the object should be laid out right-to-left or left-to-right.
Definition at line 225 of file qtextlayout.cpp.
int QTextInlineObject::textPosition | ( | ) | const |
The position of the inline object within the text layout.
Definition at line 200 of file qtextlayout.cpp.
qreal QTextInlineObject::width | ( | ) | const |
Returns the inline object's width.
Definition at line 131 of file qtextlayout.cpp.
|
friend |
Definition at line 58 of file qtextlayout.h.