animation api changes

Aaron J. Seigo aseigo at kde.org
Fri Dec 4 02:24:26 CET 2009


hi all ..

so, the animation API is going through its final set of changes for 4.4. 
please take a look at it if you care to and give us feedback now before it's 
too late (as defined by "we are shipping it in 4.4 and are committed to that 
API").

the basic "shape" of the API is this:

* Plasma::Animator becomes a factory for Plasma::Animations

* Plasma::Animation IsA QAbstractAnimation with the bare essential pure 
virtuals implemented and which takes a QGraphicsWidget that should be animated

* Plasma::AnimationGroup IsA QAbstractAnimation that wraps a 
QAbstractAnimationGroup (this is the part i'm least sure about atm...) and 
makes switching from parallel to sequential easy (personally, i think Kinetic 
should have made parallel vs sequential a property, not introduced two 
different classes; it's a hassle). however, if we feel that the parallel-
>sequential switching is not worth it, we can simply kill this class and make 
people deal with the slightly unwieldy QAnimationGroup directly. i'm kind of 
leaning in that direction, tbh, even though i dislike parts of 
QAnimationGroup's design.

basically, it's a QGrahicsView-specific set of Plasma-standardized animations 
implemented in little convenience classes so that it's simpler to use Kinetic, 
particularly from scripts but also C++. they still mix-and-match nicely with 
plain Kinetic classes, so it's not an either-or-choice, these are just some 
pre-made ones for us to use extensively throughout plasma code (less code, 
more consistency)

we still have one large outstanding bit of work left, and that is to port the 
animations away from the use of the previous API revision's "render()" method 
and make them proper QAbstractAnimations. see the Fade animation for how this 
should look if you'd like to pitch in. the ones with render calls still are:

	grow.cpp
	pause.cpp
	pulser.cpp
	rotation.cpp
	rotationstacked.cpp

Slide should also probably have its internal QPropertyAnimation removed so 
it's as simple/straightforward as Fade is.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20091203/45c505ac/attachment.sig 


More information about the Plasma-devel mailing list