<class name="QTimeLine" doc="/** <p>The <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> 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 <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'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(int, int)"><tt>setFrameRange</tt></a>. Finally connect the <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></a> signal to a suitable slot in the widget you wish to animate (e.g&#x2e;, setValue() in <a href="%2E%2E/gui/QProgressBar.html"><tt>QProgressBar</tt></a>). When you proceed to calling <a href="QTimeLine.html#start()"><tt>start</tt></a>, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> will enter Running state, and start emitting <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></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#setUpdateInterval(int)"><tt>setUpdateInterval</tt></a>. When done, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> enters <a href="QTimeLine.html#State-enum"><tt>NotRunning</tt></a> state, and emits <a href="QTimeLine.html#finished()"><tt>finished</tt></a>.</p> <p>Example:</p> <pre> ... progressBar = new QProgressBar(this); progressBar-&gt;setRange(0, 100); <span class="comment"> // Construct a 1-second timeline with a frame range of 0 - 100</span> QTimeLine *timeLine = new QTimeLine(1000, this); timeLine-&gt;setFrameRange(0, 100); connect(timeLine, SIGNAL(frameChanged(int)), progressBar, SLOT(setValue(int))); <span class="comment"> // Clicking the push button will start the progress bar animation</span> pushButton = new QPushButton(tr(&quot;Start animation&quot;), this); connect(pushButton, SIGNAL(clicked()), timeLine, SLOT(start())); ...</pre> <p>You can also use <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> with the <a href="%2E%2E/graphicsview.html#graphics-view">Graphics View framework</tt></a> for animations. The <a href="%2E%2E/gui/QGraphicsItemAnimation.html"><tt>QGraphicsItemAnimation</tt></a> class implements animation of <a href="%2E%2E/gui/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()"><tt>start</tt></a> again to restart from the beginning. To make the timeline loop, you can call <a href="QTimeLine.html#setLoopCount(int)"><tt>setLoopCount</tt></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#setDirection(com.trolltech.qt.core.QTimeLine.Direction)"><tt>setDirection</tt></a>. You can also pause and unpause the timeline while it's running by calling <a href="QTimeLine.html#setPaused(boolean)"><tt>setPaused</tt></a>. For interactive control, the <a href="QTimeLine.html#setCurrentTime(int)"><tt>setCurrentTime</tt></a> function is provided, which sets the time position of the time line directly. Although most useful in <a href="QTimeLine.html#State-enum"><tt>NotRunning</tt></a> state, (e.g&#x2e;, connected to a <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> signal in a <a href="%2E%2E/gui/QSlider.html"><tt>QSlider</tt></a>,) this function can be called at any time.</p> <p>The frame interface is useful for standard widgets, but <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> can be used to control any type of animation. The heart of <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> lies in the <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></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, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> generates values between 0 and 1 by calling <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a> and emitting <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a>. By default, <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></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#setCurveShape(com.trolltech.qt.core.QTimeLine.CurveShape)"><tt>setCurveShape</tt></a>. By default, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> 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(int)"><tt>valueForTime</tt></a>, in which case <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'s <a href="QTimeLine.html#curveShape()"><tt>curveShape</tt></a> property is ignored.</p> @see <a href="%2E%2E/gui/QProgressBar.html"><tt>QProgressBar</tt></a> @see <a href="%2E%2E/gui/QProgressDialog.html"><tt>QProgressDialog</tt></a> @see <a href="%2E%2E/gui/QGraphicsItemAnimation.html"><tt>QGraphicsItemAnimation</tt></a> */"> <signal name="protected final void finished()" doc="/** <p>This signal is emitted when <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> finishes (i.e&#x2e;, reaches the end of its time line), and does not loop.</p> <dl> <dt><b>Compatible Slot Signature:</b></dt> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void frameChanged(int arg__1)" doc="/** <p><a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> emits this signal at regular intervals when in <a href="QTimeLine.html#State-enum">Running</tt></a> state, but only if the current frame changes. <tt>arg__1</tt> is the current frame number.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(int arg__1)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><tt>QTimeLine::setFrameRange</tt>, <tt>QTimeLine::updateInterval</tt></dd> </dl> */"/> <signal name="protected final void stateChanged(com.trolltech.qt.core.QTimeLine.State newState)" doc="/** <p>This signal is emitted whenever <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'s state changes. The new state is <tt>newState</tt>.</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(com.trolltech.qt.core.QTimeLine.State newState)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> */"/> <signal name="protected final void valueChanged(double x)" doc="/** <p><a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> emits this signal at regular intervals when in <a href="QTimeLine.html#State-enum">Running</tt></a> state, but only if the current value changes. <tt>x</tt> is the current value. <tt>x</tt> is a number between 0.0 and 1.0</p> <dl> <dt><b>Compatible Slot Signatures:</b></dt> <dd><tt>void mySlot(double x)</tt></dd> <dd><tt>void mySlot()</tt></dd> </dl> <dl> <dt><b>See Also:</b></dt> <dd><tt>QTimeLine::setDuration</tt>, <tt>QTimeLine::valueForTime</tt>, <tt>QTimeLine::updateInterval</tt></dd> </dl> */"/> <method name="public QTimeLine(int duration, com.trolltech.qt.core.QObject parent)" doc="/** <p>Constructs a timeline with a duration of <tt>duration</tt> milliseconds. <tt>parent</tt> is passed to <a href="QObject.html#QObject(com.trolltech.qt.core.QObject)"><tt>QObject</tt></a>'s constructor. The default duration is 1000 milliseconds.</p> */"/> <method name="public QTimeLine(int duration)" doc="/** <p>Equivalent to <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>(<tt>duration</tt>, 0). */"/> <method name="public QTimeLine()" doc="/** <p>Equivalent to <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>(1000, 0). */"/> <method name="public final int currentFrame()" doc="/** <p>Returns the frame corresponding to the current time.</p> @see <a href="QTimeLine.html#currentTime()"><tt>currentTime</tt></a> @see <a href="QTimeLine.html#frameForTime(int)"><tt>frameForTime</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final int currentTime()" doc="/** <p>Returns the current time of the time line..</p> <p>When <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></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()"><tt>stop</tt></a> was called last, or the value set by <a href="QTimeLine.html#setCurrentTime(int)"><tt>setCurrentTime</tt></a>.</p> @see <a href="QTimeLine.html#setCurrentTime(int)"><tt>setCurrentTime</tt></a> */"/> <method name="public final double currentValue()" doc="/** <p>Returns the value corresponding to the current time.</p> @see <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a> @see <a href="QTimeLine.html#currentFrame()"><tt>currentFrame</tt></a> */"/> <method name="public final com.trolltech.qt.core.QTimeLine.CurveShape curveShape()" doc="/** <p>Returns 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(int)"><tt>valueForTime</tt></a>.</p> <p>If you have reimplemented <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a>, this value is ignored.</p> @see <a href="QTimeLine.html#setCurveShape(com.trolltech.qt.core.QTimeLine.CurveShape)"><tt>setCurveShape</tt></a> @see <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a> */"/> <method name="public final com.trolltech.qt.core.QTimeLine.Direction direction()" doc="/** <p>Returns the direction of the timeline when <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> is in <a href="QTimeLine.html#State-enum">Running</tt></a> 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()"><tt>start</tt></a> has been called.</p> @see <a href="QTimeLine.html#setDirection(com.trolltech.qt.core.QTimeLine.Direction)"><tt>setDirection</tt></a> */"/> <method name="public final int duration()" doc="/** <p>Returns 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(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'s constructor, or by calling <a href="QTimeLine.html#setDuration(int)"><tt>setDuration</tt></a>. The duration must be larger than 0.</p> @see <a href="QTimeLine.html#setDuration(int)"><tt>setDuration</tt></a> */"/> <method name="public final int endFrame()" doc="/** <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> @see <a href="QTimeLine.html#setEndFrame(int)"><tt>setEndFrame</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final int frameForTime(int msec)" doc="/** <p>Returns the frame corresponding to the time <tt>msec</tt>. 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(int)"><tt>valueForTime</tt></a>.</p> @see <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final int loopCount()" doc="/** <p>Returns 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> @see <a href="QTimeLine.html#setLoopCount(int)"><tt>setLoopCount</tt></a> */"/> <method name="public final void resume()" doc="/** <p>Resumes the timeline from the current time. <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></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()"><tt>start</tt></a>, this function does not restart the timeline before is resumes.</p> @see <a href="QTimeLine.html#start()"><tt>start</tt></a> @see <a href="QTimeLine.html#updateInterval()"><tt>updateInterval</tt></a> @see <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></a> @see <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> */"/> <method name="public final void setCurrentTime(int msec)" doc="/** <p>Sets the current time of the time line. to <tt>msec</tt>.</p> <p>When <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></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()"><tt>stop</tt></a> was called last, or the value set by <a href="QTimeLine.html#setCurrentTime(int)"><tt>setCurrentTime</tt></a>.</p> @see <a href="QTimeLine.html#currentTime()"><tt>currentTime</tt></a> */"/> <method name="public final void setCurveShape(com.trolltech.qt.core.QTimeLine.CurveShape shape)" doc="/** <p>Sets the shape of the timeline curve. to <tt>shape</tt>.</p> <p>The curve shape describes the relation between the time and value for the base implementation of <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a>.</p> <p>If you have reimplemented <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a>, this value is ignored.</p> @see <a href="QTimeLine.html#curveShape()"><tt>curveShape</tt></a> @see <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a> */"/> <method name="public final void setDirection(com.trolltech.qt.core.QTimeLine.Direction direction)" doc="/** <p>Sets the direction of the timeline when <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> is in <a href="QTimeLine.html#State-enum">Running</tt></a> state. to <tt>direction</tt>.</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()"><tt>start</tt></a> has been called.</p> @see <a href="QTimeLine.html#direction()"><tt>direction</tt></a> */"/> <method name="public final void setDuration(int duration)" doc="/** <p>Sets the total duration of the timeline in milliseconds. to <tt>duration</tt>.</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(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'s constructor, or by calling <a href="QTimeLine.html#setDuration(int)"><tt>setDuration</tt></a>. The duration must be larger than 0.</p> @see <a href="QTimeLine.html#duration()"><tt>duration</tt></a> */"/> <method name="public final void setEndFrame(int frame)" doc="/** <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 <tt>frame</tt>.</p> @see <a href="QTimeLine.html#endFrame()"><tt>endFrame</tt></a> @see <a href="QTimeLine.html#startFrame()"><tt>startFrame</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final void setFrameRange(int startFrame, int endFrame)" doc="/** <p>Sets the timeline's frame counter to start at <tt>startFrame</tt>, and end and <tt>endFrame</tt>. For each time value, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> will find the corresponding frame when you call <a href="QTimeLine.html#currentFrame()"><tt>currentFrame</tt></a> or <a href="QTimeLine.html#frameForTime(int)"><tt>frameForTime</tt></a> by interpolating, using the return value of <a href="QTimeLine.html#valueForTime(int)"><tt>valueForTime</tt></a>.</p> <p>When in Running state, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> also emits the <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></a> signal when the frame changes.</p> @see <a href="QTimeLine.html#startFrame()"><tt>startFrame</tt></a> @see <a href="QTimeLine.html#endFrame()"><tt>endFrame</tt></a> @see <a href="QTimeLine.html#start()"><tt>start</tt></a> @see <a href="QTimeLine.html#currentFrame()"><tt>currentFrame</tt></a> */"/> <method name="public final void setLoopCount(int count)" doc="/** <p>Sets the number of times the timeline should loop before it's finished. to <tt>count</tt>.</p> <p>A loop count of of 0 means that the timeline will loop forever.</p> @see <a href="QTimeLine.html#loopCount()"><tt>loopCount</tt></a> */"/> <method name="public final void setPaused(boolean paused)" doc="/** <p>If <tt>paused</tt> is true, the timeline is paused, causing <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> to enter Paused state. No updates will be signaled until either <a href="QTimeLine.html#start()"><tt>start</tt></a> or <a href="QTimeLine.html#setPaused(boolean)"><tt>setPaused</tt></a>(false) is called. If <tt>paused</tt> is false, the timeline is resumed and continues where it left.</p> @see <a href="QTimeLine.html#state()"><tt>state</tt></a> @see <a href="QTimeLine.html#start()"><tt>start</tt></a> */"/> <method name="public final void setStartFrame(int frame)" doc="/** <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 <tt>frame</tt>.</p> @see <a href="QTimeLine.html#startFrame()"><tt>startFrame</tt></a> @see <a href="QTimeLine.html#endFrame()"><tt>endFrame</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final void setUpdateInterval(int interval)" doc="/** <p>Sets the time in milliseconds between each time <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> updates its current time. to <tt>interval</tt>.</p> <p>When updating the current time, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> will emit <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> if the current value changed, and <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></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> @see <a href="QTimeLine.html#updateInterval()"><tt>updateInterval</tt></a> */"/> <method name="public final void start()" doc="/** <p>Starts or restarts the timeline. <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></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#setUpdateInterval(int)"><tt>setUpdateInterval</tt></a>.</p> <p>If you want to resume a stopped timeline without restarting, you can call <a href="QTimeLine.html#resume()"><tt>resume</tt></a> instead.</p> @see <a href="QTimeLine.html#resume()"><tt>resume</tt></a> @see <a href="QTimeLine.html#updateInterval()"><tt>updateInterval</tt></a> @see <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></a> @see <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> */"/> <method name="public final int startFrame()" doc="/** <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> @see <a href="QTimeLine.html#setStartFrame(int)"><tt>setStartFrame</tt></a> @see <a href="QTimeLine.html#setFrameRange(int, int)"><tt>setFrameRange</tt></a> */"/> <method name="public final com.trolltech.qt.core.QTimeLine.State state()" doc="/** <p>Returns the state of the timeline.</p> @see <a href="QTimeLine.html#start()"><tt>start</tt></a> @see <a href="QTimeLine.html#setPaused(boolean)"><tt>setPaused</tt></a> @see <a href="QTimeLine.html#stop()"><tt>stop</tt></a> */"/> <method name="public final void stop()" doc="/** <p>Stops the timeline, causing <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> to enter <a href="QTimeLine.html#State-enum"><tt>NotRunning</tt></a> state.</p> @see <a href="QTimeLine.html#start()"><tt>start</tt></a> */"/> <method name="public final void toggleDirection()" doc="/** <p>Toggles the direction of the timeline. If the direction was Forward, it becomes Backward, and vice verca.</p> @see <a href="QTimeLine.html#setDirection(com.trolltech.qt.core.QTimeLine.Direction)"><tt>setDirection</tt></a> */"/> <method name="public final int updateInterval()" doc="/** <p>Returns the time in milliseconds between each time <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> updates its current time..</p> <p>When updating the current time, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> will emit <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> if the current value changed, and <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></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> @see <a href="QTimeLine.html#setUpdateInterval(int)"><tt>setUpdateInterval</tt></a> */"/> <method name="protected void timerEvent(com.trolltech.qt.core.QTimerEvent event)" doc="/** <p>This function is reimplemented for internal reasons.</p> */"/> <method name="public double valueForTime(int msec)" doc="/** <p>Returns the timeline value for the time <tt>msec</tt>. The returned value, which varies depending on the curve shape, is always between 0 and 1. If <tt>msec</tt> is 0, the default implementation always returns 0.</p> <p>Reimplement this function to provide a custom curve shape for your timeline.</p> @see <a href="QTimeLine.html#CurveShape-enum"><tt>CurveShape</tt></a> @see <a href="QTimeLine.html#frameForTime(int)"><tt>frameForTime</tt></a> */"/> <enum name="Direction" doc="/** <p>This enum describes the direction of the timeline when in <a href="QTimeLine.html#State-enum">Running</tt></a> state.</p> @see <a href="QTimeLine.html#setDirection(com.trolltech.qt.core.QTimeLine.Direction)"><tt>setDirection</tt></a> */"> <enum-value name="Forward" doc="/** <p>The current time of the timeline increases with time (i.e&#x2e;, moves from 0 and towards the end / duration).</p> */"/> <enum-value name="Backward" doc="/** <p>The current time of the timeline decreases with time (i.e&#x2e;, moves from the end / duration and towards 0).</p> */"/> </enum> <enum name="CurveShape" doc="/** <p>This enum describes the default shape of <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>'s value curve. The default, shape is <a href="QTimeLine.html#CurveShape-enum"><tt>EaseInOutCurve</tt></a>. The curve defines the relation between the value and the timeline.</p> @see <a href="QTimeLine.html#setCurveShape(com.trolltech.qt.core.QTimeLine.CurveShape)"><tt>setCurveShape</tt></a> */"> <enum-value name="EaseInCurve" doc="/** <p>The value starts growing slowly, then increases in speed.</p> */"/> <enum-value name="EaseOutCurve" doc="/** <p>The value starts growing steadily, then ends slowly.</p> */"/> <enum-value name="EaseInOutCurve" doc="/** <p>The value starts growing slowly, the runs steadily, then grows slowly again.</p> */"/> <enum-value name="LinearCurve" doc="/** <p>The value grows linearly (e.g&#x2e;, if the duration is 1000 ms, the value at time 500 ms is 0.5).</p> */"/> <enum-value name="SineCurve" doc="/** <p>The value grows sinusoidally.</p> */"/> </enum> <enum name="State" doc="/** <p>This enum describes the state of the timeline.</p> @see <a href="QTimeLine.html#state()"><tt>state</tt></a> @see <a href="QTimeLine.html#stateChanged(com.trolltech.qt.core.QTimeLine.State)"><tt>stateChanged</tt></a> */"> <enum-value name="NotRunning" doc="/** <p>The timeline is not running. This is the initial state of <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a>, and the state <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> reenters when finished. The current time, frame and value remain unchanged until either <a href="QTimeLine.html#setCurrentTime(int)"><tt>setCurrentTime</tt></a> is called, or the timeline is started by calling <a href="QTimeLine.html#start()"><tt>start</tt></a>.</p> */"/> <enum-value name="Paused" doc="/** <p>The timeline is paused (i.e&#x2e;, temporarily suspended). Calling <a href="QTimeLine.html#setPaused(boolean)"><tt>setPaused</tt></a>(false) will resume timeline activity.</p> */"/> <enum-value name="Running" doc="/** <p>The timeline is running. While control is in the event loop, <a href="QTimeLine.html#QTimeLine(int, com.trolltech.qt.core.QObject)"><tt>QTimeLine</tt></a> will update its current time at regular intervals, emitting <a href="QTimeLine.html#valueChanged(double)"><tt>valueChanged</tt></a> and <a href="QTimeLine.html#frameChanged(int)"><tt>frameChanged</tt></a> when appropriate.</p> */"/> </enum> </class>