Qt Kinetic + Plasma Call For Ideas / Project Plan

Richard Dale richard.j.dale at gmail.com
Fri May 29 13:20:06 CEST 2009


On Thu, May 28, 2009 at 10:14 PM, Akmanalp, Mehmet A <makmanalp at wpi.edu> wrote:
> On Thu, May 28, 2009 at 9:38 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
>> Animation *a = Animator::fadeIn(item);
>> Animation *b = Animator::add(a, Animator::bounce(item, timesToBounce));
>> a = Animator::while(b, Animator::blur(item, amount));
>> Animator::add(a, Animator::fadeOut(item));
>> // auto starts when event loop is hit again, unless a->stop() is called
>>
>> Animation *a = Animator::fadeIn(item);
>> Animator::bounce(item, timeToBounce, a, Animator::Add);
>> Animator::blur(item, amount, a, Animator::While);
>> Animator::fadeOut(item, a, Animator::Add);
> Honestly, I think the add / while syntax is a little unintuitive,
> which is a minus since we're trying to make things as simple as
> possible. Also, what if  want the blur to happen  during the fadein
> and the bounce? I don't see how you'd do this with add-while without
> grouping the fadein and blur.
>
>> * means two phase learning curve (Animator's shortcut, then Kinetic) if you
>> need to "graduate" from Add/While in Plasa::Animator to Kinetic's groups
> Following the previous statement, I'd say we just ditch add / while.
> This way, it'd be more consistent with Kinetic *and* it'd be a little
> more intuitive (imho).
>
> Even if we don't create a whole new language as Ivan proposes, we
> could imitate it in the name of ease of use:
>
> Animator a;
> a.animate(item,
>  a.series(
>    a.fadeIn(),
>    a.parallel(
>      a.blur(amount, time),
>      a.series(
>        a.bounce(timesToBounce),
>        a.flip()
>      )
>    ),
>  a.fadeOut()
>  )
> );
>
> Although the a. in the beginning of all of those is a bit annoying. Thoughts?
I looked at Ruby Shoes recently http://shoooes.net/ as I think it
would be very nice to have a Plasma Shoes script engine. It is a very
simple GUI toolkit with a DSL that is quite similar to the above. For
instance, here is a complet Shoes program to animate some text moving
about:

Shoes.app do
  stack :top => 0.5, :left => 0.5 do
    para "Counting up:"
    l = para "0"
    animate(24) do |i|
      f = ['Arial 14px', 'Serif 34px', 'Monospace 18px', 'Arial 48px'][rand(3)]
      l.replace "#{i}", :font => f
    end
    motion do |x, y|
      Shoes.p [x, y]
    end
  end
end

I was thinking of just trying to get existing Shoes apps to run as as
applets, but i get the feeling that it could also be a really good fit
with the KInetic way of doing things.

-- Richard


More information about the Plasma-devel mailing list