summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-20 12:11:40 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-20 12:11:40 (GMT)
commit5c7c4b9a0c95f5e97d73547e830a4e4bf87d2fca (patch)
tree302bba87e068a0d6fc8419a5622dd3c62551183d /src/gui
parentf6fdb0f10a3525205fc7143e5db61087058daf73 (diff)
downloadQt-5c7c4b9a0c95f5e97d73547e830a4e4bf87d2fca.zip
Qt-5c7c4b9a0c95f5e97d73547e830a4e4bf87d2fca.tar.gz
Qt-5c7c4b9a0c95f5e97d73547e830a4e4bf87d2fca.tar.bz2
Rename QGraphicsShadowEffect to QGraphicsDropShadowEffect.
Discussed with Andreas.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp40
-rw-r--r--src/gui/effects/qgraphicseffect.h12
-rw-r--r--src/gui/effects/qgraphicseffect_p.h6
3 files changed, 29 insertions, 29 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index 0747046..c6f2871 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -63,7 +63,7 @@
\o QGraphicsColorizeEffect - renders the item in shades of any given color
\o QGraphicsPixelizeEffect - pixelizes the item with any pixel size
\o QGraphicsBlurEffect - blurs the item by a given radius
- \o QGraphicsShadowEffect - renders a dropshadow behind the item
+ \o QGraphicsDropShadowEffect - renders a dropshadow behind the item
\endlist
If all you want is to add an effect to an item, you should visit the
@@ -538,24 +538,24 @@ void QGraphicsBlurEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
painter->setWorldTransform(restoreTransform);
}
-QGraphicsShadowEffect::QGraphicsShadowEffect(QObject *parent)
- : QGraphicsEffect(*new QGraphicsShadowEffectPrivate, parent)
+QGraphicsDropShadowEffect::QGraphicsDropShadowEffect(QObject *parent)
+ : QGraphicsEffect(*new QGraphicsDropShadowEffectPrivate, parent)
{
}
-QGraphicsShadowEffect::~QGraphicsShadowEffect()
+QGraphicsDropShadowEffect::~QGraphicsDropShadowEffect()
{
}
-QPointF QGraphicsShadowEffect::shadowOffset() const
+QPointF QGraphicsDropShadowEffect::shadowOffset() const
{
- Q_D(const QGraphicsShadowEffect);
+ Q_D(const QGraphicsDropShadowEffect);
return d->offset;
}
-void QGraphicsShadowEffect::setShadowOffset(const QPointF &ofs)
+void QGraphicsDropShadowEffect::setShadowOffset(const QPointF &ofs)
{
- Q_D(QGraphicsShadowEffect);
+ Q_D(QGraphicsDropShadowEffect);
if (d->offset == ofs)
return;
@@ -564,15 +564,15 @@ void QGraphicsShadowEffect::setShadowOffset(const QPointF &ofs)
emit shadowOffsetChanged(ofs);
}
-int QGraphicsShadowEffect::blurRadius() const
+int QGraphicsDropShadowEffect::blurRadius() const
{
- Q_D(const QGraphicsShadowEffect);
+ Q_D(const QGraphicsDropShadowEffect);
return d->radius;
}
-void QGraphicsShadowEffect::setBlurRadius(int blurRadius)
+void QGraphicsDropShadowEffect::setBlurRadius(int blurRadius)
{
- Q_D(QGraphicsShadowEffect);
+ Q_D(QGraphicsDropShadowEffect);
if (d->radius == blurRadius)
return;
@@ -581,15 +581,15 @@ void QGraphicsShadowEffect::setBlurRadius(int blurRadius)
emit blurRadiusChanged(blurRadius);
}
-qreal QGraphicsShadowEffect::opacity() const
+qreal QGraphicsDropShadowEffect::opacity() const
{
- Q_D(const QGraphicsShadowEffect);
+ Q_D(const QGraphicsDropShadowEffect);
return d->alpha;
}
-void QGraphicsShadowEffect::setOpacity(qreal opacity)
+void QGraphicsDropShadowEffect::setOpacity(qreal opacity)
{
- Q_D(QGraphicsShadowEffect);
+ Q_D(QGraphicsDropShadowEffect);
if (qFuzzyCompare(d->alpha, opacity))
return;
@@ -597,9 +597,9 @@ void QGraphicsShadowEffect::setOpacity(qreal opacity)
emit opacityChanged(opacity);
}
-QRectF QGraphicsShadowEffect::boundingRectFor(const QRectF &rect) const
+QRectF QGraphicsDropShadowEffect::boundingRectFor(const QRectF &rect) const
{
- Q_D(const QGraphicsShadowEffect);
+ Q_D(const QGraphicsDropShadowEffect);
QRectF shadowRect = rect.translated(d->offset);
QRectF blurRect = shadowRect;
qreal delta = d->radius * 3;
@@ -608,9 +608,9 @@ QRectF QGraphicsShadowEffect::boundingRectFor(const QRectF &rect) const
return blurRect;
}
-void QGraphicsShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
+void QGraphicsDropShadowEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
{
- Q_D(QGraphicsShadowEffect);
+ Q_D(QGraphicsDropShadowEffect);
if (d->radius <= 0 && d->offset.isNull()) {
source->draw(painter);
return;
diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h
index e92a4f4..4344e2d 100644
--- a/src/gui/effects/qgraphicseffect.h
+++ b/src/gui/effects/qgraphicseffect.h
@@ -226,16 +226,16 @@ private:
Q_DISABLE_COPY(QGraphicsBlurEffect)
};
-class QGraphicsShadowEffectPrivate;
-class Q_GUI_EXPORT QGraphicsShadowEffect: public QGraphicsEffect
+class QGraphicsDropShadowEffectPrivate;
+class Q_GUI_EXPORT QGraphicsDropShadowEffect: public QGraphicsEffect
{
Q_OBJECT
Q_PROPERTY(QPointF shadowOffset READ shadowOffset WRITE setShadowOffset NOTIFY shadowOffsetChanged)
Q_PROPERTY(int blurRadius READ blurRadius WRITE setBlurRadius NOTIFY blurRadiusChanged)
Q_PROPERTY(int opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
public:
- QGraphicsShadowEffect(QObject *parent = 0);
- ~QGraphicsShadowEffect();
+ QGraphicsDropShadowEffect(QObject *parent = 0);
+ ~QGraphicsDropShadowEffect();
QRectF boundingRectFor(const QRectF &rect) const;
QPointF shadowOffset() const;
@@ -260,8 +260,8 @@ protected:
void draw(QPainter *painter, QGraphicsEffectSource *source);
private:
- Q_DECLARE_PRIVATE(QGraphicsShadowEffect)
- Q_DISABLE_COPY(QGraphicsShadowEffect)
+ Q_DECLARE_PRIVATE(QGraphicsDropShadowEffect)
+ Q_DISABLE_COPY(QGraphicsDropShadowEffect)
};
QT_END_NAMESPACE
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 705b442..309b382 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -150,11 +150,11 @@ public:
int blurRadius;
};
-class QGraphicsShadowEffectPrivate : public QGraphicsEffectPrivate
+class QGraphicsDropShadowEffectPrivate : public QGraphicsEffectPrivate
{
- Q_DECLARE_PUBLIC(QGraphicsShadowEffect)
+ Q_DECLARE_PUBLIC(QGraphicsDropShadowEffect)
public:
- QGraphicsShadowEffectPrivate() : offset(4, 4), radius(8), alpha(0.7) {}
+ QGraphicsDropShadowEffectPrivate() : offset(4, 4), radius(8), alpha(0.7) {}
QPointF offset;
int radius;