<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API-Animations&amp;feed=atom&amp;action=history</id>
		<title>Development/Tutorials/Plasma/JavaScript/API-Animations - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API-Animations&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API-Animations&amp;action=history"/>
		<updated>2013-06-20T03:28:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API-Animations&amp;diff=59199&amp;oldid=prev</id>
		<title>Aseigo: Created page with '== Animations ==  = Creating Animation Objects = An Animation object can be retrieved by calling the ''Animation'' '''animation(string type)''' function. The ''string'' correspon...'</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/JavaScript/API-Animations&amp;diff=59199&amp;oldid=prev"/>
				<updated>2011-06-24T11:58:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;== Animations ==  = Creating Animation Objects = An Animation object can be retrieved by calling the &amp;#039;&amp;#039;Animation&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;animation(string type)&amp;#039;&amp;#039;&amp;#039; function. The &amp;#039;&amp;#039;string&amp;#039;&amp;#039; correspon...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Animations ==&lt;br /&gt;
&lt;br /&gt;
= Creating Animation Objects =&lt;br /&gt;
An Animation object can be retrieved by calling the ''Animation'' '''animation(string type)''' function. The ''string'' corresponds to the type of animation, which are listed below.&lt;br /&gt;
&lt;br /&gt;
New Animation objects are associated with (and therefore will animate) the Plasmoid by default. By setting the widgetToAnimate property, however, it can be assigned to animate any QGraphicsWidget desired (e.g. Plasma widgets such as push buttons, sliders, etc) .&lt;br /&gt;
&lt;br /&gt;
= Enumerations =&lt;br /&gt;
All Animation objects have the following enumerations:&lt;br /&gt;
&lt;br /&gt;
== MovementDirection ==&lt;br /&gt;
* '''MoveUp'''&lt;br /&gt;
* '''MoveUpRight'''&lt;br /&gt;
* '''MoveRight'''&lt;br /&gt;
* '''MoveDownRight'''&lt;br /&gt;
* '''MoveDown'''&lt;br /&gt;
* '''MoveDownLeft'''&lt;br /&gt;
* '''MoveLeft'''&lt;br /&gt;
* '''MoveUpLeft'''&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
The reference point, relative to the target widget, for the animation.&lt;br /&gt;
* '''Center'''&lt;br /&gt;
* '''Up'''&lt;br /&gt;
* '''Down'''&lt;br /&gt;
* '''Left'''&lt;br /&gt;
* '''Right'''&lt;br /&gt;
&lt;br /&gt;
== State ==&lt;br /&gt;
* '''Paused'''&lt;br /&gt;
* '''Running'''&lt;br /&gt;
* '''Stopped'''&lt;br /&gt;
&lt;br /&gt;
= Common API =&lt;br /&gt;
With the exception of Pause and Property animations, all animations support the following read/write properties: &lt;br /&gt;
&lt;br /&gt;
* ''AnimationDirection'' '''direction''': the direction the animation should play: AnimationForward or AnimationBackward&lt;br /&gt;
* ''int'' '''duration''': length of the animation in ms.&lt;br /&gt;
* ''EasingCurveType'' '''easingCurveType''': The easing curve to use in the animation&lt;br /&gt;
* ''QGraphicsWidget'' '''targetWidget''': the QGraphicsWidget (e.g. a Plasma::Widget) that this animation should operate on&lt;br /&gt;
&lt;br /&gt;
= Animation Groups =&lt;br /&gt;
Animations may be put into groups for convenient sequential or parallel running. Sequential groups, where the animations run one after the other, are handled by the '''AnimationGroup''' class. Parallel aniations, where the animations run simultaneously, are handled the '''ParallelAnimationGroup''' class. &lt;br /&gt;
&lt;br /&gt;
Animations are added to a group by calling '''add(Animation)''' on the group object. Groups may also be added to other groups.&lt;br /&gt;
&lt;br /&gt;
= Custom Animations =&lt;br /&gt;
Custom animation types can be defined using Javascript files that are included as part of the Plasmoid's package in the {{path|contents/animations/}} directory. To learn how to create such animations and access them from your Plasmoid, visit the [[Development/Tutorials/Plasma/JavaScript/Animations|Javascript Animations tutorial]].&lt;br /&gt;
&lt;br /&gt;
= Standard Animation Types =&lt;br /&gt;
Below is a list of all current standard animation types and their particular read/write properties:&lt;br /&gt;
&lt;br /&gt;
== Fade ==&lt;br /&gt;
* ''number'' '''startOpacity''': the opacity, between 0 and 1, that the target widget starts at when the animation begins&lt;br /&gt;
* ''number'' '''targetOpacity''': the opacity, between 0 and 1, that the target widget will be at the end of the animation&lt;br /&gt;
&lt;br /&gt;
== Geometry ==&lt;br /&gt;
* ''QRectF'' '''startGeometry''': the geometry that the target widget should start with&lt;br /&gt;
* ''QRectF'' '''targetGeometry''': the geometry the target widget will have at the end of the animation&lt;br /&gt;
&lt;br /&gt;
== Grow ==&lt;br /&gt;
* ''number'' '''factor''': the factor by which the target widget will grow to by the end of the animation&lt;br /&gt;
&lt;br /&gt;
== Pause ==&lt;br /&gt;
* ''number'' '''duration''': the number of milliseconds to pause for&lt;br /&gt;
&lt;br /&gt;
== Property ==&lt;br /&gt;
Animates an object (must be a QObject internally, which includes all Plasma Widgets) by manipulating one of its properties. Property animations have the following read/write properties:&lt;br /&gt;
&lt;br /&gt;
* ''any'' '''startValue'''&lt;br /&gt;
* ''any'' '''endValue'''&lt;br /&gt;
* ''ByteArray'' '''propertyName'''&lt;br /&gt;
* ''QObject'' '''targetObject'''&lt;br /&gt;
* ''number'' '''duration'''&lt;br /&gt;
* ''EasingCurve'' '''easingCurve'''&lt;br /&gt;
&lt;br /&gt;
== Pulser == &lt;br /&gt;
* ''number'' '''targetScale''': the maximum scale of the pulse-shadow item, relative to the target widget&lt;br /&gt;
&lt;br /&gt;
== Rotate ==&lt;br /&gt;
* ''QtAxis'' '''axis''': the axis along which to rotate the item&lt;br /&gt;
* ''Reference'' '''reference''': the reference point around which to rotate the target widget&lt;br /&gt;
* ''number'' '''angle''': the number of degrees to rotate the item&lt;br /&gt;
&lt;br /&gt;
== RotateStacked ==&lt;br /&gt;
* ''MovementDirection'' '''movementDirection''': the direction to rotate the widgets in the stack around&lt;br /&gt;
* ''QGraphicsLayoutItem'' '''layout'''&lt;br /&gt;
* ''Reference'' '''reference''': the reference point around which to rotate the target widget&lt;br /&gt;
* ''QGraphicsWidget'' '''backingWidget''': the widget in the &amp;quot;back&amp;quot; to rotate to the front of the target widget&lt;br /&gt;
&lt;br /&gt;
== Slide == &lt;br /&gt;
* ''MovementDirection'' '''movementDirection''': the direction to slide the widget&lt;br /&gt;
* ''number'' '''distance''': the distance to slide the widget&lt;br /&gt;
&lt;br /&gt;
== Zoom ==&lt;br /&gt;
* ''number'' '''zoom''': the factor by which to zoom the target widget&lt;br /&gt;
&lt;br /&gt;
= QEasingCurve =&lt;br /&gt;
Used to set the progress shape of Animation objects, this class has the following read-only properties:&lt;br /&gt;
&lt;br /&gt;
* ''string'' '''toString'''&lt;br /&gt;
* ''number'' '''valueForProgress(number progress)''': returns effective progress for the easing curve at progress. While progress must be between 0 and 1, the returned effective progress can be outside those bounds.&lt;br /&gt;
&lt;br /&gt;
as well as the following read/write property:&lt;br /&gt;
&lt;br /&gt;
* ''EasingCurveType'' '''type''': the shape of this easing curve&lt;br /&gt;
&lt;br /&gt;
and the following enumeration:&lt;br /&gt;
&lt;br /&gt;
* '''EasingCurveType'''&lt;br /&gt;
** Linear&lt;br /&gt;
** InQuad&lt;br /&gt;
** OutQuad&lt;br /&gt;
** InOutQuad&lt;br /&gt;
** OutInQuad&lt;br /&gt;
** InCubic&lt;br /&gt;
** OutCubic&lt;br /&gt;
** InOutCubic&lt;br /&gt;
** OutInCubic&lt;br /&gt;
** InQuart&lt;br /&gt;
** OutQuart&lt;br /&gt;
** InOutQuart&lt;br /&gt;
** OutInQuart&lt;br /&gt;
** InQuint&lt;br /&gt;
** OutQuint&lt;br /&gt;
** InOutQuint&lt;br /&gt;
** OutInQuint&lt;br /&gt;
** InSize&lt;br /&gt;
** OutSine&lt;br /&gt;
** InOutSine&lt;br /&gt;
** OutInSine&lt;br /&gt;
** InExpo&lt;br /&gt;
** OutExpo&lt;br /&gt;
** InOutExpo&lt;br /&gt;
** OutInExpo&lt;br /&gt;
** InCirc&lt;br /&gt;
** OutCirc&lt;br /&gt;
** InOutCirc&lt;br /&gt;
** InOutCirc&lt;br /&gt;
** OutInCirc&lt;br /&gt;
** InElastic&lt;br /&gt;
** OutElastic&lt;br /&gt;
** InOutElastic&lt;br /&gt;
** OutInElastic&lt;br /&gt;
** InBack&lt;br /&gt;
** OutBack&lt;br /&gt;
** InOutBack&lt;br /&gt;
** OutInBack&lt;br /&gt;
** InBounc&lt;br /&gt;
** OutBounce&lt;br /&gt;
** InOutBounce&lt;br /&gt;
** OutInBounce&lt;br /&gt;
** InCurve&lt;br /&gt;
** OutCurve&lt;br /&gt;
** SineCurve&lt;br /&gt;
** CosineCurve&lt;/div&gt;</summary>
		<author><name>Aseigo</name></author>	</entry>

	</feed>