diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-16 11:52:07 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-16 11:52:07 (GMT) |
commit | e4d2a4bffa94bac919d2e0b0ad245b917b69b4d5 (patch) | |
tree | 0fd504fea70544c8eb11b93dd843243615ce8875 /src/gui/painting | |
parent | e5a277fdd539c0de5e533b49a038e22929ace1dc (diff) | |
download | Qt-e4d2a4bffa94bac919d2e0b0ad245b917b69b4d5.zip Qt-e4d2a4bffa94bac919d2e0b0ad245b917b69b4d5.tar.gz Qt-e4d2a4bffa94bac919d2e0b0ad245b917b69b4d5.tar.bz2 |
doc: Update documentation for QStaticText
Make some smaller modifications, fixes and additions. Remove \internal
because the API is public now, and add documentation for
QPainter::drawStaticText() since this was missing.
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index e26a24d..2cb6915 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5702,12 +5702,16 @@ void QPainter::drawImage(const QRectF &targetRect, const QImage &image, const QR \fn void QPainter::drawStaticText(const QPoint &position, const QStaticText &staticText) + \since 4.7 + \overload */ /*! \fn void QPainter::drawStaticText(int x, int y, const QStaticText &staticText) + \since 4.7 + \overload */ @@ -5733,6 +5737,25 @@ void QPainter::drawText(const QPointF &p, const QString &str) drawText(p, str, 0, 0); } +/*! + \since 4.7 + + Draws the given \a staticText at the given \a position. + + The text will be drawn using the font and the transformation set on the painter. If the + font and/or transformation set on the painter are different from the ones used to initialize + the layout of the QStaticText, then the layout will have to be recalculated. Use + QStaticText::prepare() to initialize \a staticText with the font and transformation with which + it will later be drawn. + + If \a position is not the same as when \a staticText was initialized, or when it was last drawn, + then there will be a slight overhead when translating the text to its new position. + + \note If the painter's transformation is not affine, then \a staticText will be drawn using regular + calls to drawText(), losing any potential performance improvement. + + \sa QStaticText +*/ void QPainter::drawStaticText(const QPointF &position, const QStaticText &staticText) { Q_D(QPainter); |