Review Request: Added Plasma::PendulumCurve class

Bruno Abinader brunoabinader at gmail.com
Fri Apr 23 00:26:21 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3513/
-----------------------------------------------------------

(Updated 2010-04-22 22:26:21.798330)


Review request for Plasma, Aaron Seigo, Marco Martin, igorto, and Adenilson Cavalcanti.


Changes
-------

Updated patch according to Marco Martin's review. Plasma::RotationAnimation still has some changes, but the interface now remains the same. This seems to help me find out that after Aaron Seigo's EasingAnimation class, we're doing double work on every animation which uses easingCurve()->valueForProgress() to calculate the delta. Also, Plasma::PendulumCurve is now properly exported from Plasma. A new example code for "Animation Example" plasmoid can be found in http://pastebin.com/cJtktUwR


Summary (updated)
-------

The Plasma::PendulumCurve class subclasses from Qt's QEasingCurve and implements a static function which simulates a "pendulum" effect by varying the progress value from 0 to 1, 1 to 0, 0 to -1 and -1 to 0 in a linear way.

Together with this easing curve, some modifications were made on the Plasma::RotationAnimation to make the widget's rotation remain the last value given by updateEffectiveTime, and not a hard-coded one when the animation reaches the Stopped status.


Diffs (updated)
-----

  trunk/KDE/kdelibs/plasma/CMakeLists.txt 1117000 
  trunk/KDE/kdelibs/plasma/animations/pendulumcurve.h PRE-CREATION 
  trunk/KDE/kdelibs/plasma/animations/pendulumcurve.cpp PRE-CREATION 
  trunk/KDE/kdelibs/plasma/animations/rotation.cpp 1117000 
  trunk/KDE/kdelibs/plasma/animations/rotation_p.h 1117000 

Diff: http://reviewboard.kde.org/r/3513/diff


Testing (updated)
-------

An example code was added to the "plasma applet animation example" (in kdeexamples/plasma/c++/plasmoid/animation). That code will be later commited, after this request gets successfully merged. You can grab the example code here: http://pastebin.com/cJtktUwR


Thanks,

Bruno



More information about the Plasma-devel mailing list