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 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
|
<?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" />
<!-- qeasingcurve.cpp -->
<title>Qt 4.8: QEasingCurve 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="qtcore.html">QtCore</a></li>
<li>QEasingCurve</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QEasingCurve Class Reference</h1>
<!-- $$$QEasingCurve-brief -->
<p>The QEasingCurve class provides easing curves for controlling animation. <a href="#details">More...</a></p>
<!-- @@@QEasingCurve -->
<pre class="cpp"> <span class="preprocessor">#include <QEasingCurve></span></pre><p>This class was introduced in Qt 4.6.</p>
<ul>
<li><a href="qeasingcurve-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#EasingFunction-typedef">EasingFunction</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#Type-enum">Type</a></b> { Linear, InQuad, OutQuad, InOutQuad, ..., Custom }</td></tr>
</table>
<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="qeasingcurve.html#QEasingCurve">QEasingCurve</a></b> ( Type <i>type</i> = Linear )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#QEasingCurve-2">QEasingCurve</a></b> ( const QEasingCurve & <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#dtor.QEasingCurve">~QEasingCurve</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#amplitude">amplitude</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> EasingFunction </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#customType">customType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#overshoot">overshoot</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#period">period</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#setAmplitude">setAmplitude</a></b> ( qreal <i>amplitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#setCustomType">setCustomType</a></b> ( EasingFunction <i>func</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#setOvershoot">setOvershoot</a></b> ( qreal <i>overshoot</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#setPeriod">setPeriod</a></b> ( qreal <i>period</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#setType">setType</a></b> ( Type <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Type </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#valueForProgress">valueForProgress</a></b> ( qreal <i>progress</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#operator-not-eq">operator!=</a></b> ( const QEasingCurve & <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QEasingCurve & </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#operator-eq">operator=</a></b> ( const QEasingCurve & <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#operator-eq-eq">operator==</a></b> ( const QEasingCurve & <i>other</i> ) const</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="qeasingcurve.html#operator-lt-lt-37">operator<<</a></b> ( QDataStream & <i>stream</i>, const QEasingCurve & <i>easing</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QEasingCurve-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QEasingCurve class provides easing curves for controlling animation.</p>
<p>Easing curves describe a function that controls how the speed of the interpolation between 0 and 1 should be. Easing curves allow transitions from one value to another to appear more natural than a simple constant speed would allow. The QEasingCurve class is usually used in conjunction with the <a href="qvariantanimation.html">QVariantAnimation</a> and <a href="qpropertyanimation.html">QPropertyAnimation</a> classes but can be used on its own. It is usually used to accelerate the interpolation from zero velocity (ease in) or decelerate to zero velocity (ease out). Ease in and ease out can also be combined in the same easing curve.</p>
<p>To calculate the speed of the interpolation, the easing curve provides the function <a href="qeasingcurve.html#valueForProgress">valueForProgress</a>(), where the <i>progress</i> argument specifies the progress of the interpolation: 0 is the start value of the interpolation, 1 is the end value of the interpolation. The returned value is the effective progress of the interpolation. If the returned value is the same as the input value for all input values the easing curve is a linear curve. This is the default behaviour.</p>
<p>For example,</p>
<pre class="cpp"> <span class="type">QEasingCurve</span> easing(<span class="type">QEasingCurve</span><span class="operator">::</span>InOutQuad);
<span class="keyword">for</span>(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> t <span class="operator">=</span> <span class="number">0.0</span>; t <span class="operator"><</span> <span class="number">1.0</span>; t<span class="operator">+</span><span class="operator">=</span><span class="number">0.1</span>)
<a href="qtglobal.html#qWarning">qWarning</a>() <span class="operator"><</span><span class="operator"><</span> <span class="string">"Effective progress"</span> <span class="operator"><</span><span class="operator"><</span> t <span class="operator"><</span><span class="operator"><</span> <span class="string">" is
<< easing.valueForProgress(t);
</span></pre>
<p>will print the effective progress of the interpolation between 0 and 1.</p>
<p>When using a <a href="qpropertyanimation.html">QPropertyAnimation</a>, the associated easing curve will be used to control the progress of the interpolation between startValue and endValue:</p>
<pre class="cpp"> <span class="type"><a href="qpropertyanimation.html">QPropertyAnimation</a></span> animation;
animation<span class="operator">.</span>setStartValue(<span class="number">0</span>);
animation<span class="operator">.</span>setEndValue(<span class="number">1000</span>);
animation<span class="operator">.</span>setDuration(<span class="number">1000</span>);
animation<span class="operator">.</span>setEasingCurve(<span class="type">QEasingCurve</span><span class="operator">::</span>InOutQuad);</pre>
<p>The ability to set an amplitude, overshoot, or period depends on the QEasingCurve type. Amplitude access is available to curves that behave as springs such as elastic and bounce curves. Changing the amplitude changes the height of the curve. Period access is only available to elastic curves and setting a higher period slows the rate of bounce. Only curves that have "boomerang" behaviors such as the <a href="qeasingcurve.html#Type-enum">InBack</a>, <a href="qeasingcurve.html#Type-enum">OutBack</a>, <a href="qeasingcurve.html#Type-enum">InOutBack</a>, and <a href="qeasingcurve.html#Type-enum">OutInBack</a> have overshoot settings. These curves will interpolate beyond the end points and return to the end point, acting similar to a boomerang.</p>
<p>The <a href="animation-easing.html">Easing Curves Example</a> contains samples of QEasingCurve types and lets you change the curve settings.</p>
</div>
<!-- @@@QEasingCurve -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$EasingFunction -->
<h3 class="fn"><a name="EasingFunction-typedef"></a>typedef QEasingCurve::<span class="name">EasingFunction</span></h3>
<p>This is a typedef for a pointer to a function with the following signature:</p>
<pre class="cpp"> <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> myEasingFunction(<span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> progress);</pre>
<!-- @@@EasingFunction -->
<!-- $$$Type$$$Linear$$$InQuad$$$OutQuad$$$InOutQuad$$$OutInQuad$$$InCubic$$$OutCubic$$$InOutCubic$$$OutInCubic$$$InQuart$$$OutQuart$$$InOutQuart$$$OutInQuart$$$InQuint$$$OutQuint$$$InOutQuint$$$OutInQuint$$$InSine$$$OutSine$$$InOutSine$$$OutInSine$$$InExpo$$$OutExpo$$$InOutExpo$$$OutInExpo$$$InCirc$$$OutCirc$$$InOutCirc$$$OutInCirc$$$InElastic$$$OutElastic$$$InOutElastic$$$OutInElastic$$$InBack$$$OutBack$$$InOutBack$$$OutInBack$$$InBounce$$$OutBounce$$$InOutBounce$$$OutInBounce$$$InCurve$$$OutCurve$$$SineCurve$$$CosineCurve$$$Custom$$$NCurveTypes -->
<h3 class="fn"><a name="Type-enum"></a>enum QEasingCurve::<span class="name">Type</span></h3>
<p>The type of easing curve.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QEasingCurve::Linear</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign"><img src="images/qeasingcurve-linear.png" alt="" /> <br /> Easing curve for a linear (t) function: velocity is constant.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InQuad</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign"><img src="images/qeasingcurve-inquad.png" alt="" /> <br /> Easing curve for a quadratic (t^2) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutQuad</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign"><img src="images/qeasingcurve-outquad.png" alt="" /> <br /> Easing curve for a quadratic (t^2) function: decelerating to zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutQuad</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutquad.png" alt="" /> <br /> Easing curve for a quadratic (t^2) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInQuad</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinquad.png" alt="" /> <br /> Easing curve for a quadratic (t^2) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InCubic</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign"><img src="images/qeasingcurve-incubic.png" alt="" /> <br /> Easing curve for a cubic (t^3) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutCubic</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign"><img src="images/qeasingcurve-outcubic.png" alt="" /> <br /> Easing curve for a cubic (t^3) function: decelerating to zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutCubic</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutcubic.png" alt="" /> <br /> Easing curve for a cubic (t^3) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInCubic</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign"><img src="images/qeasingcurve-outincubic.png" alt="" /> <br /> Easing curve for a cubic (t^3) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InQuart</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign"><img src="images/qeasingcurve-inquart.png" alt="" /> <br /> Easing curve for a quartic (t^4) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutQuart</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign"><img src="images/qeasingcurve-outquart.png" alt="" /> <br /> Easing curve for a quartic (t^4) function: decelerating to zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutQuart</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutquart.png" alt="" /> <br /> Easing curve for a quartic (t^4) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInQuart</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinquart.png" alt="" /> <br /> Easing curve for a quartic (t^4) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InQuint</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign"><img src="images/qeasingcurve-inquint.png" alt="" /> <br /> Easing curve for a quintic (t^5) easing in: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutQuint</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign"><img src="images/qeasingcurve-outquint.png" alt="" /> <br /> Easing curve for a quintic (t^5) function: decelerating to zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutQuint</tt></td><td class="topAlign"><tt>15</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutquint.png" alt="" /> <br /> Easing curve for a quintic (t^5) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInQuint</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinquint.png" alt="" /> <br /> Easing curve for a quintic (t^5) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InSine</tt></td><td class="topAlign"><tt>17</tt></td><td class="topAlign"><img src="images/qeasingcurve-insine.png" alt="" /> <br /> Easing curve for a sinusoidal (sin(t)) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutSine</tt></td><td class="topAlign"><tt>18</tt></td><td class="topAlign"><img src="images/qeasingcurve-outsine.png" alt="" /> <br /> Easing curve for a sinusoidal (sin(t)) function: decelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutSine</tt></td><td class="topAlign"><tt>19</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutsine.png" alt="" /> <br /> Easing curve for a sinusoidal (sin(t)) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInSine</tt></td><td class="topAlign"><tt>20</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinsine.png" alt="" /> <br /> Easing curve for a sinusoidal (sin(t)) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InExpo</tt></td><td class="topAlign"><tt>21</tt></td><td class="topAlign"><img src="images/qeasingcurve-inexpo.png" alt="" /> <br /> Easing curve for an exponential (2^t) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutExpo</tt></td><td class="topAlign"><tt>22</tt></td><td class="topAlign"><img src="images/qeasingcurve-outexpo.png" alt="" /> <br /> Easing curve for an exponential (2^t) function: decelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutExpo</tt></td><td class="topAlign"><tt>23</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutexpo.png" alt="" /> <br /> Easing curve for an exponential (2^t) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInExpo</tt></td><td class="topAlign"><tt>24</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinexpo.png" alt="" /> <br /> Easing curve for an exponential (2^t) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InCirc</tt></td><td class="topAlign"><tt>25</tt></td><td class="topAlign"><img src="images/qeasingcurve-incirc.png" alt="" /> <br /> Easing curve for a circular (sqrt(1-t^2)) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutCirc</tt></td><td class="topAlign"><tt>26</tt></td><td class="topAlign"><img src="images/qeasingcurve-outcirc.png" alt="" /> <br /> Easing curve for a circular (sqrt(1-t^2)) function: decelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutCirc</tt></td><td class="topAlign"><tt>27</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutcirc.png" alt="" /> <br /> Easing curve for a circular (sqrt(1-t^2)) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInCirc</tt></td><td class="topAlign"><tt>28</tt></td><td class="topAlign"><img src="images/qeasingcurve-outincirc.png" alt="" /> <br /> Easing curve for a circular (sqrt(1-t^2)) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InElastic</tt></td><td class="topAlign"><tt>29</tt></td><td class="topAlign"><img src="images/qeasingcurve-inelastic.png" alt="" /> <br /> Easing curve for an elastic (exponentially decaying sine wave) function: accelerating from zero velocity. The peak amplitude can be set with the <i>amplitude</i> parameter, and the period of decay by the <i>period</i> parameter.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutElastic</tt></td><td class="topAlign"><tt>30</tt></td><td class="topAlign"><img src="images/qeasingcurve-outelastic.png" alt="" /> <br /> Easing curve for an elastic (exponentially decaying sine wave) function: decelerating from zero velocity. The peak amplitude can be set with the <i>amplitude</i> parameter, and the period of decay by the <i>period</i> parameter.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutElastic</tt></td><td class="topAlign"><tt>31</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutelastic.png" alt="" /> <br /> Easing curve for an elastic (exponentially decaying sine wave) function: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInElastic</tt></td><td class="topAlign"><tt>32</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinelastic.png" alt="" /> <br /> Easing curve for an elastic (exponentially decaying sine wave) function: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InBack</tt></td><td class="topAlign"><tt>33</tt></td><td class="topAlign"><img src="images/qeasingcurve-inback.png" alt="" /> <br /> Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutBack</tt></td><td class="topAlign"><tt>34</tt></td><td class="topAlign"><img src="images/qeasingcurve-outback.png" alt="" /> <br /> Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing out: decelerating to zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutBack</tt></td><td class="topAlign"><tt>35</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutback.png" alt="" /> <br /> Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInBack</tt></td><td class="topAlign"><tt>36</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinback.png" alt="" /> <br /> Easing curve for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InBounce</tt></td><td class="topAlign"><tt>37</tt></td><td class="topAlign"><img src="images/qeasingcurve-inbounce.png" alt="" /> <br /> Easing curve for a bounce (exponentially decaying parabolic bounce) function: accelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutBounce</tt></td><td class="topAlign"><tt>38</tt></td><td class="topAlign"><img src="images/qeasingcurve-outbounce.png" alt="" /> <br /> Easing curve for a bounce (exponentially decaying parabolic bounce) function: decelerating from zero velocity.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::InOutBounce</tt></td><td class="topAlign"><tt>39</tt></td><td class="topAlign"><img src="images/qeasingcurve-inoutbounce.png" alt="" /> <br /> Easing curve for a bounce (exponentially decaying parabolic bounce) function easing in/out: acceleration until halfway, then deceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::OutInBounce</tt></td><td class="topAlign"><tt>40</tt></td><td class="topAlign"><img src="images/qeasingcurve-outinbounce.png" alt="" /> <br /> Easing curve for a bounce (exponentially decaying parabolic bounce) function easing out/in: deceleration until halfway, then acceleration.</td></tr>
<tr><td class="topAlign"><tt>QEasingCurve::Custom</tt></td><td class="topAlign"><tt>45</tt></td><td class="topAlign">This is returned if the user specified a custom curve type with <a href="qeasingcurve.html#setCustomType">setCustomType</a>(). Note that you cannot call <a href="qeasingcurve.html#setType">setType</a>() with this value, but <a href="qeasingcurve.html#type">type</a>() can return it.</td></tr>
</table>
<!-- @@@Type -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QEasingCurve[overload1]$$$QEasingCurveType -->
<h3 class="fn"><a name="QEasingCurve"></a>QEasingCurve::<span class="name">QEasingCurve</span> ( <span class="type"><a href="qeasingcurve.html#Type-enum">Type</a></span> <i>type</i> = Linear )</h3>
<p>Constructs an easing curve of the given <i>type</i>.</p>
<!-- @@@QEasingCurve -->
<!-- $$$QEasingCurve$$$QEasingCurveconstQEasingCurve& -->
<h3 class="fn"><a name="QEasingCurve-2"></a>QEasingCurve::<span class="name">QEasingCurve</span> ( const <span class="type">QEasingCurve</span> & <i>other</i> )</h3>
<p>Construct a copy of <i>other</i>.</p>
<!-- @@@QEasingCurve -->
<!-- $$$~QEasingCurve[overload1]$$$~QEasingCurve -->
<h3 class="fn"><a name="dtor.QEasingCurve"></a>QEasingCurve::<span class="name">~QEasingCurve</span> ()</h3>
<p>Destructor.</p>
<!-- @@@~QEasingCurve -->
<!-- $$$amplitude[overload1]$$$amplitude -->
<h3 class="fn"><a name="amplitude"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QEasingCurve::<span class="name">amplitude</span> () const</h3>
<p>Returns the amplitude. This is not applicable for all curve types. It is only applicable for bounce and elastic curves (curves of <a href="qeasingcurve.html#type">type</a>() <a href="qeasingcurve.html#Type-enum">QEasingCurve::InBounce</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutBounce</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InOutBounce</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutInBounce</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InElastic</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutElastic</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InOutElastic</a> or <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutInElastic</a>).</p>
<p><b>See also </b><a href="qeasingcurve.html#setAmplitude">setAmplitude</a>().</p>
<!-- @@@amplitude -->
<!-- $$$customType[overload1]$$$customType -->
<h3 class="fn"><a name="customType"></a><span class="type"><a href="qeasingcurve.html#EasingFunction-typedef">EasingFunction</a></span> QEasingCurve::<span class="name">customType</span> () const</h3>
<p>Returns the function pointer to the custom easing curve. If <a href="qeasingcurve.html#type">type</a>() does not return <a href="qeasingcurve.html#Type-enum">QEasingCurve::Custom</a>, this function will return 0.</p>
<p><b>See also </b><a href="qeasingcurve.html#setCustomType">setCustomType</a>().</p>
<!-- @@@customType -->
<!-- $$$overshoot[overload1]$$$overshoot -->
<h3 class="fn"><a name="overshoot"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QEasingCurve::<span class="name">overshoot</span> () const</h3>
<p>Returns the overshoot. This is not applicable for all curve types. It is only applicable if <a href="qeasingcurve.html#type">type</a>() is <a href="qeasingcurve.html#Type-enum">QEasingCurve::InBack</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutBack</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InOutBack</a> or <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutInBack</a>.</p>
<p><b>See also </b><a href="qeasingcurve.html#setOvershoot">setOvershoot</a>().</p>
<!-- @@@overshoot -->
<!-- $$$period[overload1]$$$period -->
<h3 class="fn"><a name="period"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QEasingCurve::<span class="name">period</span> () const</h3>
<p>Returns the period. This is not applicable for all curve types. It is only applicable if <a href="qeasingcurve.html#type">type</a>() is <a href="qeasingcurve.html#Type-enum">QEasingCurve::InElastic</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutElastic</a>, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InOutElastic</a> or <a href="qeasingcurve.html#Type-enum">QEasingCurve::OutInElastic</a>.</p>
<p><b>See also </b><a href="qeasingcurve.html#setPeriod">setPeriod</a>().</p>
<!-- @@@period -->
<!-- $$$setAmplitude[overload1]$$$setAmplitudeqreal -->
<h3 class="fn"><a name="setAmplitude"></a><span class="type">void</span> QEasingCurve::<span class="name">setAmplitude</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>amplitude</i> )</h3>
<p>Sets the amplitude to <i>amplitude</i>.</p>
<p>This will set the amplitude of the bounce or the amplitude of the elastic "spring" effect. The higher the number, the higher the amplitude.</p>
<p><b>See also </b><a href="qeasingcurve.html#amplitude">amplitude</a>().</p>
<!-- @@@setAmplitude -->
<!-- $$$setCustomType[overload1]$$$setCustomTypeEasingFunction -->
<h3 class="fn"><a name="setCustomType"></a><span class="type">void</span> QEasingCurve::<span class="name">setCustomType</span> ( <span class="type"><a href="qeasingcurve.html#EasingFunction-typedef">EasingFunction</a></span> <i>func</i> )</h3>
<p>Sets a custom easing curve that is defined by the user in the function <i>func</i>. The signature of the function is qreal myEasingFunction(qreal progress), where <i>progress</i> and the return value is considered to be normalized between 0 and 1. (In some cases the return value can be outside that range) After calling this function <a href="qeasingcurve.html#type">type</a>() will return <a href="qeasingcurve.html#Type-enum">QEasingCurve::Custom</a>. <i>func</i> cannot be zero.</p>
<p><b>See also </b><a href="qeasingcurve.html#customType">customType</a>() and <a href="qeasingcurve.html#valueForProgress">valueForProgress</a>().</p>
<!-- @@@setCustomType -->
<!-- $$$setOvershoot[overload1]$$$setOvershootqreal -->
<h3 class="fn"><a name="setOvershoot"></a><span class="type">void</span> QEasingCurve::<span class="name">setOvershoot</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>overshoot</i> )</h3>
<p>Sets the overshoot to <i>overshoot</i>.</p>
<p>0 produces no overshoot, and the default value of 1.70158 produces an overshoot of 10 percent.</p>
<p><b>See also </b><a href="qeasingcurve.html#overshoot">overshoot</a>().</p>
<!-- @@@setOvershoot -->
<!-- $$$setPeriod[overload1]$$$setPeriodqreal -->
<h3 class="fn"><a name="setPeriod"></a><span class="type">void</span> QEasingCurve::<span class="name">setPeriod</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>period</i> )</h3>
<p>Sets the period to <i>period</i>. Setting a small period value will give a high frequency of the curve. A large period will give it a small frequency.</p>
<p><b>See also </b><a href="qeasingcurve.html#period">period</a>().</p>
<!-- @@@setPeriod -->
<!-- $$$setType[overload1]$$$setTypeType -->
<h3 class="fn"><a name="setType"></a><span class="type">void</span> QEasingCurve::<span class="name">setType</span> ( <span class="type"><a href="qeasingcurve.html#Type-enum">Type</a></span> <i>type</i> )</h3>
<p>Sets the type of the easing curve to <i>type</i>.</p>
<p><b>See also </b><a href="qeasingcurve.html#type">type</a>().</p>
<!-- @@@setType -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="qeasingcurve.html#Type-enum">Type</a></span> QEasingCurve::<span class="name">type</span> () const</h3>
<p>Returns the type of the easing curve.</p>
<p><b>See also </b><a href="qeasingcurve.html#setType">setType</a>().</p>
<!-- @@@type -->
<!-- $$$valueForProgress[overload1]$$$valueForProgressqreal -->
<h3 class="fn"><a name="valueForProgress"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QEasingCurve::<span class="name">valueForProgress</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>progress</i> ) const</h3>
<p>Return the effective progress for the easing curve at <i>progress</i>. While <i>progress</i> must be between 0 and 1, the returned effective progress can be outside those bounds. For instance, <a href="qeasingcurve.html#Type-enum">QEasingCurve::InBack</a> will return negative values in the beginning of the function.</p>
<!-- @@@valueForProgress -->
<!-- $$$operator!=[overload1]$$$operator!=constQEasingCurve& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QEasingCurve::<span class="name">operator!=</span> ( const <span class="type">QEasingCurve</span> & <i>other</i> ) const</h3>
<p>Compare this easing curve with <i>other</i> and returns true if they are not equal. It will also compare the properties of a curve.</p>
<p><b>See also </b><a href="qeasingcurve.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQEasingCurve& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QEasingCurve</span> & QEasingCurve::<span class="name">operator=</span> ( const <span class="type">QEasingCurve</span> & <i>other</i> )</h3>
<p>Copy <i>other</i>.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQEasingCurve& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QEasingCurve::<span class="name">operator==</span> ( const <span class="type">QEasingCurve</span> & <i>other</i> ) const</h3>
<p>Compare this easing curve with <i>other</i> and returns true if they are equal. It will also compare the properties of a curve.</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQEasingCurve& -->
<h3 class="fn"><a name="operator-lt-lt-37"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & <span class="name">operator<<</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>stream</i>, const <span class="type">QEasingCurve</span> & <i>easing</i> )</h3>
<p>Writes the given <i>easing</i> curve to the given <i>stream</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
</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>
|