diff options
-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(); |