From 04b9106f87d865aeb7627c8238742a4ca8601def Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 22 May 2009 17:05:42 +0200 Subject: Add convenience overloads to QPainter::drawStaticText() Adds the integer based overloads as inline functions, same as for QPainter::drawText(). --- src/gui/painting/qpainter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index f2be36f..1ae7c08 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -370,6 +370,8 @@ public: void setLayoutDirection(Qt::LayoutDirection direction); Qt::LayoutDirection layoutDirection() const; + inline void drawStaticText(int x, int y, const QStaticText &staticText); + inline void drawStaticText(const QPoint &p, const QStaticText &staticText); void drawStaticText(const QPointF &p, const QStaticText &staticText); void drawText(const QPointF &p, const QString &s); @@ -909,6 +911,16 @@ inline void QPainter::drawText(const QPoint &p, const QString &s) drawText(QPointF(p), s); } +inline void QPainter::drawStaticText(const QPoint &p, const QStaticText &staticText) +{ + drawStaticText(QPointF(p), staticText); +} + +inline void QPainter::drawStaticText(int x, int y, const QStaticText &staticText) +{ + drawStaticText(QPointF(x, y), staticText); +} + inline void QPainter::drawText(int x, int y, int w, int h, int flags, const QString &str, QRect *br) { drawText(QRect(x, y, w, h), flags, str, br); -- cgit v0.12