Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6874

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?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" />
<!-- qtimeline.cpp -->
  <title>Qt 4.8: QTimeLine Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <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>QTimeLine</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></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="#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">QTimeLine Class Reference</h1>
<!-- $$$QTimeLine-brief -->
<p>The QTimeLine class provides a timeline for controlling animations. <a href="#details">More...</a></p>
<!-- @@@QTimeLine -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTimeLine&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qtimeline-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"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#CurveShape-enum">CurveShape</a></b> { EaseInCurve, EaseOutCurve, EaseInOutCurve, LinearCurve, SineCurve, CosineCurve }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#Direction-enum">Direction</a></b> { Forward, Backward }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#State-enum">State</a></b> { NotRunning, Paused, Running }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qtimeline.html#currentTime-prop">currentTime</a></b> : int</li>
<li class="fn"><b><a href="qtimeline.html#curveShape-prop">curveShape</a></b> : CurveShape</li>
<li class="fn"><b><a href="qtimeline.html#direction-prop">direction</a></b> : Direction</li>
<li class="fn"><b><a href="qtimeline.html#duration-prop">duration</a></b> : int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qtimeline.html#easingCurve-prop">easingCurve</a></b> : QEasingCurve</li>
<li class="fn"><b><a href="qtimeline.html#loopCount-prop">loopCount</a></b> : int</li>
<li class="fn"><b><a href="qtimeline.html#updateInterval-prop">updateInterval</a></b> : int</li>
</ul>
</td></tr>
</table>
<ul>
<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="qtimeline.html#QTimeLine">QTimeLine</a></b> ( int <i>duration</i> = 1000, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#dtor.QTimeLine">~QTimeLine</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#currentFrame">currentFrame</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#currentTime-prop">currentTime</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#currentValue">currentValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CurveShape </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#curveShape-prop">curveShape</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Direction </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#direction-prop">direction</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#duration-prop">duration</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QEasingCurve </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#easingCurve-prop">easingCurve</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#endFrame">endFrame</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#frameForTime">frameForTime</a></b> ( int <i>msec</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#loopCount-prop">loopCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#curveShape-prop">setCurveShape</a></b> ( CurveShape <i>shape</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#direction-prop">setDirection</a></b> ( Direction <i>direction</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#duration-prop">setDuration</a></b> ( int <i>duration</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#easingCurve-prop">setEasingCurve</a></b> ( const QEasingCurve &amp; <i>curve</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#setEndFrame">setEndFrame</a></b> ( int <i>frame</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#setFrameRange">setFrameRange</a></b> ( int <i>startFrame</i>, int <i>endFrame</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#loopCount-prop">setLoopCount</a></b> ( int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#setStartFrame">setStartFrame</a></b> ( int <i>frame</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#updateInterval-prop">setUpdateInterval</a></b> ( int <i>interval</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#startFrame">startFrame</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#state">state</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#updateInterval-prop">updateInterval</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual qreal </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#valueForTime">valueForTime</a></b> ( int <i>msec</i> ) const</td></tr>
</table>
<ul>
<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="qtimeline.html#resume">resume</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#currentTime-prop">setCurrentTime</a></b> ( int <i>msec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#setPaused">setPaused</a></b> ( bool <i>paused</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#start">start</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#stop">stop</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#toggleDirection">toggleDirection</a></b> ()</td></tr>
</table>
<ul>
<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="qtimeline.html#finished">finished</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#frameChanged">frameChanged</a></b> ( int <i>frame</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#stateChanged">stateChanged</a></b> ( QTimeLine::State <i>newState</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtimeline.html#valueChanged">valueChanged</a></b> ( qreal <i>value</i> )</td></tr>
</table>
<ul>
<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="qtimeline.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>event</i> )</td></tr>
</table>
<ul>
<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">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTimeLine-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTimeLine class provides a timeline for controlling animations.</p>
<p>It's most commonly used to animate a GUI control by calling a slot periodically. You can construct a timeline by passing its duration in milliseconds to QTimeLine's constructor. The timeline's duration describes for how long the animation will run. Then you set a suitable frame range by calling <a href="qtimeline.html#setFrameRange">setFrameRange</a>(). Finally connect the <a href="qtimeline.html#frameChanged">frameChanged</a>() signal to a suitable slot in the widget you wish to animate (e.g&#x2e;, setValue() in <a href="qprogressbar.html">QProgressBar</a>). When you proceed to calling <a href="qtimeline.html#start">start</a>(), QTimeLine will enter Running state, and start emitting <a href="qtimeline.html#frameChanged">frameChanged</a>() at regular intervals, causing your widget's connected property's value to grow from the lower end to the upper and of your frame range, at a steady rate. You can specify the update interval by calling <a href="qtimeline.html#updateInterval-prop">setUpdateInterval</a>(). When done, QTimeLine enters <a href="qtimeline.html#State-enum">NotRunning</a> state, and emits <a href="qtimeline.html#finished">finished</a>().</p>
<p>Example:</p>
<pre class="cpp"> <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
 progressBar <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qprogressbar.html">QProgressBar</a></span>(<span class="keyword">this</span>);
 progressBar<span class="operator">-</span><span class="operator">&gt;</span>setRange(<span class="number">0</span><span class="operator">,</span> <span class="number">100</span>);

 <span class="comment">// Construct a 1-second timeline with a frame range of 0 - 100</span>
 <span class="type">QTimeLine</span> <span class="operator">*</span>timeLine <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QTimeLine</span>(<span class="number">1000</span><span class="operator">,</span> <span class="keyword">this</span>);
 timeLine<span class="operator">-</span><span class="operator">&gt;</span><a href="qtimeline.html#setFrameRange">setFrameRange</a>(<span class="number">0</span><span class="operator">,</span> <span class="number">100</span>);
 <a href="qobject.html#connect">connect</a>(timeLine<span class="operator">,</span> SIGNAL(frameChanged(<span class="type">int</span>))<span class="operator">,</span> progressBar<span class="operator">,</span> SLOT(setValue(<span class="type">int</span>)));

 <span class="comment">// Clicking the push button will start the progress bar animation</span>
 pushButton <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>(tr(<span class="string">&quot;Start animation&quot;</span>)<span class="operator">,</span> <span class="keyword">this</span>);
 <a href="qobject.html#connect">connect</a>(pushButton<span class="operator">,</span> SIGNAL(clicked())<span class="operator">,</span> timeLine<span class="operator">,</span> SLOT(start()));
 <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span></pre>
<p>You can also use QTimeLine with the <a href="graphicsview.html#graphics-view">Graphics View framework</a> for animations. The <a href="qgraphicsitemanimation.html">QGraphicsItemAnimation</a> class implements animation of <a href="qgraphicsitem.html">QGraphicsItems</a> with a timeline.</p>
<p>By default the timeline runs once, from the beginning and towards the end, upon which you must call <a href="qtimeline.html#start">start</a>() again to restart from the beginning. To make the timeline loop, you can call <a href="qtimeline.html#loopCount-prop">setLoopCount</a>(), passing the number of times the timeline should run before finishing. The direction can also be changed, causing the timeline to run backward, by calling <a href="qtimeline.html#direction-prop">setDirection</a>(). You can also pause and unpause the timeline while it's running by calling <a href="qtimeline.html#setPaused">setPaused</a>(). For interactive control, the <a href="qtimeline.html#currentTime-prop">setCurrentTime</a>() function is provided, which sets the time position of the time line directly. Although most useful in <a href="qtimeline.html#State-enum">NotRunning</a> state, (e.g&#x2e;, connected to a <a href="qtimeline.html#valueChanged">valueChanged</a>() signal in a <a href="qslider.html">QSlider</a>,) this function can be called at any time.</p>
<p>The frame interface is useful for standard widgets, but QTimeLine can be used to control any type of animation. The heart of QTimeLine lies in the <a href="qtimeline.html#valueForTime">valueForTime</a>() function, which generates a <i>value</i> between 0 and 1 for a given time. This value is typically used to describe the steps of an animation, where 0 is the first step of an animation, and 1 is the last step. When running, QTimeLine generates values between 0 and 1 by calling <a href="qtimeline.html#valueForTime">valueForTime</a>() and emitting <a href="qtimeline.html#valueChanged">valueChanged</a>(). By default, <a href="qtimeline.html#valueForTime">valueForTime</a>() applies an interpolation algorithm to generate these value. You can choose from a set of predefined timeline algorithms by calling <a href="qtimeline.html#curveShape-prop">setCurveShape</a>().</p>
<p>Note that by default, QTimeLine uses the EaseInOut curve shape, which provides a value that grows slowly, then grows steadily, and finally grows slowly. For a custom timeline, you can reimplement <a href="qtimeline.html#valueForTime">valueForTime</a>(), in which case QTimeLine's <a href="qtimeline.html#curveShape-prop">curveShape</a> property is ignored.</p>
</div>
<p><b>See also </b><a href="qprogressbar.html">QProgressBar</a>, <a href="qprogressdialog.html">QProgressDialog</a>, and <a href="qgraphicsitemanimation.html">QGraphicsItemAnimation</a>.</p>
<!-- @@@QTimeLine -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CurveShape$$$EaseInCurve$$$EaseOutCurve$$$EaseInOutCurve$$$LinearCurve$$$SineCurve$$$CosineCurve -->
<h3 class="fn"><a name="CurveShape-enum"></a>enum QTimeLine::<span class="name">CurveShape</span></h3>
<p>This enum describes the default shape of <a href="qtimeline.html">QTimeLine</a>'s value curve. The default, shape is EaseInOutCurve. The curve defines the relation between the value and the timeline.</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>QTimeLine::EaseInCurve</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The value starts growing slowly, then increases in speed.</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::EaseOutCurve</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The value starts growing steadily, then ends slowly.</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::EaseInOutCurve</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The value starts growing slowly, then runs steadily, then grows slowly again.</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::LinearCurve</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The value grows linearly (e.g&#x2e;, if the duration is 1000 ms, the value at time 500 ms is 0.5).</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::SineCurve</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The value grows sinusoidally.</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::CosineCurve</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The value grows cosinusoidally.</td></tr>
</table>
<p><b>See also </b><a href="qtimeline.html#curveShape-prop">setCurveShape</a>().</p>
<!-- @@@CurveShape -->
<!-- $$$Direction$$$Forward$$$Backward -->
<h3 class="fn"><a name="Direction-enum"></a>enum QTimeLine::<span class="name">Direction</span></h3>
<p>This enum describes the direction of the timeline when in <a href="qtimeline.html#State-enum">Running</a> state.</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>QTimeLine::Forward</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The current time of the timeline increases with time (i.e&#x2e;, moves from 0 and towards the end / duration).</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::Backward</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The current time of the timeline decreases with time (i.e&#x2e;, moves from the end / duration and towards 0).</td></tr>
</table>
<p><b>See also </b><a href="qtimeline.html#direction-prop">setDirection</a>().</p>
<!-- @@@Direction -->
<!-- $$$State$$$NotRunning$$$Paused$$$Running -->
<h3 class="fn"><a name="State-enum"></a>enum QTimeLine::<span class="name">State</span></h3>
<p>This enum describes the state of the timeline.</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>QTimeLine::NotRunning</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The timeline is not running. This is the initial state of <a href="qtimeline.html">QTimeLine</a>, and the state <a href="qtimeline.html">QTimeLine</a> reenters when finished. The current time, frame and value remain unchanged until either <a href="qtimeline.html#currentTime-prop">setCurrentTime</a>() is called, or the timeline is started by calling <a href="qtimeline.html#start">start</a>().</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::Paused</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The timeline is paused (i.e&#x2e;, temporarily suspended). Calling setPaused(false) will resume timeline activity.</td></tr>
<tr><td class="topAlign"><tt>QTimeLine::Running</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The timeline is running. While control is in the event loop, <a href="qtimeline.html">QTimeLine</a> will update its current time at regular intervals, emitting <a href="qtimeline.html#valueChanged">valueChanged</a>() and <a href="qtimeline.html#frameChanged">frameChanged</a>() when appropriate.</td></tr>
</table>
<p><b>See also </b><a href="qtimeline.html#state">state</a>() and <a href="qtimeline.html#stateChanged">stateChanged</a>().</p>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$currentTime-prop$$$currentTime$$$setCurrentTimeint -->
<h3 class="fn"><a name="currentTime-prop"></a><span class="name">currentTime</span> : <span class="type">int</span></h3>
<p>This property holds the current time of the time line.</p>
<p>When <a href="qtimeline.html">QTimeLine</a> is in Running state, this value is updated continuously as a function of the duration and direction of the timeline. Otherwise, it is value that was current when <a href="qtimeline.html#stop">stop</a>() was called last, or the value set by setCurrentTime().</p>
<p>By default, this property contains a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>currentTime</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentTime</b></span> ( int <i>msec</i> )</td></tr>
</table>
<!-- @@@currentTime -->
<!-- $$$curveShape-prop$$$curveShape$$$setCurveShapeCurveShape -->
<h3 class="fn"><a name="curveShape-prop"></a><span class="name">curveShape</span> : <span class="type"><a href="qtimeline.html#CurveShape-enum">CurveShape</a></span></h3>
<p>This property holds the shape of the timeline curve.</p>
<p>The curve shape describes the relation between the time and value for the base implementation of <a href="qtimeline.html#valueForTime">valueForTime</a>().</p>
<p>If you have reimplemented <a href="qtimeline.html#valueForTime">valueForTime</a>(), this value is ignored.</p>
<p>By default, this property is set to <a href="qtimeline.html#CurveShape-enum">EaseInOutCurve</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> CurveShape </td><td class="memItemRight bottomAlign"><span class="name"><b>curveShape</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurveShape</b></span> ( CurveShape <i>shape</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtimeline.html#valueForTime">valueForTime</a>().</p>
<!-- @@@curveShape -->
<!-- $$$direction-prop$$$direction$$$setDirectionDirection -->
<h3 class="fn"><a name="direction-prop"></a><span class="name">direction</span> : <span class="type"><a href="qtimeline.html#Direction-enum">Direction</a></span></h3>
<p>This property holds the direction of the timeline when QTimeLine is in Running state.</p>
<p>This direction indicates whether the time moves from 0 towards the timeline duration, or from the value of the duration and towards 0 after <a href="qtimeline.html#start">start</a>() has been called.</p>
<p>By default, this property is set to <a href="qtimeline.html#Direction-enum">Forward</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Direction </td><td class="memItemRight bottomAlign"><span class="name"><b>direction</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDirection</b></span> ( Direction <i>direction</i> )</td></tr>
</table>
<!-- @@@direction -->
<!-- $$$duration-prop$$$duration$$$setDurationint -->
<h3 class="fn"><a name="duration-prop"></a><span class="name">duration</span> : <span class="type">int</span></h3>
<p>This property holds the total duration of the timeline in milliseconds.</p>
<p>By default, this value is 1000 (i.e&#x2e;, 1 second), but you can change this by either passing a duration to <a href="qtimeline.html">QTimeLine</a>'s constructor, or by calling setDuration(). The duration must be larger than 0.</p>
<p><b>Note:</b> Changing the duration does not cause the current time to be reset to zero or the new duration. You also need to call <a href="qtimeline.html#currentTime-prop">setCurrentTime</a>() with the desired value.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>duration</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDuration</b></span> ( int <i>duration</i> )</td></tr>
</table>
<!-- @@@duration -->
<!-- $$$easingCurve-prop$$$easingCurve$$$setEasingCurveconstQEasingCurve& -->
<h3 class="fn"><a name="easingCurve-prop"></a><span class="name">easingCurve</span> : <span class="type"><a href="qeasingcurve.html">QEasingCurve</a></span></h3>
<p>Specifies the easing curve that the timeline will use. If both easing curve and <a href="qtimeline.html#curveShape-prop">curveShape</a> are set, the last set property will override the previous one. (If <a href="qtimeline.html#valueForTime">valueForTime</a>() is reimplemented it will override both)</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QEasingCurve </td><td class="memItemRight bottomAlign"><span class="name"><b>easingCurve</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEasingCurve</b></span> ( const QEasingCurve &amp; <i>curve</i> )</td></tr>
</table>
<!-- @@@easingCurve -->
<!-- $$$loopCount-prop$$$loopCount$$$setLoopCountint -->
<h3 class="fn"><a name="loopCount-prop"></a><span class="name">loopCount</span> : <span class="type">int</span></h3>
<p>This property holds the number of times the timeline should loop before it's finished.</p>
<p>A loop count of of 0 means that the timeline will loop forever.</p>
<p>By default, this property contains a value of 1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>loopCount</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLoopCount</b></span> ( int <i>count</i> )</td></tr>
</table>
<!-- @@@loopCount -->
<!-- $$$updateInterval-prop$$$updateInterval$$$setUpdateIntervalint -->
<h3 class="fn"><a name="updateInterval-prop"></a><span class="name">updateInterval</span> : <span class="type">int</span></h3>
<p>This property holds the time in milliseconds between each time QTimeLine updates its current time.</p>
<p>When updating the current time, <a href="qtimeline.html">QTimeLine</a> will emit <a href="qtimeline.html#valueChanged">valueChanged</a>() if the current value changed, and <a href="qtimeline.html#frameChanged">frameChanged</a>() if the frame changed.</p>
<p>By default, the interval is 40 ms, which corresponds to a rate of 25 updates per second.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>updateInterval</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUpdateInterval</b></span> ( int <i>interval</i> )</td></tr>
</table>
<!-- @@@updateInterval -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTimeLine[overload1]$$$QTimeLineintQObject* -->
<h3 class="fn"><a name="QTimeLine"></a>QTimeLine::<span class="name">QTimeLine</span> ( <span class="type">int</span> <i>duration</i> = 1000, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a timeline with a duration of <i>duration</i> milliseconds. <i>parent</i> is passed to <a href="qobject.html">QObject</a>'s constructor. The default duration is 1000 milliseconds.</p>
<!-- @@@QTimeLine -->
<!-- $$$~QTimeLine[overload1]$$$~QTimeLine -->
<h3 class="fn"><a name="dtor.QTimeLine"></a>QTimeLine::<span class="name">~QTimeLine</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the timeline.</p>
<!-- @@@~QTimeLine -->
<!-- $$$currentFrame[overload1]$$$currentFrame -->
<h3 class="fn"><a name="currentFrame"></a><span class="type">int</span> QTimeLine::<span class="name">currentFrame</span> () const</h3>
<p>Returns the frame corresponding to the current time.</p>
<p><b>See also </b><a href="qtimeline.html#currentTime-prop">currentTime</a>(), <a href="qtimeline.html#frameForTime">frameForTime</a>(), and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@currentFrame -->
<!-- $$$currentValue[overload1]$$$currentValue -->
<h3 class="fn"><a name="currentValue"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTimeLine::<span class="name">currentValue</span> () const</h3>
<p>Returns the value corresponding to the current time.</p>
<p><b>See also </b><a href="qtimeline.html#valueForTime">valueForTime</a>() and <a href="qtimeline.html#currentFrame">currentFrame</a>().</p>
<!-- @@@currentValue -->
<!-- $$$endFrame[overload1]$$$endFrame -->
<h3 class="fn"><a name="endFrame"></a><span class="type">int</span> QTimeLine::<span class="name">endFrame</span> () const</h3>
<p>Returns the end frame, which is the frame corresponding to the end of the timeline (i.e&#x2e;, the frame for which the current value is 1).</p>
<p><b>See also </b><a href="qtimeline.html#setEndFrame">setEndFrame</a>() and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@endFrame -->
<!-- $$$finished[overload1]$$$finished -->
<h3 class="fn"><a name="finished"></a><span class="type">void</span> QTimeLine::<span class="name">finished</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when <a href="qtimeline.html">QTimeLine</a> finishes (i.e&#x2e;, reaches the end of its time line), and does not loop.</p>
<!-- @@@finished -->
<!-- $$$frameChanged[overload1]$$$frameChangedint -->
<h3 class="fn"><a name="frameChanged"></a><span class="type">void</span> QTimeLine::<span class="name">frameChanged</span> ( <span class="type">int</span> <i>frame</i> )<tt> [signal]</tt></h3>
<p><a href="qtimeline.html">QTimeLine</a> emits this signal at regular intervals when in <a href="qtimeline.html#State-enum">Running</a> state, but only if the current frame changes. <i>frame</i> is the current frame number.</p>
<p><b>See also </b><a href="qtimeline.html#setFrameRange">QTimeLine::setFrameRange</a>() and <a href="qtimeline.html#updateInterval-prop">QTimeLine::updateInterval</a>.</p>
<!-- @@@frameChanged -->
<!-- $$$frameForTime[overload1]$$$frameForTimeint -->
<h3 class="fn"><a name="frameForTime"></a><span class="type">int</span> QTimeLine::<span class="name">frameForTime</span> ( <span class="type">int</span> <i>msec</i> ) const</h3>
<p>Returns the frame corresponding to the time <i>msec</i>. This value is calculated using a linear interpolation of the start and end frame, based on the value returned by <a href="qtimeline.html#valueForTime">valueForTime</a>().</p>
<p><b>See also </b><a href="qtimeline.html#valueForTime">valueForTime</a>() and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@frameForTime -->
<!-- $$$resume[overload1]$$$resume -->
<h3 class="fn"><a name="resume"></a><span class="type">void</span> QTimeLine::<span class="name">resume</span> ()<tt> [slot]</tt></h3>
<p>Resumes the timeline from the current time. <a href="qtimeline.html">QTimeLine</a> will reenter Running state, and once it enters the event loop, it will update its current time, frame and value at regular intervals.</p>
<p>In contrast to <a href="qtimeline.html#start">start</a>(), this function does not restart the timeline before it resumes.</p>
<p><b>See also </b><a href="qtimeline.html#start">start</a>(), <a href="qtimeline.html#updateInterval-prop">updateInterval</a>(), <a href="qtimeline.html#frameChanged">frameChanged</a>(), and <a href="qtimeline.html#valueChanged">valueChanged</a>().</p>
<!-- @@@resume -->
<!-- $$$setEndFrame[overload1]$$$setEndFrameint -->
<h3 class="fn"><a name="setEndFrame"></a><span class="type">void</span> QTimeLine::<span class="name">setEndFrame</span> ( <span class="type">int</span> <i>frame</i> )</h3>
<p>Sets the end frame, which is the frame corresponding to the end of the timeline (i.e&#x2e;, the frame for which the current value is 1), to <i>frame</i>.</p>
<p><b>See also </b><a href="qtimeline.html#endFrame">endFrame</a>(), <a href="qtimeline.html#startFrame">startFrame</a>(), and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@setEndFrame -->
<!-- $$$setFrameRange[overload1]$$$setFrameRangeintint -->
<h3 class="fn"><a name="setFrameRange"></a><span class="type">void</span> QTimeLine::<span class="name">setFrameRange</span> ( <span class="type">int</span> <i>startFrame</i>, <span class="type">int</span> <i>endFrame</i> )</h3>
<p>Sets the timeline's frame counter to start at <i>startFrame</i>, and end and <i>endFrame</i>. For each time value, <a href="qtimeline.html">QTimeLine</a> will find the corresponding frame when you call <a href="qtimeline.html#currentFrame">currentFrame</a>() or <a href="qtimeline.html#frameForTime">frameForTime</a>() by interpolating, using the return value of <a href="qtimeline.html#valueForTime">valueForTime</a>().</p>
<p>When in Running state, <a href="qtimeline.html">QTimeLine</a> also emits the <a href="qtimeline.html#frameChanged">frameChanged</a>() signal when the frame changes.</p>
<p><b>See also </b><a href="qtimeline.html#startFrame">startFrame</a>(), <a href="qtimeline.html#endFrame">endFrame</a>(), <a href="qtimeline.html#start">start</a>(), and <a href="qtimeline.html#currentFrame">currentFrame</a>().</p>
<!-- @@@setFrameRange -->
<!-- $$$setPaused[overload1]$$$setPausedbool -->
<h3 class="fn"><a name="setPaused"></a><span class="type">void</span> QTimeLine::<span class="name">setPaused</span> ( <span class="type">bool</span> <i>paused</i> )<tt> [slot]</tt></h3>
<p>If <i>paused</i> is true, the timeline is paused, causing <a href="qtimeline.html">QTimeLine</a> to enter Paused state. No updates will be signaled until either <a href="qtimeline.html#start">start</a>() or setPaused(false) is called. If <i>paused</i> is false, the timeline is resumed and continues where it left.</p>
<p><b>See also </b><a href="qtimeline.html#state">state</a>() and <a href="qtimeline.html#start">start</a>().</p>
<!-- @@@setPaused -->
<!-- $$$setStartFrame[overload1]$$$setStartFrameint -->
<h3 class="fn"><a name="setStartFrame"></a><span class="type">void</span> QTimeLine::<span class="name">setStartFrame</span> ( <span class="type">int</span> <i>frame</i> )</h3>
<p>Sets the start frame, which is the frame corresponding to the start of the timeline (i.e&#x2e;, the frame for which the current value is 0), to <i>frame</i>.</p>
<p><b>See also </b><a href="qtimeline.html#startFrame">startFrame</a>(), <a href="qtimeline.html#endFrame">endFrame</a>(), and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@setStartFrame -->
<!-- $$$start[overload1]$$$start -->
<h3 class="fn"><a name="start"></a><span class="type">void</span> QTimeLine::<span class="name">start</span> ()<tt> [slot]</tt></h3>
<p>Starts the timeline. <a href="qtimeline.html">QTimeLine</a> will enter Running state, and once it enters the event loop, it will update its current time, frame and value at regular intervals. The default interval is 40 ms (i.e&#x2e;, 25 times per second). You can change the update interval by calling <a href="qtimeline.html#updateInterval-prop">setUpdateInterval</a>().</p>
<p>The timeline will start from position 0, or the end if going backward. If you want to resume a stopped timeline without restarting, you can call <a href="qtimeline.html#resume">resume</a>() instead.</p>
<p><b>See also </b><a href="qtimeline.html#resume">resume</a>(), <a href="qtimeline.html#updateInterval-prop">updateInterval</a>(), <a href="qtimeline.html#frameChanged">frameChanged</a>(), and <a href="qtimeline.html#valueChanged">valueChanged</a>().</p>
<!-- @@@start -->
<!-- $$$startFrame[overload1]$$$startFrame -->
<h3 class="fn"><a name="startFrame"></a><span class="type">int</span> QTimeLine::<span class="name">startFrame</span> () const</h3>
<p>Returns the start frame, which is the frame corresponding to the start of the timeline (i.e&#x2e;, the frame for which the current value is 0).</p>
<p><b>See also </b><a href="qtimeline.html#setStartFrame">setStartFrame</a>() and <a href="qtimeline.html#setFrameRange">setFrameRange</a>().</p>
<!-- @@@startFrame -->
<!-- $$$state[overload1]$$$state -->
<h3 class="fn"><a name="state"></a><span class="type"><a href="qtimeline.html#State-enum">State</a></span> QTimeLine::<span class="name">state</span> () const</h3>
<p>Returns the state of the timeline.</p>
<p><b>See also </b><a href="qtimeline.html#start">start</a>(), <a href="qtimeline.html#setPaused">setPaused</a>(), and <a href="qtimeline.html#stop">stop</a>().</p>
<!-- @@@state -->
<!-- $$$stateChanged[overload1]$$$stateChangedQTimeLine::State -->
<h3 class="fn"><a name="stateChanged"></a><span class="type">void</span> QTimeLine::<span class="name">stateChanged</span> ( <span class="type"><a href="qtimeline.html#State-enum">QTimeLine::State</a></span> <i>newState</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever <a href="qtimeline.html">QTimeLine</a>'s state changes. The new state is <i>newState</i>.</p>
<!-- @@@stateChanged -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn"><a name="stop"></a><span class="type">void</span> QTimeLine::<span class="name">stop</span> ()<tt> [slot]</tt></h3>
<p>Stops the timeline, causing <a href="qtimeline.html">QTimeLine</a> to enter <a href="qtimeline.html#State-enum">NotRunning</a> state.</p>
<p><b>See also </b><a href="qtimeline.html#start">start</a>().</p>
<!-- @@@stop -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn"><a name="timerEvent"></a><span class="type">void</span> QTimeLine::<span class="name">timerEvent</span> ( <span class="type"><a href="qtimerevent.html">QTimerEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<!-- @@@timerEvent -->
<!-- $$$toggleDirection[overload1]$$$toggleDirection -->
<h3 class="fn"><a name="toggleDirection"></a><span class="type">void</span> QTimeLine::<span class="name">toggleDirection</span> ()<tt> [slot]</tt></h3>
<p>Toggles the direction of the timeline. If the direction was Forward, it becomes Backward, and vice verca.</p>
<p><b>See also </b><a href="qtimeline.html#direction-prop">setDirection</a>().</p>
<!-- @@@toggleDirection -->
<!-- $$$valueChanged[overload1]$$$valueChangedqreal -->
<h3 class="fn"><a name="valueChanged"></a><span class="type">void</span> QTimeLine::<span class="name">valueChanged</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>value</i> )<tt> [signal]</tt></h3>
<p><a href="qtimeline.html">QTimeLine</a> emits this signal at regular intervals when in <a href="qtimeline.html#State-enum">Running</a> state, but only if the current value changes. <i>value</i> is the current value. <i>value</i> is a number between 0.0 and 1.0</p>
<p><b>See also </b><a href="qtimeline.html#duration-prop">QTimeLine::setDuration</a>(), <a href="qtimeline.html#valueForTime">QTimeLine::valueForTime</a>(), and <a href="qtimeline.html#updateInterval-prop">QTimeLine::updateInterval</a>.</p>
<!-- @@@valueChanged -->
<!-- $$$valueForTime[overload1]$$$valueForTimeint -->
<h3 class="fn"><a name="valueForTime"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QTimeLine::<span class="name">valueForTime</span> ( <span class="type">int</span> <i>msec</i> ) const<tt> [virtual]</tt></h3>
<p>Returns the timeline value for the time <i>msec</i>. The returned value, which varies depending on the curve shape, is always between 0 and 1. If <i>msec</i> is 0, the default implementation always returns 0.</p>
<p>Reimplement this function to provide a custom curve shape for your timeline.</p>
<p><b>See also </b><a href="qtimeline.html#CurveShape-enum">CurveShape</a> and <a href="qtimeline.html#frameForTime">frameForTime</a>().</p>
<!-- @@@valueForTime -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>