diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-06-14 10:45:10 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-06-14 11:02:46 (GMT) |
commit | 104fac002e228fb17304ec76d57febe33f8e8e7f (patch) | |
tree | 78e3b16fc559a9f49e9034ad06452c9b69995283 /src/gui/text/qstatictext_p.h | |
parent | cde3f39cb75ba69185cca8176ea7126f8441f042 (diff) | |
download | Qt-104fac002e228fb17304ec76d57febe33f8e8e7f.zip Qt-104fac002e228fb17304ec76d57febe33f8e8e7f.tar.gz Qt-104fac002e228fb17304ec76d57febe33f8e8e7f.tar.bz2 |
Add QTextOption API to QStaticText
To allow more control over the layout process for a QStaticText,
introduce a QTextOption API. This will allow you to, e.g., set an
alignment for the text layout. Patch also contains a couple of bug fixes
to make right alignment work correctly when you set a text width on
the QStaticText.
Task-number: QTBUG-9031
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r-- | src/gui/text/qstatictext_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 1a96291..cb60626 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -53,6 +53,8 @@ // We mean it. // +#include "qstatictext.h" + #include <private/qtextureglyphcache_p.h> #include <QtGui/qcolor.h> @@ -148,12 +150,14 @@ public: QFixedPoint *positionPool; // 4 bytes per text QChar *charPool; // 4 bytes per text + QTextOption textOption; // 28 bytes per text + unsigned char needsRelayout : 1; // 1 byte per text unsigned char useBackendOptimizations : 1; unsigned char textFormat : 2; unsigned char untransformedCoordinates : 1; // ================ - // 167 bytes per text + // 195 bytes per text static QStaticTextPrivate *get(const QStaticText *q); }; |