Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4694

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qpropertyanimation.cpp -->
<head>
  <title>Qt 4.6: QPropertyAnimation Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QPropertyAnimation"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QPropertyAnimation Class Reference<br /><span class="small-subtitle">[<a href="qtcore.html">QtCore</a> module]</span>
</h1>
<p>The QPropertyAnimation class animates Qt properties <a href="#details">More...</a></p>
<pre> #include &lt;QPropertyAnimation&gt;</pre><p>Inherits <a href="qvariantanimation.html">QVariantAnimation</a>.</p>
<p>This class was introduced in Qt 4.6.</p>
<ul>
<li><a href="qpropertyanimation-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li><div class="fn"><b><a href="qpropertyanimation.html#propertyName-prop">propertyName</a></b> : QByteArray</div></li>
<li><div class="fn"><b><a href="qpropertyanimation.html#targetObject-prop">targetObject</a></b> : QObject *</div></li>
</ul>
<ul>
<li><div bar="2" class="fn"></div>5 properties inherited from <a href="qvariantanimation.html#properties">QVariantAnimation</a></li>
<li><div bar="2" class="fn"></div>6 properties inherited from <a href="qabstractanimation.html#properties">QAbstractAnimation</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#QPropertyAnimation">QPropertyAnimation</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#QPropertyAnimation-2">QPropertyAnimation</a></b> ( QObject * <i>target</i>, const QByteArray &amp; <i>propertyName</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#dtor.QPropertyAnimation">~QPropertyAnimation</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#propertyName-prop">propertyName</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#propertyName-prop">setPropertyName</a></b> ( const QByteArray &amp; <i>propertyName</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#targetObject-prop">setTargetObject</a></b> ( QObject * <i>target</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QObject * </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#targetObject-prop">targetObject</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qvariantanimation.html#public-functions">QVariantAnimation</a></li>
<li><div bar="2" class="fn"></div>11 public functions inherited from <a href="qabstractanimation.html#public-functions">QAbstractAnimation</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#updateCurrentValue">updateCurrentValue</a></b> ( const QVariant &amp; <i>value</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qpropertyanimation.html#updateState">updateState</a></b> ( QAbstractAnimation::State <i>newState</i>, QAbstractAnimation::State <i>oldState</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>5 protected functions inherited from <a href="qvariantanimation.html#protected-functions">QVariantAnimation</a></li>
<li><div bar="2" class="fn"></div>4 protected functions inherited from <a href="qabstractanimation.html#protected-functions">QAbstractAnimation</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>6 public slots inherited from <a href="qabstractanimation.html#public-slots">QAbstractAnimation</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="qvariantanimation.html#signals">QVariantAnimation</a></li>
<li><div class="fn"></div>4 signals inherited from <a href="qabstractanimation.html#signals">QAbstractAnimation</a></li>
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>5 protected functions inherited from <a href="qvariantanimation.html#protected-functions">QVariantAnimation</a></li>
<li><div class="fn"></div>4 protected functions inherited from <a href="qabstractanimation.html#protected-functions">QAbstractAnimation</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QPropertyAnimation class animates Qt properties</p>
<p>QPropertyAnimation interpolates over <a href="properties.html">Qt properties</a>. As property values are stored in <a href="qvariant.html">QVariant</a>s, the class inherits <a href="qvariantanimation.html">QVariantAnimation</a>, and supports animation of the same <a href="qvariant.html#Type-enum">variant types</a> as its super class.</p>
<p>A class declaring properties must be a <a href="qobject.html">QObject</a>. To make it possible to animate a property, it must provide a setter (so that QPropertyAnimation can set the property's value). Note that this makes it possible to animate many of Qt's widgets. Let's look at an example:</p>
<pre> QPropertyAnimation *animation = new QPropertyAnimation(myWidget, &quot;geometry&quot;);
 animation-&gt;setDuration(10000);
 animation-&gt;setStartValue(QRect(0, 0, 100, 30));
 animation-&gt;setEndValue(QRect(250, 250, 100, 30));

 animation-&gt;start();</pre>
<p>The property name and the <a href="qobject.html">QObject</a> instance of which property should be animated are passed to the constructor. You can then specify the start and end value of the property. The procedure is equal for properties in classes you have implemented yourself--just check with <a href="qvariantanimation.html">QVariantAnimation</a> that your <a href="qvariant.html">QVariant</a> type is supported.</p>
<p>The <a href="qvariantanimation.html">QVariantAnimation</a> class description explains how to set up the animation in detail. Note, however, that if a start value is not set, the property will start at the value it had when the QPropertyAnimation instance was created.</p>
<p>QPropertyAnimation works like a charm on its own. For complex animations that, for instance, contain several objects, <a href="qanimationgroup.html">QAnimationGroup</a> is provided. An animation group is an animation that can contain other animations, and that can manage when its animations are played. Look at <a href="qparallelanimationgroup.html">QParallelAnimationGroup</a> for an example.</p>
<p>See also <a href="qvariantanimation.html">QVariantAnimation</a>, <a href="qanimationgroup.html">QAnimationGroup</a>, and <a href="animation-overview.html">The Animation Framework</a>.</p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/propertyName"></a>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/setPropertyName"></a>
<h3 class="fn"><a name="propertyName-prop"></a>propertyName : <a href="qbytearray.html">QByteArray</a></h3>
<p>This property holds the target property name for this animation.</p>
<p>This property defines the target property name for this animation. The property name is required for the animation to operate.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b>propertyName</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setPropertyName</b> ( const QByteArray &amp; <i>propertyName</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/targetObject"></a>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/setTargetObject"></a>
<h3 class="fn"><a name="targetObject-prop"></a>targetObject : <a href="qobject.html">QObject</a> *</h3>
<p>This property holds the target QObject for this animation.</p>
<p>This property defines the target <a href="qobject.html">QObject</a> for this animation.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QObject * </td><td class="memItemRight" valign="bottom"><b>targetObject</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setTargetObject</b> ( QObject * <i>target</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/QPropertyAnimation"></a>
<h3 class="fn"><a name="QPropertyAnimation"></a>QPropertyAnimation::QPropertyAnimation ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Construct a <a href="qpropertyanimation.html">QPropertyAnimation</a> object. <i>parent</i> is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
<h3 class="fn"><a name="QPropertyAnimation-2"></a>QPropertyAnimation::QPropertyAnimation ( <a href="qobject.html">QObject</a> * <i>target</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>propertyName</i>, <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Construct a <a href="qpropertyanimation.html">QPropertyAnimation</a> object. <i>parent</i> is passed to <a href="qobject.html">QObject</a>'s constructor. The animation changes the property <i>propertyName</i> on <i>target</i>. The default duration is 250ms.</p>
<p>See also <a href="qpropertyanimation.html#targetObject-prop">targetObject</a> and <a href="qpropertyanimation.html#propertyName-prop">propertyName</a>.</p>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/~QPropertyAnimation"></a>
<h3 class="fn"><a name="dtor.QPropertyAnimation"></a>QPropertyAnimation::~QPropertyAnimation ()</h3>
<p>Destroys the <a href="qpropertyanimation.html">QPropertyAnimation</a> instance.</p>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/event"></a>
<h3 class="fn"><a name="event"></a>bool QPropertyAnimation::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/updateCurrentValue"></a>
<h3 class="fn"><a name="updateCurrentValue"></a>void QPropertyAnimation::updateCurrentValue ( const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qvariantanimation.html#updateCurrentValue">QVariantAnimation::updateCurrentValue</a>().</p>
<p>This virtual function is called by <a href="qvariantanimation.html">QVariantAnimation</a> whenever the current value changes. <i>value</i> is the new, updated value. It updates the current value of the property on the target object.</p>
<p>See also <a href="qvariantanimation.html#currentValue-prop">currentValue</a> and <a href="qabstractanimation.html#currentTime-prop">currentTime</a>.</p>
<a name="//apple_ref/cpp/instm/QPropertyAnimation/updateState"></a>
<h3 class="fn"><a name="updateState"></a>void QPropertyAnimation::updateState ( <a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a> <i>newState</i>, <a href="qabstractanimation.html#State-enum">QAbstractAnimation::State</a> <i>oldState</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qabstractanimation.html#updateState">QAbstractAnimation::updateState</a>().</p>
<p>If the <a href="qvariantanimation.html#startValue-prop">startValue</a> is not defined when the state of the animation changes from Stopped to Running, the current property value is used as the initial value for the animation.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>