[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-12-08 6:12:47
Message-ID: 1260252767.938074.23349.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1060113 by aseigo:
start to port this, needs work in the bindings for groups
M +7 -8 main
--- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code/main #1060112:1060113
@@ -13,7 +13,7 @@
// since we don't define the parent item
// it will become the layout for our Plasmoid
layout = new LinearLayout();
-layout.setOrientation(QtVertical);
+layout.orientation = QtVertical;
//*************************************************************/
@@ -64,10 +64,9 @@
// Now we will add them to a group to run in parallel with each other
// this coordinates the animations for us and we will just use the animation
// group to start al of the animations
-rotateAndFadeAnimationGroup = new AnimationGroup
-rotateAndFadeAnimationGroup.parallel = true
-rotateAndFadeAnimationGroup.add(fadeAnimation)
-rotateAndFadeAnimationGroup.add(rotateAnimation)
+rotateAndFadeAnimationGroup = new ParallelAnimationGroup
+rotateAndFadeAnimationGroup.addAnimation(fadeAnimation)
+rotateAndFadeAnimationGroup.addAnimation(rotateAnimation)
// this function will be triggered by the 'Rotate and Fade' button being clicked
startRotateAndFadeAnimation = function()
@@ -118,19 +117,19 @@
rotateAnimation = animation('rotate')
rotateAnimation.widgetToAnimate = label1
rotateAnimation.angle = 360
-rotateLabelsAnimationGroup.add(rotateAnimation)
+rotateLabelsAnimationGroup.addAnimation(rotateAnimation)
// Let's create a pause to put between the two animations
pause = animation('pause')
pause.duration = 100
-rotateLabelsAnimationGroup.add(pause)
+rotateLabelsAnimationGroup.addAnimation(pause)
// Create a Rotation animation and set it to operate on the second label,
// then add it to the group
rotateAnimation = animation('rotate')
rotateAnimation.widgetToAnimate = label2
rotateAnimation.angle = 360
-rotateLabelsAnimationGroup.add(rotateAnimation)
+rotateLabelsAnimationGroup.addAnimation(rotateAnimation)
// finally, connect the button's clicked event to the start method in the
// animation group
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic