diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-04 09:18:12 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-04 09:18:12 (GMT) |
commit | 91ba3112b01dbb3f1a24556ac22782eedb5e4a13 (patch) | |
tree | bd2742b0d693804ced1a89290d54657ed0f7ac3f /src/gui/graphicsview | |
parent | 1c114fe03a6af18060529fe0604acf89dc595bcb (diff) | |
download | Qt-91ba3112b01dbb3f1a24556ac22782eedb5e4a13.zip Qt-91ba3112b01dbb3f1a24556ac22782eedb5e4a13.tar.gz Qt-91ba3112b01dbb3f1a24556ac22782eedb5e4a13.tar.bz2 |
More QGraphicsEffect API cleanup.
Removing some left over from previous experiments.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicseffect.cpp | 21 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicseffect.h | 6 | ||||
-rw-r--r-- | 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 |