src/corelib/tools/qeasingcurve.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    89     animation.setStartValue(0);
    89     animation.setStartValue(0);
    90     animation.setEndValue(1000);
    90     animation.setEndValue(1000);
    91     animation.setDuration(1000);
    91     animation.setDuration(1000);
    92     animation.setEasingCurve(QEasingCurve::InOutQuad);
    92     animation.setEasingCurve(QEasingCurve::InOutQuad);
    93     \endcode
    93     \endcode
       
    94 
       
    95     The ability to set an amplitude, overshoot, or period depends on the QEasingCurve type. Amplitude access
       
    96     is available to curves that behave as springs such as elastic and bounce curves. Changing the amplitude changes
       
    97     the height of the curve. Period access is only available to elastic curves and setting a higher period slows
       
    98     the rate of bounce. Only curves that have "boomerang" behaviors such as the InBack, OutBack, InOutBack, and OutInBack 
       
    99     have overshoot settings. These curves will interpolate beyond the end points and return to the end point, 
       
   100     acting similar to a boomerang.
       
   101 
       
   102     The \l{Easing Curves Example} contains samples of QEasingCurve types and lets you change the curve settings.
       
   103 
    94  */
   104  */
    95 
   105 
    96 /*!
   106 /*!
    97     \enum QEasingCurve::Type
   107     \enum QEasingCurve::Type
    98 
   108 
   138                         \br
   148                         \br
   139                         Easing curve for a quartic (t^4) function:
   149                         Easing curve for a quartic (t^4) function:
   140                         accelerating from zero velocity.
   150                         accelerating from zero velocity.
   141     \value OutQuart     \inlineimage qeasingcurve-outquart.png
   151     \value OutQuart     \inlineimage qeasingcurve-outquart.png
   142                         \br
   152                         \br
   143                         Easing curve for a cubic (t^4) function:
   153                         Easing curve for a quartic (t^4) function:
   144                         decelerating to zero velocity.
   154                         decelerating to zero velocity.
   145     \value InOutQuart   \inlineimage qeasingcurve-inoutquart.png
   155     \value InOutQuart   \inlineimage qeasingcurve-inoutquart.png
   146                         \br
   156                         \br
   147                         Easing curve for a cubic (t^4) function:
   157                         Easing curve for a quartic (t^4) function:
   148                         acceleration until halfway, then deceleration.
   158                         acceleration until halfway, then deceleration.
   149     \value OutInQuart   \inlineimage qeasingcurve-outinquart.png
   159     \value OutInQuart   \inlineimage qeasingcurve-outinquart.png
   150                         \br
   160                         \br
   151                         Easing curve for a cubic (t^4) function:
   161                         Easing curve for a quartic (t^4) function:
   152                         deceleration until halfway, then acceleration.
   162                         deceleration until halfway, then acceleration.
   153     \value InQuint      \inlineimage qeasingcurve-inquint.png
   163     \value InQuint      \inlineimage qeasingcurve-inquint.png
   154                         \br
   164                         \br
   155                         Easing curve for a quintic (t^5) easing
   165                         Easing curve for a quintic (t^5) easing
   156                         in: accelerating from zero velocity.
   166                         in: accelerating from zero velocity.
   157     \value OutQuint     \inlineimage qeasingcurve-outquint.png
   167     \value OutQuint     \inlineimage qeasingcurve-outquint.png
   158                         \br
   168                         \br
   159                         Easing curve for a cubic (t^5) function:
   169                         Easing curve for a quintic (t^5) function:
   160                         decelerating to zero velocity.
   170                         decelerating to zero velocity.
   161     \value InOutQuint   \inlineimage qeasingcurve-inoutquint.png
   171     \value InOutQuint   \inlineimage qeasingcurve-inoutquint.png
   162                         \br
   172                         \br
   163                         Easing curve for a cubic (t^5) function:
   173                         Easing curve for a quintic (t^5) function:
   164                         acceleration until halfway, then deceleration.
   174                         acceleration until halfway, then deceleration.
   165     \value OutInQuint   \inlineimage qeasingcurve-outinquint.png
   175     \value OutInQuint   \inlineimage qeasingcurve-outinquint.png
   166                         \br
   176                         \br
   167                         Easing curve for a cubic (t^5) function:
   177                         Easing curve for a quintic (t^5) function:
   168                         deceleration until halfway, then acceleration.
   178                         deceleration until halfway, then acceleration.
   169     \value InSine       \inlineimage qeasingcurve-insine.png
   179     \value InSine       \inlineimage qeasingcurve-insine.png
   170                         \br
   180                         \br
   171                         Easing curve for a sinusoidal (sin(t)) function:
   181                         Easing curve for a sinusoidal (sin(t)) function:
   172                         accelerating from zero velocity.
   182                         accelerating from zero velocity.