From 91ba3112b01dbb3f1a24556ac22782eedb5e4a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 4 Aug 2009 11:18:12 +0200 Subject: More QGraphicsEffect API cleanup. Removing some left over from previous experiments. --- src/gui/graphicsview/qgraphicseffect.cpp | 21 +-------------------- src/gui/graphicsview/qgraphicseffect.h | 6 +----- src/gui/graphicsview/qgraphicseffect_p.h | 8 +++----- 3 files changed, 5 insertions(+), 30 deletions(-) diff --git a/src/gui/graphicsview/qgraphicseffect.cpp b/src/gui/graphicsview/qgraphicseffect.cpp index 17506bc..43ed86a 100644 --- a/src/gui/graphicsview/qgraphicseffect.cpp +++ b/src/gui/graphicsview/qgraphicseffect.cpp @@ -155,25 +155,6 @@ QRectF QGraphicsEffect::boundingRect() const return QRectF(); } -void QGraphicsEffect::setSourcePixmap(const QPixmap &pixmap) -{ - Q_D(QGraphicsEffect); - d->sourcePixmap = pixmap; - d->hasSourcePixmap = !pixmap.isNull(); -} - -QPixmap QGraphicsEffect::sourcePixmap() const -{ - Q_D(const QGraphicsEffect); - return d->sourcePixmap; -} - -bool QGraphicsEffect::hasSourcePixmap() const -{ - Q_D(const QGraphicsEffect); - return d->hasSourcePixmap; -} - QRectF QGraphicsEffect::boundingRectFor(const QRectF &rect) const { return rect; @@ -204,7 +185,7 @@ void QGraphicsEffect::updateBoundingRect() d->source->update(); } -void QGraphicsEffect::sourceChanged(QGraphicsEffectSource *) {} +void QGraphicsEffect::sourceChanged() {} void QGraphicsEffect::sourceBoundingRectChanged() {} QGraphicsGrayscaleEffect::QGraphicsGrayscaleEffect() diff --git a/src/gui/graphicsview/qgraphicseffect.h b/src/gui/graphicsview/qgraphicseffect.h index 37b6d23..79e7c3d 100644 --- a/src/gui/graphicsview/qgraphicseffect.h +++ b/src/gui/graphicsview/qgraphicseffect.h @@ -102,10 +102,6 @@ public: virtual QRectF boundingRectFor(const QRectF &rect) const; QRectF boundingRect() const; - void setSourcePixmap(const QPixmap &pixmap); - QPixmap sourcePixmap() const; - bool hasSourcePixmap() const; - QGraphicsEffectSource *source() const; bool isEnabled() const; @@ -116,7 +112,7 @@ public Q_SLOTS: protected: QGraphicsEffect(QGraphicsEffectPrivate &d); virtual void draw(QPainter *painter, QGraphicsEffectSource *source) = 0; - virtual void sourceChanged(QGraphicsEffectSource *newSource); + virtual void sourceChanged(); virtual void sourceBoundingRectChanged(); void updateBoundingRect(); diff --git a/src/gui/graphicsview/qgraphicseffect_p.h b/src/gui/graphicsview/qgraphicseffect_p.h index 9e6e2a1..6664a03 100644 --- a/src/gui/graphicsview/qgraphicseffect_p.h +++ b/src/gui/graphicsview/qgraphicseffect_p.h @@ -90,7 +90,7 @@ class Q_GUI_EXPORT QGraphicsEffectPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QGraphicsEffect) public: - QGraphicsEffectPrivate() : source(0), hasSourcePixmap(0), isEnabled(1) {} + QGraphicsEffectPrivate() : source(0), isEnabled(1) {} inline void setGraphicsEffectSource(QGraphicsEffectSource *newSource) { @@ -99,15 +99,13 @@ public: delete source; } source = newSource; - q_func()->sourceChanged(newSource); + q_func()->sourceChanged(); } QGraphicsEffectSource *source; QRectF boundingRect; - QPixmap sourcePixmap; - quint32 hasSourcePixmap : 1; quint32 isEnabled : 1; - quint32 padding : 30; // feel free to use + quint32 padding : 31; // feel free to use }; class QGraphicsGrayscaleEffectPrivate : public QGraphicsEffectPrivate -- cgit v0.12