diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 05:39:00 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 06:48:55 (GMT) |
commit | 3f71875547a0d0857d9d44cefe59f99c1d1984c9 (patch) | |
tree | 2ed9435adb28bf495ed51d8f3c58a3b55354e9c7 /examples | |
parent | a23977d78827ecf464f8f0aef96f7a9cb2abacd4 (diff) | |
download | Qt-3f71875547a0d0857d9d44cefe59f99c1d1984c9.zip Qt-3f71875547a0d0857d9d44cefe59f99c1d1984c9.tar.gz Qt-3f71875547a0d0857d9d44cefe59f99c1d1984c9.tar.bz2 |
Make examples/graphicsview/lightning compatible the new effects API.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/graphicsview/lighting/shadoweffect.cpp | 8 | ||||
-rw-r--r-- | examples/graphicsview/lighting/shadoweffect.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/graphicsview/lighting/shadoweffect.cpp b/examples/graphicsview/lighting/shadoweffect.cpp index e2dd864..f447531 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 d4aa440..68318b0 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(); |