<?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>QEasingCurve 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">QEasingCurve Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QEasingCurve class provides easing curves for controlling animation. <a href="#details">More...</a></p> <h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qeasingcurve.html#Type-enum">Type</a></b> { Linear, InQuad, OutQuad, InOutQuad, ..., Custom }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qeasingcurve.html#QEasingCurve">__init__</a></b> (<i>self</i>, Type <i>type</i> = QEasingCurve.Linear)</li><li><div class="fn" /><b><a href="qeasingcurve.html#QEasingCurve-2">__init__</a></b> (<i>self</i>, QEasingCurve <i>other</i>)</li><li><div class="fn" />float <b><a href="qeasingcurve.html#amplitude">amplitude</a></b> (<i>self</i>)</li><li><div class="fn" />callable <b><a href="qeasingcurve.html#customType">customType</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qeasingcurve.html#overshoot">overshoot</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qeasingcurve.html#period">period</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qeasingcurve.html#setAmplitude">setAmplitude</a></b> (<i>self</i>, float <i>amplitude</i>)</li><li><div class="fn" /><b><a href="qeasingcurve.html#setCustomType">setCustomType</a></b> (<i>self</i>, callable <i>func</i>)</li><li><div class="fn" /><b><a href="qeasingcurve.html#setOvershoot">setOvershoot</a></b> (<i>self</i>, float <i>overshoot</i>)</li><li><div class="fn" /><b><a href="qeasingcurve.html#setPeriod">setPeriod</a></b> (<i>self</i>, float <i>period</i>)</li><li><div class="fn" /><b><a href="qeasingcurve.html#setType">setType</a></b> (<i>self</i>, Type <i>type</i>)</li><li><div class="fn" />Type <b><a href="qeasingcurve.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qeasingcurve.html#valueForProgress">valueForProgress</a></b> (<i>self</i>, float <i>progress</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qeasingcurve.html#__eq__">__eq__</a></b> (<i>self</i>, QEasingCurve <i>other</i>)</li><li><div class="fn" />bool <b><a href="qeasingcurve.html#__ne__">__ne__</a></b> (<i>self</i>, QEasingCurve <i>other</i>)</li></ul><a name="details" /><hr /><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="qtcore.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="qtcore.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> <hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Type-enum" />QEasingCurve.Type</h3><p>The type of easing curve.</p> <table class="valuelist"> <tr class="odd" valign="top"> <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 alt="" src="images/qeasingcurve-linear.png" /><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 alt="" src="images/qeasingcurve-inquad.png" /><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 alt="" src="images/qeasingcurve-outquad.png" /><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 alt="" src="images/qeasingcurve-inoutquad.png" /><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 alt="" src="images/qeasingcurve-outinquad.png" /><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 alt="" src="images/qeasingcurve-incubic.png" /><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 alt="" src="images/qeasingcurve-outcubic.png" /><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 alt="" src="images/qeasingcurve-inoutcubic.png" /><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 alt="" src="images/qeasingcurve-outincubic.png" /><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 alt="" src="images/qeasingcurve-inquart.png" /><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 alt="" src="images/qeasingcurve-outquart.png" /><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 alt="" src="images/qeasingcurve-inoutquart.png" /><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 alt="" src="images/qeasingcurve-outinquart.png" /><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 alt="" src="images/qeasingcurve-inquint.png" /><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 alt="" src="images/qeasingcurve-outquint.png" /><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 alt="" src="images/qeasingcurve-inoutquint.png" /><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 alt="" src="images/qeasingcurve-outinquint.png" /><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 alt="" src="images/qeasingcurve-insine.png" /><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 alt="" src="images/qeasingcurve-outsine.png" /><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 alt="" src="images/qeasingcurve-inoutsine.png" /><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 alt="" src="images/qeasingcurve-outinsine.png" /><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 alt="" src="images/qeasingcurve-inexpo.png" /><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 alt="" src="images/qeasingcurve-outexpo.png" /><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 alt="" src="images/qeasingcurve-inoutexpo.png" /><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 alt="" src="images/qeasingcurve-outinexpo.png" /><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 alt="" src="images/qeasingcurve-incirc.png" /><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 alt="" src="images/qeasingcurve-outcirc.png" /><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 alt="" src="images/qeasingcurve-inoutcirc.png" /><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 alt="" src="images/qeasingcurve-outincirc.png" /><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 alt="" src="images/qeasingcurve-inelastic.png" /><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 alt="" src="images/qeasingcurve-outelastic.png" /><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 alt="" src="images/qeasingcurve-inoutelastic.png" /><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 alt="" src="images/qeasingcurve-outinelastic.png" /><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 alt="" src="images/qeasingcurve-inback.png" /><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 alt="" src="images/qeasingcurve-outback.png" /><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 alt="" src="images/qeasingcurve-inoutback.png" /><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 alt="" src="images/qeasingcurve-outinback.png" /><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 alt="" src="images/qeasingcurve-inbounce.png" /><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 alt="" src="images/qeasingcurve-outbounce.png" /><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 alt="" src="images/qeasingcurve-inoutbounce.png" /><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 alt="" src="images/qeasingcurve-outinbounce.png" /><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> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QEasingCurve" />QEasingCurve.__init__ (<i>self</i>, <a href="qeasingcurve.html#Type-enum">Type</a> <i>type</i> = QEasingCurve.Linear)</h3><p>Constructs an easing curve of the given <i>type</i>.</p> <h3 class="fn"><a name="QEasingCurve-2" />QEasingCurve.__init__ (<i>self</i>, <a href="qeasingcurve.html">QEasingCurve</a> <i>other</i>)</h3><p>Construct a copy of <i>other</i>.</p> <h3 class="fn"><a name="amplitude" />float QEasingCurve.amplitude (<i>self</i>)</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> <h3 class="fn"><a name="customType" />callable QEasingCurve.customType (<i>self</i>)</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> <h3 class="fn"><a name="overshoot" />float QEasingCurve.overshoot (<i>self</i>)</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> <h3 class="fn"><a name="period" />float QEasingCurve.period (<i>self</i>)</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> <h3 class="fn"><a name="setAmplitude" />QEasingCurve.setAmplitude (<i>self</i>, float <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> <h3 class="fn"><a name="setCustomType" />QEasingCurve.setCustomType (<i>self</i>, callable <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> <h3 class="fn"><a name="setOvershoot" />QEasingCurve.setOvershoot (<i>self</i>, float <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> <h3 class="fn"><a name="setPeriod" />QEasingCurve.setPeriod (<i>self</i>, float <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> <h3 class="fn"><a name="setType" />QEasingCurve.setType (<i>self</i>, <a href="qeasingcurve.html#Type-enum">Type</a> <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> <h3 class="fn"><a name="type" /><a href="qeasingcurve.html#Type-enum">Type</a> QEasingCurve.type (<i>self</i>)</h3><p>Returns the type of the easing curve.</p> <p><b>See also</b> <a href="qeasingcurve.html#setType">setType</a>().</p> <h3 class="fn"><a name="valueForProgress" />float QEasingCurve.valueForProgress (<i>self</i>, float <i>progress</i>)</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> <h3 class="fn"><a name="__eq__" />bool QEasingCurve.__eq__ (<i>self</i>, <a href="qeasingcurve.html">QEasingCurve</a> <i>other</i>)</h3><h3 class="fn"><a name="__ne__" />bool QEasingCurve.__ne__ (<i>self</i>, <a href="qeasingcurve.html">QEasingCurve</a> <i>other</i>)</h3><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>