summaryrefslogtreecommitdiffstats
path: root/src/gui/effects
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-18 13:28:09 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-20 16:59:01 (GMT)
commit1ffed52434741aa31b1549a931f6b446b2aaabd0 (patch)
tree3b30ddb20e3d8b851f08c93028fcb1386ac28b9e /src/gui/effects
parent181c9774791b6f581598389337f9af0fa4658e6a (diff)
downloadQt-1ffed52434741aa31b1549a931f6b446b2aaabd0.zip
Qt-1ffed52434741aa31b1549a931f6b446b2aaabd0.tar.gz
Qt-1ffed52434741aa31b1549a931f6b446b2aaabd0.tar.bz2
Add support for graphics effects on QWidget.
Diffstat (limited to 'src/gui/effects')
-rw-r--r--src/gui/effects/qgraphicseffect.cpp6
-rw-r--r--src/gui/effects/qgraphicseffect.h5
-rw-r--r--src/gui/effects/qgraphicseffect_p.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index c6f2871..3d363f1 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -97,6 +97,7 @@
#include <QtGui/qimage.h>
#include <QtGui/qpainter.h>
#include <QtCore/qrect.h>
+#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
@@ -122,6 +123,11 @@ const QGraphicsItem *QGraphicsEffectSource::graphicsItem() const
return d_func()->graphicsItem();
}
+const QWidget *QGraphicsEffectSource::widget() const
+{
+ return d_func()->widget();
+}
+
const QStyleOption *QGraphicsEffectSource::styleOption() const
{
return d_func()->styleOption();
diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h
index 4344e2d..f6c47d7 100644
--- a/src/gui/effects/qgraphicseffect.h
+++ b/src/gui/effects/qgraphicseffect.h
@@ -65,6 +65,7 @@ class Q_GUI_EXPORT QGraphicsEffectSource : public QObject
public:
~QGraphicsEffectSource();
const QGraphicsItem *graphicsItem() const;
+ const QWidget *widget() const;
const QStyleOption *styleOption() const;
bool isPixmap() const;
@@ -85,6 +86,8 @@ private:
friend class QGraphicsEffectPrivate;
friend class QGraphicsScenePrivate;
friend class QGraphicsItem;
+ friend class QWidget;
+ friend class QWidgetPrivate;
};
class QGraphicsEffectPrivate;
@@ -131,6 +134,8 @@ private:
friend class QGraphicsItem;
friend class QGraphicsItemPrivate;
friend class QGraphicsScenePrivate;
+ friend class QWidget;
+ friend class QWidgetPrivate;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsEffect::ChangeFlags);
diff --git a/src/gui/effects/qgraphicseffect_p.h b/src/gui/effects/qgraphicseffect_p.h
index 309b382..25397c3 100644
--- a/src/gui/effects/qgraphicseffect_p.h
+++ b/src/gui/effects/qgraphicseffect_p.h
@@ -70,6 +70,7 @@ public:
virtual QRectF boundingRect(Qt::CoordinateSystem system) const = 0;
virtual QRect deviceRect() const = 0;
virtual const QGraphicsItem *graphicsItem() const = 0;
+ virtual const QWidget *widget() const = 0;
virtual const QStyleOption *styleOption() const = 0;
virtual void draw(QPainter *p) = 0;
virtual void update() = 0;