summaryrefslogtreecommitdiffstats
path: root/src/gui/effects/qgraphicseffect.h
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-28 08:31:31 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-08-28 14:34:16 (GMT)
commitd6d49aa56750359012cdf722df27b0a1c3e5b2aa (patch)
treeeac4337828535ff4b8f120ffb03b77efd5a0d812 /src/gui/effects/qgraphicseffect.h
parentc3df6e12309164a6fa0cf76546a354c5d59c5374 (diff)
downloadQt-d6d49aa56750359012cdf722df27b0a1c3e5b2aa.zip
Qt-d6d49aa56750359012cdf722df27b0a1c3e5b2aa.tar.gz
Qt-d6d49aa56750359012cdf722df27b0a1c3e5b2aa.tar.bz2
Add support for setting an opacity mask on QGraphicsOpacityEffect.
Opacity masks enable you to make portions of an element transparent. More information about opacity masks here: http://msdn.microsoft.com/en-us/library/ms743320.aspx Reviewed-by: Samuel
Diffstat (limited to 'src/gui/effects/qgraphicseffect.h')
-rw-r--r--src/gui/effects/qgraphicseffect.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h
index fef6531..a53357b 100644
--- a/src/gui/effects/qgraphicseffect.h
+++ b/src/gui/effects/qgraphicseffect.h
@@ -46,6 +46,7 @@
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
#include <QtGui/qcolor.h>
+#include <QtGui/qbrush.h>
QT_BEGIN_HEADER
@@ -274,17 +275,21 @@ class Q_GUI_EXPORT QGraphicsOpacityEffect: public QGraphicsEffect
{
Q_OBJECT
Q_PROPERTY(int opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
+ Q_PROPERTY(QBrush opacityMask READ opacityMask WRITE setOpacityMask NOTIFY opacityMaskChanged)
public:
QGraphicsOpacityEffect(QObject *parent = 0);
~QGraphicsOpacityEffect();
qreal opacity() const;
+ QBrush opacityMask() const;
public Q_SLOTS:
void setOpacity(qreal opacity);
+ void setOpacityMask(const QBrush &mask);
Q_SIGNALS:
void opacityChanged(qreal opacity);
+ void opacityMaskChanged(const QBrush &mask);
protected:
void draw(QPainter *painter, QGraphicsEffectSource *source);