![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtGui More...
#include <qpaintengine.h>
Public Types | |
| enum | RenderFlag { RightToLeft = 0x1 , Overline = 0x10 , Underline = 0x20 , StrikeOut = 0x40 , Dummy = 0xffffffff } |
| \value RightToLeft Render the text from right to left. More... | |
Public Member Functions | |
| qreal | descent () const |
| Corresponds to the \l{QFontMetrics::descent()}{descent} of the piece of text that is drawn. | |
| qreal | ascent () const |
| Corresponds to the \l{QFontMetrics::ascent()}{ascent} of the piece of text that is drawn. | |
| qreal | width () const |
| Specifies the total width of the text to be drawn. | |
| RenderFlags | renderFlags () const |
| Returns the render flags used. | |
| QString | text () const |
| Returns the text that should be drawn. | |
| QFont | font () const |
| Returns the font that should be used to draw the text. | |
\inmodule QtGui
The QTextItem class provides all the information required to draw text in a custom paint engine.
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 28 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 30 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 62 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 51 of file qpaintengine.cpp.
| QFont QTextItem::font | ( | ) | const |
Returns the font that should be used to draw the text.
Definition at line 106 of file qpaintengine.cpp.
| QTextItem::RenderFlags QTextItem::renderFlags | ( | ) | const |
Returns the render flags used.
Definition at line 84 of file qpaintengine.cpp.
| QString QTextItem::text | ( | ) | const |
Returns the text that should be drawn.
Definition at line 95 of file qpaintengine.cpp.
| qreal QTextItem::width | ( | ) | const |
Specifies the total width of the text to be drawn.
Definition at line 73 of file qpaintengine.cpp.