summaryrefslogtreecommitdiffstats
path: root/src/gui/effects/qgraphicseffect.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-30 12:25:05 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-30 14:42:15 (GMT)
commit53dd13e439932cb234fbfff9d0dcd97d67334329 (patch)
treee616f84f38d2311194ed379af034651cdb63bc03 /src/gui/effects/qgraphicseffect.cpp
parent2bb2a8a184b0e0f1816822e244cf9bd8e122a16a (diff)
downloadQt-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/effects/qgraphicseffect.cpp')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 474af53..5fc61d7 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -796,7 +796,7 @@ QGraphicsBlurEffect::QGraphicsBlurEffect(QObject *parent)
: QGraphicsEffect(*new QGraphicsBlurEffectPrivate, parent)
{
Q_D(QGraphicsBlurEffect);
- d->filter->setBlurHint(QPixmapBlurFilter::PerformanceHint);
+ d->filter->setBlurHint(Qt::PerformanceHint);
}
/*!
@@ -840,48 +840,34 @@ void QGraphicsBlurEffect::setBlurRadius(int radius)
*/
/*!
- \enum QGraphicsBlurEffect::BlurHint
-
- \since 4.6
-
- This enum describes the hint of a blur graphics effect.
-
- \value PerformanceHint Using this value hints that performance is the
- most important factor, at the potential cost of lower quality.
-
- \value QualityHint Using this value hints that a higher quality blur is
- preferred over a fast blur.
-*/
-
-/*!
\property QGraphicsBlurEffect::blurHint
\brief the blur hint of the effect.
- Use the PerformanceHint blur hint to say that you want a faster blur,
- and the QualityHint blur hint to say that you prefer a higher quality blur.
+ Use the Qt::PerformanceHint hint to say that you want a faster blur,
+ and the Qt::QualityHint hint to say that you prefer a higher quality blur.
- When animating the blur radius it's recommended to use the PerformanceHint.
+ When animating the blur radius it's recommended to use Qt::PerformanceHint.
- By default, the blur hint is PerformanceHint.
+ By default, the blur hint is Qt::PerformanceHint.
*/
-QGraphicsBlurEffect::BlurHint QGraphicsBlurEffect::blurHint() const
+Qt::RenderHint QGraphicsBlurEffect::blurHint() const
{
Q_D(const QGraphicsBlurEffect);
- return BlurHint(d->filter->blurHint());
+ return d->filter->blurHint();
}
-void QGraphicsBlurEffect::setBlurHint(QGraphicsBlurEffect::BlurHint hint)
+void QGraphicsBlurEffect::setBlurHint(Qt::RenderHint hint)
{
Q_D(QGraphicsBlurEffect);
- if (BlurHint(d->filter->blurHint()) == hint)
+ if (d->filter->blurHint() == hint)
return;
- d->filter->setBlurHint(QPixmapBlurFilter::BlurHint(hint));
+ d->filter->setBlurHint(hint);
emit blurHintChanged(hint);
}
/*!
- \fn void QGraphicsBlurEffect::blurHintChanged(QGraphicsBlurEffect::BlurHint hint)
+ \fn void QGraphicsBlurEffect::blurHintChanged(Qt::RenderHint hint)
This signal is emitted whenever the effect's blur hint changes.
The \a hint parameter holds the effect's new blur hint.