Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 262

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstractanimation.cpp -->
  <title>QAbstractAnimation Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QAbstractAnimation</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QAbstractAnimation Class</h1>
<!-- $$$QAbstractAnimation-brief -->
<p>The <a href="qabstractanimation.html">QAbstractAnimation</a> class is the base of all animations. <a href="#details">More...</a></p>
<!-- @@@QAbstractAnimation -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QAbstractAnimation&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.6</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qobject.html">QObject</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qanimationgroup.html">QAnimationGroup</a>, <a href="qpauseanimation.html">QPauseAnimation</a>, and <a href="qvariantanimation.html">QVariantAnimation</a></p>
</td></tr></table></div><ul>
<li><a href="qabstractanimation-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#DeletionPolicy-enum">DeletionPolicy</a></b> { KeepWhenStopped, DeleteWhenStopped }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.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="qabstractanimation.html#State-enum">State</a></b> { Stopped, Paused, Running }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractanimation.html#currentLoop-prop">currentLoop</a></b> : const int</li>
<li class="fn"><b><a href="qabstractanimation.html#currentTime-prop">currentTime</a></b> : int</li>
<li class="fn"><b><a href="qabstractanimation.html#direction-prop">direction</a></b> : Direction</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qabstractanimation.html#duration-prop">duration</a></b> : const int</li>
<li class="fn"><b><a href="qabstractanimation.html#loopCount-prop">loopCount</a></b> : int</li>
<li class="fn"><b><a href="qabstractanimation.html#state-prop">state</a></b> : const State</li>
</ul>
</td></tr>
</table></div>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#QAbstractAnimation">QAbstractAnimation</a></b>(QObject *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#dtor.QAbstractAnimation">~QAbstractAnimation</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#currentLoop-prop">currentLoop</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#currentLoopTime">currentLoopTime</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#currentTime-prop">currentTime</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Direction </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#direction-prop">direction</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#duration">duration</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAnimationGroup *</td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#group">group</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#loopCount-prop">loopCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.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="qabstractanimation.html#loopCount-prop">setLoopCount</a></b>(int <i>loopCount</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> State </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#state-prop">state</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#totalDuration">totalDuration</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#pause">pause</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#resume">resume</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#currentTime-prop">setCurrentTime</a></b>(int <i>msecs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.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="qabstractanimation.html#start">start</a></b>(QAbstractAnimation::DeletionPolicy <i>policy</i> = KeepWhenStopped)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#stop">stop</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#currentLoopChanged">currentLoopChanged</a></b>(int <i>currentLoop</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#directionChanged">directionChanged</a></b>(QAbstractAnimation::Direction <i>newDirection</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#finished">finished</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#stateChanged">stateChanged</a></b>(QAbstractAnimation::State <i>newState</i>, QAbstractAnimation::State <i>oldState</i>)</td></tr>
</table></div>
<ul>
<li class="fn">2 signals inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#updateCurrentTime">updateCurrentTime</a></b>(int <i>currentTime</i>) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#updateDirection">updateDirection</a></b>(QAbstractAnimation::Direction <i>direction</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#updateState">updateState</a></b>(QAbstractAnimation::State <i>newState</i>, QAbstractAnimation::State <i>oldState</i>)</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qabstractanimation.html#event">event</a></b>(QEvent *<i>event</i>)</td></tr>
</table></div>
<ul>
<li class="fn">9 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">11 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAbstractAnimation-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qabstractanimation.html">QAbstractAnimation</a> class is the base of all animations.</p>
<p>The class defines the functions for the functionality shared by all animations. By inheriting this class, you can create custom animations that plug into the rest of the animation framework.</p>
<p>The progress of an animation is given by its current time (<a href="qabstractanimation.html#currentLoopTime">currentLoopTime</a>()), which is measured in milliseconds from the start of the animation (0) to its end (<a href="qabstractanimation.html#duration">duration</a>()). The value is updated automatically while the animation is running. It can also be set directly with <a href="qabstractanimation.html#currentTime-prop">setCurrentTime</a>().</p>
<p>At any point an animation is in one of three states: <a href="qabstractanimation.html#State-enum">Running</a>, <a href="qabstractanimation.html#State-enum">Stopped</a>, or <a href="qabstractanimation.html#State-enum">Paused</a>--as defined by the <a href="qabstractanimation.html#State-enum">State</a> enum. The current state can be changed by calling <a href="qabstractanimation.html#start">start</a>(), <a href="qabstractanimation.html#stop">stop</a>(), <a href="qabstractanimation.html#pause">pause</a>(), or <a href="qabstractanimation.html#resume">resume</a>(). An animation will always reset its <a href="qabstractanimation.html#currentTime-prop">current time</a> when it is started. If paused, it will continue with the same current time when resumed. When an animation is stopped, it cannot be resumed, but will keep its current time (until started again). <a href="qabstractanimation.html">QAbstractAnimation</a> will emit <a href="qabstractanimation.html#stateChanged">stateChanged</a>() whenever its state changes.</p>
<p>An animation can loop any number of times by setting the <a href="qabstractanimation.html#loopCount-prop">loopCount</a> property. When an animation's current time reaches its <a href="qabstractanimation.html#duration">duration</a>(), it will reset the current time and keep running. A loop count of 1 (the default value) means that the animation will run one time. Note that a duration of -1 means that the animation will run until stopped; the current time will increase indefinitely. When the current time equals <a href="qabstractanimation.html#duration">duration</a>() and the animation is in its final loop, the <a href="qabstractanimation.html#State-enum">Stopped</a> state is entered, and the <a href="qabstractanimation.html#finished">finished</a>() signal is emitted.</p>
<p><a href="qabstractanimation.html">QAbstractAnimation</a> provides pure virtual functions used by subclasses to track the progress of the animation: <a href="qabstractanimation.html#duration">duration</a>() and <a href="qabstractanimation.html#updateCurrentTime">updateCurrentTime</a>(). The <a href="qabstractanimation.html#duration">duration</a>() function lets you report a duration for the animation (as discussed above). The animation framework calls <a href="qabstractanimation.html#updateCurrentTime">updateCurrentTime</a>() when current time has changed. By reimplementing this function, you can track the animation progress. Note that neither the interval between calls nor the number of calls to this function are defined; though, it will normally be 60 updates per second.</p>
<p>By reimplementing <a href="qabstractanimation.html#updateState">updateState</a>(), you can track the animation's state changes, which is particularly useful for animations that are not driven by time.</p>
</div>
<p><b>See also </b><a href="qvariantanimation.html">QVariantAnimation</a>, <a href="qpropertyanimation.html">QPropertyAnimation</a>, <a href="qanimationgroup.html">QAnimationGroup</a>, and <a href="animation-overview.html">The Animation Framework</a>.</p>
<!-- @@@QAbstractAnimation -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$DeletionPolicy$$$KeepWhenStopped$$$DeleteWhenStopped -->
<h3 class="fn" id="DeletionPolicy-enum"><a name="DeletionPolicy-enum"></a>enum QAbstractAnimation::<span class="name">DeletionPolicy</span></h3>
<div class="table"><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"><code>QAbstractAnimation::KeepWhenStopped</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The animation will not be deleted when stopped.</td></tr>
<tr><td class="topAlign"><code>QAbstractAnimation::DeleteWhenStopped</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The animation will be automatically deleted when stopped.</td></tr>
</table></div>
<!-- @@@DeletionPolicy -->
<!-- $$$Direction$$$Forward$$$Backward -->
<h3 class="fn" id="Direction-enum"><a name="Direction-enum"></a>enum QAbstractAnimation::<span class="name">Direction</span></h3>
<p>This enum describes the direction of the animation when in <a href="qabstractanimation.html#State-enum">Running</a> state.</p>
<div class="table"><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"><code>QAbstractAnimation::Forward</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The current time of the animation increases with time (i.e&#x2e;, moves from 0 and towards the end / duration).</td></tr>
<tr><td class="topAlign"><code>QAbstractAnimation::Backward</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The current time of the animation decreases with time (i.e&#x2e;, moves from the end / duration and towards 0).</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractanimation.html#direction-prop">direction</a>.</p>
<!-- @@@Direction -->
<!-- $$$State$$$Stopped$$$Paused$$$Running -->
<h3 class="fn" id="State-enum"><a name="State-enum"></a>enum QAbstractAnimation::<span class="name">State</span></h3>
<p>This enum describes the state of the animation.</p>
<div class="table"><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"><code>QAbstractAnimation::Stopped</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The animation is not running. This is the initial state of <a href="qabstractanimation.html">QAbstractAnimation</a>, and the state <a href="qabstractanimation.html">QAbstractAnimation</a> reenters when finished. The current time remain unchanged until either <a href="qabstractanimation.html#currentTime-prop">setCurrentTime</a>() is called, or the animation is started by calling <a href="qabstractanimation.html#start">start</a>().</td></tr>
<tr><td class="topAlign"><code>QAbstractAnimation::Paused</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The animation is paused (i.e&#x2e;, temporarily suspended). Calling <a href="qabstractanimation.html#resume">resume</a>() will resume animation activity.</td></tr>
<tr><td class="topAlign"><code>QAbstractAnimation::Running</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The animation is running. While control is in the event loop, <a href="qabstractanimation.html">QAbstractAnimation</a> will update its current time at regular intervals, calling <a href="qabstractanimation.html#updateCurrentTime">updateCurrentTime</a>() when appropriate.</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractanimation.html#state-prop">state</a>() and <a href="qabstractanimation.html#stateChanged">stateChanged</a>().</p>
<!-- @@@State -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$currentLoop-prop$$$currentLoop$$$currentLoopChangedint -->
<h3 class="fn" id="currentLoop-prop"><a name="currentLoop-prop"></a><span class="name">currentLoop</span> : const <span class="type">int</span></h3>
<p>This property holds the current loop of the animation</p>
<p>This property describes the current loop of the animation. By default, the animation's loop count is 1, and so the current loop will always be 0. If the loop count is 2 and the animation runs past its duration, it will automatically rewind and restart at current time 0, and current loop 1, and so on.</p>
<p>When the current loop changes, <a href="qabstractanimation.html">QAbstractAnimation</a> emits the <a href="qabstractanimation.html#currentLoopChanged">currentLoopChanged</a>() signal.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>currentLoop</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qabstractanimation.html#currentLoopChanged">currentLoopChanged</a></b></span>(int <i>currentLoop</i>)</td></tr>
</table></div>
<!-- @@@currentLoop -->
<!-- $$$currentTime-prop$$$currentTime$$$setCurrentTimeint -->
<h3 class="fn" id="currentTime-prop"><a name="currentTime-prop"></a><span class="name">currentTime</span> : <span class="type">int</span></h3>
<p>This property holds the current time and progress of the animation</p>
<p>This property describes the animation's current time. You can change the current time by calling setCurrentTime, or you can call <a href="qabstractanimation.html#start">start</a>() and let the animation run, setting the current time automatically as the animation progresses.</p>
<p>The animation's current time starts at 0, and ends at <a href="qabstractanimation.html#totalDuration">totalDuration</a>().</p>
<p><b>Access functions:</b></p>
<div class="table"><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>msecs</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qabstractanimation.html#loopCount-prop">loopCount</a> and <a href="qabstractanimation.html#currentLoopTime">currentLoopTime</a>().</p>
<!-- @@@currentTime -->
<!-- $$$direction-prop$$$direction$$$setDirectionDirection$$$directionChangedQAbstractAnimation::Direction -->
<h3 class="fn" id="direction-prop"><a name="direction-prop"></a><span class="name">direction</span> : <span class="type"><a href="qabstractanimation.html#Direction-enum">Direction</a></span></h3>
<p>This property holds the direction of the animation when it is in <a href="qabstractanimation.html#State-enum">Running</a> state.</p>
<p>This direction indicates whether the time moves from 0 towards the animation duration, or from the value of the duration and towards 0 after <a href="qabstractanimation.html#start">start</a>() has been called.</p>
<p>By default, this property is set to <a href="qabstractanimation.html#Direction-enum">Forward</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><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></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qabstractanimation.html#directionChanged">directionChanged</a></b></span>(QAbstractAnimation::Direction <i>newDirection</i>)</td></tr>
</table></div>
<!-- @@@direction -->
<!-- $$$duration-prop$$$duration -->
<h3 class="fn" id="duration-prop"><a name="duration-prop"></a><span class="name">duration</span> : const <span class="type">int</span></h3>
<p>This property holds the duration of the animation.</p>
<p>If the duration is -1, it means that the duration is undefined. In this case, <a href="qabstractanimation.html#loopCount-prop">loopCount</a> is ignored.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> virtual int </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qabstractanimation.html#duration">duration</a></b></span>() const = 0</td></tr>
</table></div>
<!-- @@@duration -->
<!-- $$$loopCount-prop$$$loopCount$$$setLoopCountint -->
<h3 class="fn" id="loopCount-prop"><a name="loopCount-prop"></a><span class="name">loopCount</span> : <span class="type">int</span></h3>
<p>This property holds the loop count of the animation</p>
<p>This property describes the loop count of the animation as an integer. By default this value is 1, indicating that the animation should run once only, and then stop. By changing it you can let the animation loop several times. With a value of 0, the animation will not run at all, and with a value of -1, the animation will loop forever until stopped. It is not supported to have loop on an animation that has an undefined duration. It will only run once.</p>
<p><b>Access functions:</b></p>
<div class="table"><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>loopCount</i>)</td></tr>
</table></div>
<!-- @@@loopCount -->
<!-- $$$state-prop$$$state$$$stateChangedQAbstractAnimation::StateQAbstractAnimation::State -->
<h3 class="fn" id="state-prop"><a name="state-prop"></a><span class="name">state</span> : const <span class="type"><a href="qabstractanimation.html#State-enum">State</a></span></h3>
<p>state of the animation.</p>
<p>This property describes the current state of the animation. When the animation state changes, <a href="qabstractanimation.html">QAbstractAnimation</a> emits the <a href="qabstractanimation.html#stateChanged">stateChanged</a>() signal.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> State </td><td class="memItemRight bottomAlign"><span class="name"><b>state</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qabstractanimation.html#stateChanged">stateChanged</a></b></span>(QAbstractAnimation::State <i>newState</i>, QAbstractAnimation::State <i>oldState</i>)</td></tr>
</table></div>
<!-- @@@state -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAbstractAnimation[overload1]$$$QAbstractAnimationQObject* -->
<h3 class="fn" id="QAbstractAnimation"><a name="QAbstractAnimation"></a>QAbstractAnimation::<span class="name">QAbstractAnimation</span>(<span class="type"><a href="qobject.html#QObject">QObject</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs the <a href="qabstractanimation.html">QAbstractAnimation</a> base class, and passes <i>parent</i> to <a href="qobject.html">QObject</a>'s constructor.</p>
<p><b>See also </b><a href="qvariantanimation.html">QVariantAnimation</a> and <a href="qanimationgroup.html">QAnimationGroup</a>.</p>
<!-- @@@QAbstractAnimation -->
<!-- $$$~QAbstractAnimation[overload1]$$$~QAbstractAnimation -->
<h3 class="fn" id="dtor.QAbstractAnimation"><a name="dtor.QAbstractAnimation"></a><code>[virtual] </code>QAbstractAnimation::<span class="name">~QAbstractAnimation</span>()</h3>
<p>Stops the animation if it's running, then destroys the <a href="qabstractanimation.html">QAbstractAnimation</a>. If the animation is part of a <a href="qanimationgroup.html">QAnimationGroup</a>, it is automatically removed before it's destroyed.</p>
<!-- @@@~QAbstractAnimation -->
<!-- $$$currentLoopChanged -->
<h3 class="fn" id="currentLoopChanged"><a name="currentLoopChanged"></a><code>[signal] </code><span class="type">void</span> QAbstractAnimation::<span class="name">currentLoopChanged</span>(<span class="type">int</span> <i>currentLoop</i>)</h3>
<p><a href="qabstractanimation.html">QAbstractAnimation</a> emits this signal whenever the current loop changes. <i>currentLoop</i> is the current loop.</p>
<p><b>Note:</b> Notifier signal for property <a href="qabstractanimation.html#currentLoop-prop">currentLoop</a>. </p><p><b>See also </b><a href="qabstractanimation.html#currentLoop-prop">currentLoop</a>() and <a href="qabstractanimation.html#loopCount-prop">loopCount</a>().</p>
<!-- @@@currentLoopChanged -->
<!-- $$$currentLoopTime[overload1]$$$currentLoopTime -->
<h3 class="fn" id="currentLoopTime"><a name="currentLoopTime"></a><span class="type">int</span> QAbstractAnimation::<span class="name">currentLoopTime</span>() const</h3>
<p>Returns the current time inside the current loop. It can go from 0 to <a href="qabstractanimation.html#duration">duration</a>().</p>
<p><b>See also </b><a href="qabstractanimation.html#duration">duration</a>() and <a href="qabstractanimation.html#currentTime-prop">currentTime</a>.</p>
<!-- @@@currentLoopTime -->
<!-- $$$directionChanged -->
<h3 class="fn" id="directionChanged"><a name="directionChanged"></a><code>[signal] </code><span class="type">void</span> QAbstractAnimation::<span class="name">directionChanged</span>(<span class="type"><a href="qabstractanimation.html#Direction-enum">QAbstractAnimation::Direction</a></span> <i>newDirection</i>)</h3>
<p><a href="qabstractanimation.html">QAbstractAnimation</a> emits this signal whenever the direction has been changed. <i>newDirection</i> is the new direction.</p>
<p><b>Note:</b> Notifier signal for property <a href="qabstractanimation.html#direction-prop">direction</a>. </p><p><b>See also </b><a href="qabstractanimation.html#direction-prop">direction</a>.</p>
<!-- @@@directionChanged -->
<!-- $$$duration -->
<h3 class="fn" id="duration"><a name="duration"></a><code>[pure virtual] </code><span class="type">int</span> QAbstractAnimation::<span class="name">duration</span>() const</h3>
<p>This pure virtual function returns the duration of the animation, and defines for how long <a href="qabstractanimation.html">QAbstractAnimation</a> should update the current time. This duration is local, and does not include the loop count.</p>
<p>A return value of -1 indicates that the animation has no defined duration; the animation should run forever until stopped. This is useful for animations that are not time driven, or where you cannot easily predict its duration (e.g&#x2e;, event driven audio playback in a game).</p>
<p>If the animation is a parallel <a href="qanimationgroup.html">QAnimationGroup</a>, the duration will be the longest duration of all its animations. If the animation is a sequential <a href="qanimationgroup.html">QAnimationGroup</a>, the duration will be the sum of the duration of all its animations.</p>
<p><b>Note:</b> Getter function for property <a href="qabstractanimation.html#duration-prop">duration</a>. </p><p><b>See also </b><a href="qabstractanimation.html#loopCount-prop">loopCount</a>.</p>
<!-- @@@duration -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[virtual protected] </code><span class="type">bool</span> QAbstractAnimation::<span class="name">event</span>(<span class="type"><a href="qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$finished[overload1]$$$finished -->
<h3 class="fn" id="finished"><a name="finished"></a><code>[signal] </code><span class="type">void</span> QAbstractAnimation::<span class="name">finished</span>()</h3>
<p><a href="qabstractanimation.html">QAbstractAnimation</a> emits this signal after the animation has stopped and has reached the end.</p>
<p>This signal is emitted after <a href="qabstractanimation.html#stateChanged">stateChanged</a>().</p>
<p><b>See also </b><a href="qabstractanimation.html#stateChanged">stateChanged</a>().</p>
<!-- @@@finished -->
<!-- $$$group[overload1]$$$group -->
<h3 class="fn" id="group"><a name="group"></a><span class="type"><a href="qanimationgroup.html">QAnimationGroup</a></span> *QAbstractAnimation::<span class="name">group</span>() const</h3>
<p>If this animation is part of a <a href="qanimationgroup.html">QAnimationGroup</a>, this function returns a pointer to the group; otherwise, it returns 0.</p>
<p><b>See also </b><a href="qanimationgroup.html#addAnimation">QAnimationGroup::addAnimation</a>().</p>
<!-- @@@group -->
<!-- $$$pause[overload1]$$$pause -->
<h3 class="fn" id="pause"><a name="pause"></a><code>[slot] </code><span class="type">void</span> QAbstractAnimation::<span class="name">pause</span>()</h3>
<p>Pauses the animation. When the animation is paused, <a href="qabstractanimation.html#state-prop">state</a>() returns Paused. The value of <a href="qabstractanimation.html#currentTime-prop">currentTime</a> will remain unchanged until <a href="qabstractanimation.html#resume">resume</a>() or <a href="qabstractanimation.html#start">start</a>() is called. If you want to continue from the current time, call <a href="qabstractanimation.html#resume">resume</a>().</p>
<p><b>See also </b><a href="qabstractanimation.html#start">start</a>(), <a href="qabstractanimation.html#state-prop">state</a>(), and <a href="qabstractanimation.html#resume">resume</a>().</p>
<!-- @@@pause -->
<!-- $$$resume[overload1]$$$resume -->
<h3 class="fn" id="resume"><a name="resume"></a><code>[slot] </code><span class="type">void</span> QAbstractAnimation::<span class="name">resume</span>()</h3>
<p>Resumes the animation after it was paused. When the animation is resumed, it emits the resumed() and <a href="qabstractanimation.html#stateChanged">stateChanged</a>() signals. The currenttime is not changed.</p>
<p><b>See also </b><a href="qabstractanimation.html#start">start</a>(), <a href="qabstractanimation.html#pause">pause</a>(), and <a href="qabstractanimation.html#state-prop">state</a>().</p>
<!-- @@@resume -->
<!-- $$$setPaused[overload1]$$$setPausedbool -->
<h3 class="fn" id="setPaused"><a name="setPaused"></a><code>[slot] </code><span class="type">void</span> QAbstractAnimation::<span class="name">setPaused</span>(<span class="type">bool</span> <i>paused</i>)</h3>
<p>If <i>paused</i> is true, the animation is paused. If <i>paused</i> is false, the animation is resumed.</p>
<p><b>See also </b><a href="qabstractanimation.html#state-prop">state</a>(), <a href="qabstractanimation.html#pause">pause</a>(), and <a href="qabstractanimation.html#resume">resume</a>().</p>
<!-- @@@setPaused -->
<!-- $$$start[overload1]$$$startQAbstractAnimation::DeletionPolicy -->
<h3 class="fn" id="start"><a name="start"></a><code>[slot] </code><span class="type">void</span> QAbstractAnimation::<span class="name">start</span>(<span class="type"><a href="qabstractanimation.html#DeletionPolicy-enum">QAbstractAnimation::DeletionPolicy</a></span> <i>policy</i> = KeepWhenStopped)</h3>
<p>Starts the animation. The <i>policy</i> argument says whether or not the animation should be deleted when it's done. When the animation starts, the <a href="qabstractanimation.html#stateChanged">stateChanged</a>() signal is emitted, and <a href="qabstractanimation.html#state-prop">state</a>() returns Running. When control reaches the event loop, the animation will run by itself, periodically calling <a href="qabstractanimation.html#updateCurrentTime">updateCurrentTime</a>() as the animation progresses.</p>
<p>If the animation is currently stopped or has already reached the end, calling start() will rewind the animation and start again from the beginning. When the animation reaches the end, the animation will either stop, or if the loop level is more than 1, it will rewind and continue from the beginning.</p>
<p>If the animation is already running, this function does nothing.</p>
<p><b>See also </b><a href="qabstractanimation.html#stop">stop</a>() and <a href="qabstractanimation.html#state-prop">state</a>().</p>
<!-- @@@start -->
<!-- $$$stateChanged -->
<h3 class="fn" id="stateChanged"><a name="stateChanged"></a><code>[signal] </code><span class="type">void</span> QAbstractAnimation::<span class="name">stateChanged</span>(<span class="type"><a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a></span> <i>newState</i>, <span class="type"><a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a></span> <i>oldState</i>)</h3>
<p><a href="qabstractanimation.html">QAbstractAnimation</a> emits this signal whenever the state of the animation has changed from <i>oldState</i> to <i>newState</i>. This signal is emitted after the virtual <a href="qabstractanimation.html#updateState">updateState</a>() function is called.</p>
<p><b>Note:</b> Notifier signal for property <a href="qabstractanimation.html#state-prop">state</a>. </p><p><b>See also </b><a href="qabstractanimation.html#updateState">updateState</a>().</p>
<!-- @@@stateChanged -->
<!-- $$$stop[overload1]$$$stop -->
<h3 class="fn" id="stop"><a name="stop"></a><code>[slot] </code><span class="type">void</span> QAbstractAnimation::<span class="name">stop</span>()</h3>
<p>Stops the animation. When the animation is stopped, it emits the <a href="qabstractanimation.html#stateChanged">stateChanged</a>() signal, and <a href="qabstractanimation.html#state-prop">state</a>() returns Stopped. The current time is not changed.</p>
<p>If the animation stops by itself after reaching the end (i.e&#x2e;, <a href="qabstractanimation.html#currentLoopTime">currentLoopTime</a>() == <a href="qabstractanimation.html#duration">duration</a>() and <a href="qabstractanimation.html#currentLoop-prop">currentLoop</a>() &gt; <a href="qabstractanimation.html#loopCount-prop">loopCount</a>() - 1), the <a href="qabstractanimation.html#finished">finished</a>() signal is emitted.</p>
<p><b>See also </b><a href="qabstractanimation.html#start">start</a>() and <a href="qabstractanimation.html#state-prop">state</a>().</p>
<!-- @@@stop -->
<!-- $$$totalDuration[overload1]$$$totalDuration -->
<h3 class="fn" id="totalDuration"><a name="totalDuration"></a><span class="type">int</span> QAbstractAnimation::<span class="name">totalDuration</span>() const</h3>
<p>Returns the total and effective duration of the animation, including the loop count.</p>
<p><b>See also </b><a href="qabstractanimation.html#duration">duration</a>() and <a href="qabstractanimation.html#currentTime-prop">currentTime</a>.</p>
<!-- @@@totalDuration -->
<!-- $$$updateCurrentTime[overload1]$$$updateCurrentTimeint -->
<h3 class="fn" id="updateCurrentTime"><a name="updateCurrentTime"></a><code>[pure virtual protected] </code><span class="type">void</span> QAbstractAnimation::<span class="name">updateCurrentTime</span>(<span class="type">int</span> <i>currentTime</i>)</h3>
<p>This pure virtual function is called every time the animation's <i>currentTime</i> changes.</p>
<p><b>See also </b><a href="qabstractanimation.html#updateState">updateState</a>().</p>
<!-- @@@updateCurrentTime -->
<!-- $$$updateDirection[overload1]$$$updateDirectionQAbstractAnimation::Direction -->
<h3 class="fn" id="updateDirection"><a name="updateDirection"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractAnimation::<span class="name">updateDirection</span>(<span class="type"><a href="qabstractanimation.html#Direction-enum">QAbstractAnimation::Direction</a></span> <i>direction</i>)</h3>
<p>This virtual function is called by <a href="qabstractanimation.html">QAbstractAnimation</a> when the direction of the animation is changed. The <i>direction</i> argument is the new direction.</p>
<p><b>See also </b><a href="qabstractanimation.html#direction-prop">setDirection</a>() and <a href="qabstractanimation.html#direction-prop">direction</a>().</p>
<!-- @@@updateDirection -->
<!-- $$$updateState[overload1]$$$updateStateQAbstractAnimation::StateQAbstractAnimation::State -->
<h3 class="fn" id="updateState"><a name="updateState"></a><code>[virtual protected] </code><span class="type">void</span> QAbstractAnimation::<span class="name">updateState</span>(<span class="type"><a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a></span> <i>newState</i>, <span class="type"><a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a></span> <i>oldState</i>)</h3>
<p>This virtual function is called by <a href="qabstractanimation.html">QAbstractAnimation</a> when the state of the animation is changed from <i>oldState</i> to <i>newState</i>.</p>
<p><b>See also </b><a href="qabstractanimation.html#start">start</a>(), <a href="qabstractanimation.html#stop">stop</a>(), <a href="qabstractanimation.html#pause">pause</a>(), and <a href="qabstractanimation.html#resume">resume</a>().</p>
<!-- @@@updateState -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    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. </p>
</div>
</body>
</html>