Animators fps, Plasma KCM, Physics and Duration control
Riccardo Iaconelli
riccardo at kde.org
Sun Jan 6 13:53:36 CET 2008
Hello,
sorry for the subject a bit criptic, I'll try to explain what I've just
thought in the shower.
So, I was patching Phase for the duration control problem.
Patching it, I thought that being able to control fps from the plasmoid would
be good, after all, not all the animations require the same number of fps.
But then, the code was already querying the animator for them, which is
obviously right... if someone wants to do a very resource-conservative
animator, he will probably want to drastically reduce the number of fps.
So, what's my solution? Make the animator specify several fps values, basing
on the kind of animations we're going to do. Concretely, this is how moveItem
would become:
Phase::moveItem(QGraphicsItem *item, int duration, Movement movement, const
QPoint &destination, Phase::Smoothness smoothness)
where Phase::Smoothness will be something like:
Phase::VerySmooth
Phase::Smooth
Phase::Normal
Phase::Fast
Phase::Veryfast
(this is just an example, the other methods will be modified in a similar
way).
So, now the animator will implement 5 more getters, all of them returning a
int, which would represent the number of fps desired for a certain level of
smoothness. The plasmoid writer will then be able to decide what animation he
wants to do and choose the appropriate enum value.
So, now there's the problem for the user of how to set an animator.
Now, a KCM with two comboboxes would be the best thing for me to be able to
configure the animators, makes the user choose one for when he's on AC, and
one for when he's battery-powered. It should be accessible from the toolbox
and systemsettings.
I would propose to ship with plasma 4 animators: fast, normal, fancy and
powersave, the first three would be to adapt to several levels of CPU
speedness, while the latter is for when we're running on batteries.
Oh, another thing, I want to write an animator which bases on a proper physics
model, with some small bouncness when moving items around (like iPod
Touch/iPhone, if someone has ever seen it... they are subtle, don't bore the
user, and make the experience much nicer). If there's someone who wants to
join the efforts, please tell me.
Thoughts?
Bye,
-Riccardo
--
GPG key:
3D0F6376
When encrypting, please encrypt also for this subkey:
9EBD7FE1
-----
Pace Peace Paix Paz Frieden Pax Pokój Friður Fred Béke 和平
Hasiti Lapé Hetep Malu Mир Wolakota Santiphap Irini Peoch
Shanti Vrede Baris Rój Mír Taika Rongo Sulh Mir Py'guapy 평화
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080106/03dc4313/attachment.pgp
More information about the Panel-devel
mailing list