diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-09-30 12:25:05 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-09-30 14:42:15 (GMT) |
commit | 53dd13e439932cb234fbfff9d0dcd97d67334329 (patch) | |
tree | e616f84f38d2311194ed379af034651cdb63bc03 /src/gui/image | |
parent | 2bb2a8a184b0e0f1816822e244cf9bd8e122a16a (diff) | |
download | Qt-53dd13e439932cb234fbfff9d0dcd97d67334329.zip Qt-53dd13e439932cb234fbfff9d0dcd97d67334329.tar.gz Qt-53dd13e439932cb234fbfff9d0dcd97d67334329.tar.bz2 |
Add Qt::RenderHint to control rendering operations.
We need a way to control various rendering operations. For example,
whether quality is more important than performance, or the other way
around.
This change also replaces occurences of QPixmapFilter/QGraphicsEffect::BlurHint
(introduced in 1a431e850893b6b162c833f4f148f090e2427dda) with Qt::RenderHint.
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qpixmapfilter.cpp | 8 | ||||
-rw-r--r-- | src/gui/image/qpixmapfilter_p.h | 9 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index ba9a1e2..749b8f3 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -504,10 +504,10 @@ void QPixmapConvolutionFilter::draw(QPainter *painter, const QPointF &p, const Q class QPixmapBlurFilterPrivate : public QPixmapFilterPrivate { public: - QPixmapBlurFilterPrivate() : radius(5), hint(QPixmapBlurFilter::PerformanceHint) {} + QPixmapBlurFilterPrivate() : radius(5), hint(Qt::PerformanceHint) {} int radius; - QPixmapBlurFilter::BlurHint hint; + Qt::RenderHint hint; }; @@ -561,7 +561,7 @@ int QPixmapBlurFilter::radius() const \internal */ -void QPixmapBlurFilter::setBlurHint(QPixmapBlurFilter::BlurHint hint) +void QPixmapBlurFilter::setBlurHint(Qt::RenderHint hint) { Q_D(QPixmapBlurFilter); d->hint = hint; @@ -572,7 +572,7 @@ void QPixmapBlurFilter::setBlurHint(QPixmapBlurFilter::BlurHint hint) \internal */ -QPixmapBlurFilter::BlurHint QPixmapBlurFilter::blurHint() const +Qt::RenderHint QPixmapBlurFilter::blurHint() const { Q_D(const QPixmapBlurFilter); return d->hint; diff --git a/src/gui/image/qpixmapfilter_p.h b/src/gui/image/qpixmapfilter_p.h index 92c8e56..8a2207a 100644 --- a/src/gui/image/qpixmapfilter_p.h +++ b/src/gui/image/qpixmapfilter_p.h @@ -126,19 +126,14 @@ class Q_GUI_EXPORT QPixmapBlurFilter : public QPixmapFilter Q_DECLARE_PRIVATE(QPixmapBlurFilter) public: - enum BlurHint { - PerformanceHint, - QualityHint - }; - QPixmapBlurFilter(QObject *parent = 0); ~QPixmapBlurFilter(); void setRadius(int radius); - void setBlurHint(BlurHint hint); + void setBlurHint(Qt::RenderHint hint); int radius() const; - BlurHint blurHint() const; + Qt::RenderHint blurHint() const; QRectF boundingRectFor(const QRectF &rect) const; void draw(QPainter *painter, const QPointF &dest, const QPixmap &src, const QRectF &srcRect = QRectF()) const; |