KPresenter moves

Thorsten Zachmann is the only hacker I know who became more active on becoming a father… KPresenter in KOffice 2.0 is still very far from a Keynote killer, but one thing is working now: animations. Large chunks of the functionality necessary for a presentation application are now generic in KOffice, of course: images, text, shapes. Animation is not quite smooth yet, but we’ll get there! (One thing that KOffice is still missing is a “movie” shape. The problem here is that Phonon renders to a widget — but “making phonon render movies onto a QGraphicsViewItem is on the Phonon todo, and that’s more or less exactly what we need, too.)

I’ll just let Thorsten explain what’s going on:

I spend my last few weeks to bring back animations to kpresenter trunk. The way it was done in kpresenter 1.x was not really nice and as we use flake for all shapes now it had to be done from scratch.

At first I wrote a small test application in Qt4 so that I could find out how to do all the stuff that I wanted to do. David helped me to solve the problem that my X-Server was going to 100% CPU load when doing page effects. The problem looks like the ati driver is really slow on painting pixmaps the size of the screen. The problem is worked around by calling KApplication::kApplication()->syncX(); to make sure to content is really painted before continuing with the program. This problem did not appear with a nvidia card.

I then started to work out the framework for all the effects (page effects/shape animations) in kpresenter. First I finished the page effects. Then I went on to the shape animations. It took some time to figure out what is the best way to integrate it into flake the common base for all koffice applications so that the other applications still work as expected. The way to go was to use a different strategy during the painting of the shapes for animations.

On Sunday I finally managed to put all pieces together and fix some of the bugs I had put in :-). So now the base work is done. I also put in a action to create a move appear animation for the selected shapes.

After the base work is now there I will go on to implement all the possible navigations when the animation is running as now only forward(space) works.