From 52352c6c572f15c10c4c3de641db81723aada468 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 May 2011 21:51:54 +0200 Subject: remove obsolete stuff everything inside QT3_SUPPORT is gone in gui/painting --- src/gui/painting/qpainter.h | 73 --------------------------------------------- 1 file changed, 73 deletions(-) (limited to 'src/gui/painting/qpainter.h') diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 4b2c447cca..0ada62acf9 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -464,79 +464,6 @@ public: void beginNativePainting(); void endNativePainting(); -#ifdef QT3_SUPPORT - - inline QT3_SUPPORT void setBackgroundColor(const QColor &color) { setBackground(color); } - inline QT3_SUPPORT const QColor &backgroundColor() const { return background().color(); } - - inline QT3_SUPPORT void drawText(int x, int y, const QString &s, int pos, int len) - { drawText(x, y, s.mid(pos, len)); } - inline QT3_SUPPORT void drawText(const QPoint &p, const QString &s, int pos, int len) - { drawText(p, s.mid(pos, len)); } - inline QT3_SUPPORT void drawText(int x, int y, const QString &s, int len) - { drawText(x, y, s.left(len)); } - inline QT3_SUPPORT void drawText(const QPoint &p, const QString &s, int len) - { drawText(p, s.left(len)); } - inline QT3_SUPPORT void drawText(const QRect &r, int flags, const QString &str, int len, QRect *br=0) - { drawText(r, flags, str.left(len), br); } - inline QT3_SUPPORT void drawText(int x, int y, int w, int h, int flags, const QString &text, int len, QRect *br=0) - { drawText(QRect(x, y, w, h), flags, text.left(len), br); } - inline QT3_SUPPORT QRect boundingRect(const QRect &rect, int flags, const QString &text, int len) - { return boundingRect(rect, flags, text.left(len)); } - inline QT3_SUPPORT QRect boundingRect(int x, int y, int w, int h, int flags, const QString &text, int len) - { return boundingRect(QRect(x, y, w, h), flags, text.left(len)); } - - inline QT3_SUPPORT bool begin(QPaintDevice *pdev, const QWidget *init) - { bool ret = begin(pdev); initFrom(init); return ret; } - QT3_SUPPORT void drawPoints(const QPolygon &pa, int index, int npoints = -1) - { drawPoints(pa.constData() + index, npoints == -1 ? pa.size() - index : npoints); } - - QT3_SUPPORT void drawCubicBezier(const QPolygon &pa, int index = 0); - - QT3_SUPPORT void drawLineSegments(const QPolygon &points, int index = 0, int nlines = -1); - - inline QT3_SUPPORT void drawPolyline(const QPolygon &pa, int index, int npoints = -1) - { drawPolyline(pa.constData() + index, npoints == -1 ? pa.size() - index : npoints); } - - inline QT3_SUPPORT void drawPolygon(const QPolygon &pa, bool winding, int index = 0, int npoints = -1) - { drawPolygon(pa.constData() + index, npoints == -1 ? pa.size() - index : npoints, - winding ? Qt::WindingFill : Qt::OddEvenFill); } - - inline QT3_SUPPORT void drawPolygon(const QPolygonF &polygon, bool winding, int index = 0, - int npoints = -1) - { drawPolygon(polygon.constData() + index, npoints == -1 ? polygon.size() - index : npoints, - winding ? Qt::WindingFill : Qt::OddEvenFill); } - - inline QT3_SUPPORT void drawConvexPolygon(const QPolygonF &polygon, int index, int npoints = -1) - { drawConvexPolygon(polygon.constData() + index, npoints == -1 ? polygon.size() - index : npoints); } - inline QT3_SUPPORT void drawConvexPolygon(const QPolygon &pa, int index, int npoints = -1) - { drawConvexPolygon(pa.constData() + index, npoints == -1 ? pa.size() - index : npoints); } - - static inline QT3_SUPPORT void redirect(QPaintDevice *pdev, QPaintDevice *replacement) - { setRedirected(pdev, replacement); } - static inline QT3_SUPPORT QPaintDevice *redirect(QPaintDevice *pdev) - { return const_cast(redirected(pdev)); } - - inline QT3_SUPPORT void setWorldXForm(bool enabled) { setMatrixEnabled(enabled); } - inline QT3_SUPPORT bool hasWorldXForm() const { return matrixEnabled(); } - inline QT3_SUPPORT void resetXForm() { resetTransform(); } - - inline QT3_SUPPORT void setViewXForm(bool enabled) { setViewTransformEnabled(enabled); } - inline QT3_SUPPORT bool hasViewXForm() const { return viewTransformEnabled(); } - - QT3_SUPPORT void map(int x, int y, int *rx, int *ry) const; - QT3_SUPPORT QPoint xForm(const QPoint &) const; // map virtual -> deviceb - QT3_SUPPORT QRect xForm(const QRect &) const; - QT3_SUPPORT QPolygon xForm(const QPolygon &) const; - QT3_SUPPORT QPolygon xForm(const QPolygon &, int index, int npoints) const; - QT3_SUPPORT QPoint xFormDev(const QPoint &) const; // map device -> virtual - QT3_SUPPORT QRect xFormDev(const QRect &) const; - QT3_SUPPORT QPolygon xFormDev(const QPolygon &) const; - QT3_SUPPORT QPolygon xFormDev(const QPolygon &, int index, int npoints) const; - QT3_SUPPORT qreal translationX() const; - QT3_SUPPORT qreal translationY() const; -#endif - private: Q_DISABLE_COPY(QPainter) friend class Q3Painter; -- cgit v1.2.3 From 862263b0ab7b69be78ee78f72afead152390bbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 4 May 2011 09:18:59 +0200 Subject: Remove QWidget dependency in QPainter::initFrom(). --- src/gui/painting/qpainter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/painting/qpainter.h') diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 0ada62acf9..9ef39e8ab7 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -133,7 +133,7 @@ public: bool end(); bool isActive() const; - void initFrom(const QWidget *widget); + void initFrom(const QPaintDevice *device); enum CompositionMode { CompositionMode_SourceOver, @@ -470,6 +470,7 @@ private: QScopedPointer d_ptr; + friend class QWidget; friend class QFontEngine; friend class QFontEngineBox; friend class QFontEngineFT; -- cgit v1.2.3 From 08ba97f653cc39073c73f76b7de38b7db311f38e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 4 May 2011 15:14:29 +0200 Subject: qdrawutil is for QtWidgets the methods don't make sense for QML based apps --- src/gui/painting/qpainter.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/gui/painting/qpainter.h') diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 9ef39e8ab7..0be3dfcbb3 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -49,7 +49,6 @@ #include #include #include -#include #ifndef QT_INCLUDE_COMPAT #include -- cgit v1.2.3