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:57:08 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-09-30 14:42:16 (GMT)
commit7ca2f8ee15fbac8dce815678d7d63748d3187cb8 (patch)
tree9b702b104da0859e587dd504b59f448f9747a11d /src/gui/effects/qgraphicseffect.cpp
parent53dd13e439932cb234fbfff9d0dcd97d67334329 (diff)
downloadQt-7ca2f8ee15fbac8dce815678d7d63748d3187cb8.zip
Qt-7ca2f8ee15fbac8dce815678d7d63748d3187cb8.tar.gz
Qt-7ca2f8ee15fbac8dce815678d7d63748d3187cb8.tar.bz2
Added QGraphicsBloomEffect::blurHint.
This allows the user to control whether to use a fast dynamic blur or a static high quality blur. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/effects/qgraphicseffect.cpp')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 5fc61d7..4a59301 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -1363,6 +1363,40 @@ void QGraphicsBloomEffect::setBlurRadius(int radius)
}
/*!
+ \property QGraphicsBloomEffect::blurHint
+ \brief the blur hint of the effect.
+
+ 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 Qt::PerformanceHint.
+
+ By default, the blur hint is Qt::PerformanceHint.
+*/
+Qt::RenderHint QGraphicsBloomEffect::blurHint() const
+{
+ Q_D(const QGraphicsBloomEffect);
+ return d->blurFilter.blurHint();
+}
+
+void QGraphicsBloomEffect::setBlurHint(Qt::RenderHint hint)
+{
+ Q_D(QGraphicsBloomEffect);
+ if (d->blurFilter.blurHint() == hint)
+ return;
+
+ d->blurFilter.setBlurHint(hint);
+ emit blurHintChanged(hint);
+}
+
+/*!
+ \fn void QGraphicsBloomEffect::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.
+*/
+
+/*!
\property QGraphicsBloomEffect::brightness
\brief the brightness of the glow.