diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-14 19:50:51 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-14 19:50:51 +0100 |
commit | 9f387357a7e171636c97a7ef13afca60c01a9e3b (patch) | |
tree | 80d99a746f81358196a75058a5276493fb8a71de /src/gui/text/qstatictext_p.h | |
parent | 02e9f3f25bdcc1b13ecf9ffaf43716c8f7053e88 (diff) | |
download | qt4-tools-9f387357a7e171636c97a7ef13afca60c01a9e3b.tar.gz |
Add API for rich text and getting actual size of QStaticText
Required for several use cases, support for some html tags to change
font, color and do advanced text layouts, as well as getting the
bounds of the text when drawn.
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r-- | src/gui/text/qstatictext_p.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 72c8439f29..7aee5c406d 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -98,11 +98,12 @@ public: int numChars; // 4 bytes per item QFontEngine *fontEngine; // 4 bytes per item QFont font; // 8 bytes per item + QColor color; // 10 bytes per item QStaticTextUserData *userData; // 8 bytes per item char useBackendOptimizations : 1; // 1 byte per item char userDataNeedsUpdate : 1; // // ================ - // 41 bytes per item + // 51 bytes per item }; class QStaticText; @@ -114,12 +115,14 @@ public: ~QStaticTextPrivate(); void init(); + void paintText(QPainter *p); QAtomicInt ref; // 4 bytes per text QString text; // 4 bytes per text QFont font; // 8 bytes per text - QSizeF size; // 16 bytes per text + QSizeF maximumSize; // 16 bytes per text + QSizeF actualSize; // 16 bytes per text QPointF position; // 16 bytes per text QTransform matrix; // 80 bytes per text @@ -130,8 +133,9 @@ public: char needsClipRect : 1; // 1 byte per text char useBackendOptimizations : 1; + char preferRichText : 1; // ================ - // 145 bytes per text + // 171 bytes per text static QStaticTextPrivate *get(const QStaticText *q); }; |