From kde-commits Tue Jan 12 09:22:47 2010 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Tue, 12 Jan 2010 09:22:47 +0000 To: kde-commits Subject: KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code Message-Id: <1263288167.475048.20105.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=126328817523182 SVN commit 1073424 by aseigo: api fixes M +7 -6 main --- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code/main #1073423:1073424 @@ -31,7 +31,7 @@ // There are several stock animations provided in Plasma, and you // can access them by name (case insenseitive) pulseAnimation = animation('pulse') -pulseAnimation.widgetToAnimate = button +pulseAnimation.targetWidget = button // Set the duration to be 1/5th of a second, or 200ms pulseAnimation.duration = 200 @@ -55,12 +55,13 @@ fadeAnimation = animation('fade') fadeAnimation.startOpacity = 1 fadeAnimation.targetOpacity = 0.5 -fadeAnimation.widgetToAnimate = button +fadeAnimation.targetWidget = button // Create a Rotation animation and set it to operate on the button rotateAnimation = animation('rotate') rotateAnimation.angle = 180 -rotateAnimation.widgetToAnimate = button +rotateAnimation.targetWidget = button +rotateAnimation.easingCurveType = InOutQuadEasingCurve // 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 @@ -76,7 +77,7 @@ rotateAndFadeAnimationGroup.start() // now reverse the direction for the next click! - rotateAndFadeAnimationGroup.forwards = !rotateAndFadeAnimationGroup.forwards + rotateAndFadeAnimationGroup.direction = rotateAndFadeAnimationGroup.direction == AnimationForward ? AnimationBackward : AnimationForward; } // connect the clicked signal to our function above button.clicked.connect(startRotateAndFadeAnimation); @@ -115,7 +116,7 @@ // Create a Rotation animation and set it to operate on the first label, // then add it to the group rotateAnimation = animation('rotate') -rotateAnimation.widgetToAnimate = label1 +rotateAnimation.targetWidget = label1 rotateAnimation.angle = 360 rotateLabelsAnimationGroup.addAnimation(rotateAnimation) @@ -127,7 +128,7 @@ // 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.targetWidget = label2 rotateAnimation.angle = 360 rotateLabelsAnimationGroup.addAnimation(rotateAnimation)