summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-20 12:57:34 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 13:57:10 +0100
commit7fbffd29e5904151a3a249004031d0502a16f4fc (patch)
treed06b39d9993a382a01e250e58d8e547a0cd5a436 /src/gui/text/qstatictext.h
parent161f6b4ccdec38c9817672ad977f4d025acb14f4 (diff)
Remove font property in QStaticText and fix handling translation on
painter 1. The font property in QStaticText has been removed. Rather than set a font on the text explicitly, it picks up the font from the painter. If you change the font on the painter, the text layout will have to be updated, like with a matrix. 2. The translation might not be the only transformation on the painter, so rather than translate back to origo, we explicitly set dx and dy on the transform to 0.0 for the duration of the function. 3. Update test to reflect changes
Diffstat (limited to 'src/gui/text/qstatictext.h')
-rw-r--r--src/gui/text/qstatictext.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h
index 9830b3257b..c7b54290bf 100644
--- a/src/gui/text/qstatictext.h
+++ b/src/gui/text/qstatictext.h
@@ -57,16 +57,13 @@ class Q_GUI_EXPORT QStaticText
{
public:
QStaticText();
- QStaticText(const QString &text, const QFont &font = QFont(), const QSizeF &maximumSize = QSizeF());
+ QStaticText(const QString &text, const QSizeF &maximumSize = QSizeF());
QStaticText(const QStaticText &other);
~QStaticText();
void setText(const QString &text);
QString text() const;
- void setFont(const QFont &font);
- QFont font() const;
-
void setMaximumSize(const QSizeF &maximumSize);
QSizeF maximumSize() const;
@@ -74,8 +71,6 @@ public:
bool operator==(const QStaticText &) const;
bool operator!=(const QStaticText &) const;
- QString toString() const;
-
bool isEmpty() const;
private: