summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 07:39:00 +0200
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 08:48:55 +0200
commit3f71875547a0d0857d9d44cefe59f99c1d1984c9 (patch)
tree2ed9435adb28bf495ed51d8f3c58a3b55354e9c7 /examples
parenta23977d78827ecf464f8f0aef96f7a9cb2abacd4 (diff)
Make examples/graphicsview/lightning compatible the new effects API.
Diffstat (limited to 'examples')
-rw-r--r--examples/graphicsview/lighting/shadoweffect.cpp8
-rw-r--r--examples/graphicsview/lighting/shadoweffect.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/graphicsview/lighting/shadoweffect.cpp b/examples/graphicsview/lighting/shadoweffect.cpp
index e2dd8640b..f44753162 100644
--- a/examples/graphicsview/lighting/shadoweffect.cpp
+++ b/examples/graphicsview/lighting/shadoweffect.cpp
@@ -61,14 +61,14 @@ void ShadowEffect::adjustForItem()
setOpacity(qBound(0.4, 1 - dd / 200.0, 0.7));
}
-QRectF ShadowEffect::boundingRect() const
+QRectF ShadowEffect::boundingRectFor(const QRectF &rect) const
{
const_cast<ShadowEffect *>(this)->adjustForItem();
- return QGraphicsShadowEffect::boundingRect();
+ return QGraphicsShadowEffect::boundingRectFor(rect);
}
-void ShadowEffect::draw(QPainter *painter)
+void ShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
adjustForItem();
- QGraphicsShadowEffect::draw(painter);
+ QGraphicsShadowEffect::draw(painter, source);
}
diff --git a/examples/graphicsview/lighting/shadoweffect.h b/examples/graphicsview/lighting/shadoweffect.h
index d4aa440de..68318b03f 100644
--- a/examples/graphicsview/lighting/shadoweffect.h
+++ b/examples/graphicsview/lighting/shadoweffect.h
@@ -50,9 +50,9 @@ class ShadowEffect: public QGraphicsShadowEffect
public:
ShadowEffect(QGraphicsItem *item, QGraphicsItem *source);
- QRectF boundingRect() const;
+ QRectF boundingRectFor(const QRectF &rect) const;
- void draw(QPainter *painter);
+ void draw(QPainter *painter, QGraphicsEffectSource *source);
private:
void adjustForItem();