1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgraphicseffect.cpp -->
<title>Qt 4.8: QGraphicsOpacityEffect Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QGraphicsOpacityEffect</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QGraphicsOpacityEffect Class Reference</h1>
<!-- $$$QGraphicsOpacityEffect-brief -->
<p>The QGraphicsOpacityEffect class provides an opacity effect. <a href="#details">More...</a></p>
<!-- @@@QGraphicsOpacityEffect -->
<pre class="cpp"> <span class="preprocessor">#include <QGraphicsOpacityEffect></span></pre><p><b>Inherits: </b><a href="qgraphicseffect.html">QGraphicsEffect</a>.</p>
<p>This class was introduced in Qt 4.6.</p>
<ul>
<li><a href="qgraphicsopacityeffect-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qgraphicsopacityeffect.html#opacity-prop">opacity</a></b> : qreal</li>
<li class="fn"><b><a href="qgraphicsopacityeffect.html#opacityMask-prop">opacityMask</a></b> : QBrush</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qgraphicseffect.html#properties">QGraphicsEffect</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#QGraphicsOpacityEffect">QGraphicsOpacityEffect</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#dtor.QGraphicsOpacityEffect">~QGraphicsOpacityEffect</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacity-prop">opacity</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacityMask-prop">opacityMask</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">3 public functions inherited from <a href="qgraphicseffect.html#public-functions">QGraphicsEffect</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacity-prop">setOpacity</a></b> ( qreal <i>opacity</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacityMask-prop">setOpacityMask</a></b> ( const QBrush & <i>mask</i> )</td></tr>
</table>
<ul>
<li class="fn">2 public slots inherited from <a href="qgraphicseffect.html#public-slots">QGraphicsEffect</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacityChanged">opacityChanged</a></b> ( qreal <i>opacity</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#opacityMaskChanged">opacityMaskChanged</a></b> ( const QBrush & <i>mask</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qgraphicseffect.html#signals">QGraphicsEffect</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicsopacityeffect.html#draw">draw</a></b> ( QPainter * <i>painter</i> )</td></tr>
</table>
<ul>
<li class="fn">7 protected functions inherited from <a href="qgraphicseffect.html#protected-functions">QGraphicsEffect</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="qgraphicseffect.html#protected-functions">QGraphicsEffect</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGraphicsOpacityEffect-description -->
<div class="descr">
<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 src="images/graphicseffect-opacity.png" alt="" /></p></div>
<p><b>See also </b><a href="qgraphicsdropshadoweffect.html">QGraphicsDropShadowEffect</a>, <a href="qgraphicsblureffect.html">QGraphicsBlurEffect</a>, and <a href="qgraphicscolorizeeffect.html">QGraphicsColorizeEffect</a>.</p>
<!-- @@@QGraphicsOpacityEffect -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$opacity-prop$$$opacity$$$setOpacityqreal$$$opacityChangedqreal -->
<h3 class="fn"><a name="opacity-prop"></a><span class="name">opacity</span> : <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span></h3>
<p>This property holds the opacity of the effect.</p>
<p>The value should be in the range of 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.</p>
<p>By default, the opacity is 0.7.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> qreal </td><td class="memItemRight bottomAlign"><span class="name"><b>opacity</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOpacity</b></span> ( qreal <i>opacity</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsopacityeffect.html#opacityChanged">opacityChanged</a></b></span> ( qreal <i>opacity</i> )</td></tr>
</table>
<p><b>See also </b><a href="qgraphicsopacityeffect.html#opacityMask-prop">setOpacityMask</a>().</p>
<!-- @@@opacity -->
<!-- $$$opacityMask-prop$$$opacityMask$$$setOpacityMaskconstQBrush&$$$opacityMaskChangedconstQBrush& -->
<h3 class="fn"><a name="opacityMask-prop"></a><span class="name">opacityMask</span> : <span class="type"><a href="qbrush.html">QBrush</a></span></h3>
<p>This property holds the opacity mask of the effect.</p>
<p>An opacity mask allows you apply opacity to portions of an element.</p>
<p>For example:</p>
<pre class="cpp"> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="type"><a href="qlineargradient.html">QLinearGradient</a></span> alphaGradient(rect<span class="operator">.</span>topLeft()<span class="operator">,</span> rect<span class="operator">.</span>bottomLeft());
alphaGradient<span class="operator">.</span>setColorAt(<span class="number">0.0</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>transparent);
alphaGradient<span class="operator">.</span>setColorAt(<span class="number">0.5</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>black);
alphaGradient<span class="operator">.</span>setColorAt(<span class="number">1.0</span><span class="operator">,</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>transparent);
<span class="type"><a href="qgraphicsopacityeffect.html">QGraphicsOpacityEffect</a></span> <span class="operator">*</span>effect <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgraphicsopacityeffect.html">QGraphicsOpacityEffect</a></span>;
effect<span class="operator">-</span><span class="operator">></span>setOpacityMask(alphaGradient);
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span></pre>
<p>There is no opacity mask by default.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QBrush </td><td class="memItemRight bottomAlign"><span class="name"><b>opacityMask</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOpacityMask</b></span> ( const QBrush & <i>mask</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qgraphicsopacityeffect.html#opacityMaskChanged">opacityMaskChanged</a></b></span> ( const QBrush & <i>mask</i> )</td></tr>
</table>
<p><b>See also </b><a href="qgraphicsopacityeffect.html#opacity-prop">setOpacity</a>().</p>
<!-- @@@opacityMask -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGraphicsOpacityEffect[overload1]$$$QGraphicsOpacityEffectQObject* -->
<h3 class="fn"><a name="QGraphicsOpacityEffect"></a>QGraphicsOpacityEffect::<span class="name">QGraphicsOpacityEffect</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<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>
<!-- @@@QGraphicsOpacityEffect -->
<!-- $$$~QGraphicsOpacityEffect[overload1]$$$~QGraphicsOpacityEffect -->
<h3 class="fn"><a name="dtor.QGraphicsOpacityEffect"></a>QGraphicsOpacityEffect::<span class="name">~QGraphicsOpacityEffect</span> ()</h3>
<p>Destroys the effect.</p>
<!-- @@@~QGraphicsOpacityEffect -->
<!-- $$$draw[overload1]$$$drawQPainter* -->
<h3 class="fn"><a name="draw"></a><span class="type">void</span> QGraphicsOpacityEffect::<span class="name">draw</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>painter</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qgraphicseffect.html#draw">QGraphicsEffect::draw</a>().</p>
<!-- @@@draw -->
<!-- $$$opacityChanged[overload1]$$$opacityChangedqreal -->
<h3 class="fn"><a name="opacityChanged"></a><span class="type">void</span> QGraphicsOpacityEffect::<span class="name">opacityChanged</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>opacity</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the effect's opacity changes. The <i>opacity</i> parameter holds the effect's new opacity.</p>
<!-- @@@opacityChanged -->
<!-- $$$opacityMaskChanged[overload1]$$$opacityMaskChangedconstQBrush& -->
<h3 class="fn"><a name="opacityMaskChanged"></a><span class="type">void</span> QGraphicsOpacityEffect::<span class="name">opacityMaskChanged</span> ( const <span class="type"><a href="qbrush.html">QBrush</a></span> & <i>mask</i> )<tt> [signal]</tt></h3>
<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>
<!-- @@@opacityMaskChanged -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|