QtBase
v6.3.1
|
The QTextItem class provides all the information required to draw text in a custom paint engine. More...
#include <qpaintengine.h>
Public Types | |
enum | RenderFlag { RightToLeft = 0x1 , Overline = 0x10 , Underline = 0x20 , StrikeOut = 0x40 , Dummy = 0xffffffff } |
Public Member Functions | |
qreal | descent () const |
qreal | ascent () const |
qreal | width () const |
RenderFlags | renderFlags () const |
QString | text () const |
QFont | font () const |
The QTextItem class provides all the information required to draw text in a custom paint engine.
\inmodule QtGui
When you reimplement your own paint engine, you must reimplement QPaintEngine::drawTextItem(), a function that takes a QTextItem as one of its arguments.
Definition at line 64 of file qpaintengine.h.
\value RightToLeft Render the text from right to left. \value Overline Paint a line above the text. \value Underline Paint a line under the text. \value StrikeOut Paint a line through the text. \omitvalue Dummy
Enumerator | |
---|---|
RightToLeft | |
Overline | |
Underline | |
StrikeOut | |
Dummy |
Definition at line 66 of file qpaintengine.h.
qreal QTextItem::ascent | ( | ) | const |
Corresponds to the \l{QFontMetrics::ascent()}{ascent} of the piece of text that is drawn.
Definition at line 98 of file qpaintengine.cpp.
qreal QTextItem::descent | ( | ) | const |
Corresponds to the \l{QFontMetrics::descent()}{descent} of the piece of text that is drawn.
Definition at line 87 of file qpaintengine.cpp.
QFont QTextItem::font | ( | ) | const |
Returns the font that should be used to draw the text.
Definition at line 142 of file qpaintengine.cpp.
QTextItem::RenderFlags QTextItem::renderFlags | ( | ) | const |
Returns the render flags used.
Definition at line 120 of file qpaintengine.cpp.
QString QTextItem::text | ( | ) | const |
Returns the text that should be drawn.
Definition at line 131 of file qpaintengine.cpp.
qreal QTextItem::width | ( | ) | const |
Specifies the total width of the text to be drawn.
Definition at line 109 of file qpaintengine.cpp.