<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QGraphicsOpacityEffect Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsOpacityEffect Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsOpacityEffect class provides an opacity effect. <a href="#details">More...</a></p> <p>Inherits <a href="qgraphicseffect.html">QGraphicsEffect</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsopacityeffect.html#QGraphicsOpacityEffect">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qgraphicsopacityeffect.html#draw">draw</a></b> (<i>self</i>, QPainter <i>painter</i>)</li><li><div class="fn" />float <b><a href="qgraphicsopacityeffect.html#opacity">opacity</a></b> (<i>self</i>)</li><li><div class="fn" />QBrush <b><a href="qgraphicsopacityeffect.html#opacityMask">opacityMask</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicsopacityeffect.html#setOpacity">setOpacity</a></b> (<i>self</i>, float <i>opacity</i>)</li><li><div class="fn" /><b><a href="qgraphicsopacityeffect.html#setOpacityMask">setOpacityMask</a></b> (<i>self</i>, QBrush <i>mask</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qgraphicsopacityeffect.html#opacityChanged">opacityChanged</a></b> (qreal)</li><li><div class="fn" />void <b><a href="qgraphicsopacityeffect.html#opacityMaskChanged">opacityMaskChanged</a></b> (const QBrush&)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsOpacityEffect class provides an opacity effect.</p> <p>An opacity effect renders the source with an opacity. This effect is useful for making the source semi-transparent, similar to a fade-in/fade-out sequence. The opacity can be modified using the <a href="qgraphicsopacityeffect.html#opacity-prop">setOpacity</a>() function.</p> <p>By default, the opacity is 0.7.</p> <p class="centerAlign"><img alt="" src="images/graphicseffect-opacity.png" /></p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsOpacityEffect" />QGraphicsOpacityEffect.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new <a href="qgraphicsopacityeffect.html">QGraphicsOpacityEffect</a> instance. The <i>parent</i> parameter is passed to <a href="qgraphicseffect.html">QGraphicsEffect</a>'s constructor.</p> <h3 class="fn"><a name="draw" />QGraphicsOpacityEffect.draw (<i>self</i>, <a href="qpainter.html">QPainter</a> <i>painter</i>)</h3><p>Reimplemented from <a href="qgraphicseffect.html#draw">QGraphicsEffect.draw</a>().</p> <h3 class="fn"><a name="opacity" />float QGraphicsOpacityEffect.opacity (<i>self</i>)</h3><h3 class="fn"><a name="opacityMask" /><a href="qbrush.html">QBrush</a> QGraphicsOpacityEffect.opacityMask (<i>self</i>)</h3><h3 class="fn"><a name="setOpacity" />QGraphicsOpacityEffect.setOpacity (<i>self</i>, float <i>opacity</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setOpacity(qreal)</tt>.</p><h3 class="fn"><a name="setOpacityMask" />QGraphicsOpacityEffect.setOpacityMask (<i>self</i>, <a href="qbrush.html">QBrush</a> <i>mask</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setOpacityMask(const QBrush&)</tt>.</p><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="opacityChanged" />void opacityChanged (qreal)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the effect's opacity changes. The <i>opacity</i> parameter holds the effect's new opacity.</p> <h3 class="fn"><a name="opacityMaskChanged" />void opacityMaskChanged (const QBrush&)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the effect's opacity mask changes. The <i>mask</i> parameter holds the effect's new opacity mask.</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>