summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-05-22 15:05:42 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:46:38 (GMT)
commit04b9106f87d865aeb7627c8238742a4ca8601def (patch)
tree1474ff42ae6a173d99f5c3621062ffbb9120a37e /src
parent596d92d6ca25465594e5b852e99d73dda25494fd (diff)
downloadQt-04b9106f87d865aeb7627c8238742a4ca8601def.zip
Qt-04b9106f87d865aeb7627c8238742a4ca8601def.tar.gz
Qt-04b9106f87d865aeb7627c8238742a4ca8601def.tar.bz2
Add convenience overloads to QPainter::drawStaticText()
Adds the integer based overloads as inline functions, same as for QPainter::drawText().
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpainter.h12
1 files changed, 12 insertions, 0 deletions
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);