summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-14 18:50:51 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-14 18:50:51 (GMT)
commit9f387357a7e171636c97a7ef13afca60c01a9e3b (patch)
tree80d99a746f81358196a75058a5276493fb8a71de /src/gui/text/qstatictext_p.h
parent02e9f3f25bdcc1b13ecf9ffaf43716c8f7053e88 (diff)
downloadQt-9f387357a7e171636c97a7ef13afca60c01a9e3b.zip
Qt-9f387357a7e171636c97a7ef13afca60c01a9e3b.tar.gz
Qt-9f387357a7e171636c97a7ef13afca60c01a9e3b.tar.bz2
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.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 72c8439..7aee5c4 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);
};