3 April, 2009

Canola Layout: so Qt!

Filed under: dev,qtlabs_en — jeez @ 11:35

Since the first time I saw Patifa’s presentation, I was very impressed about that Canola’s menu layout discussion. I’ve been a user of Canola since its first release, but had never thought about how hard it would be to implement such a dynamic layout.For those who don’t know or remember what I’m talking about:

filling_gaps

The first column on the picture shows what the designers wanted from the layout’s behavior.

Here at OpenBossa@INdT, we are working on the Animated Layouts (there is a previous post, in portuguese) with the Qt Kinetic project, as you should know. On this last sprint, we decided to code some demos showing new usages of our QGraphicsLayoutProxy (QGLP), different from the previous ones, to test the new API we came up with.
And we did it.

A custom layout example, Qt Canola Layout, which demonstrates how to use QGLP “implicit” on an animated layout. Just add your widgets to this custom layout and let it handle with them! Check out the video in Openbossa channel.



We spent some days talking and brainstorming this algorithm. If you manage to check the engine’s implementation, you will see that it was a quite good work. The secret here was to find out what proportion designers were thinking of, and how to implement a ratio for that. The golden ratio was a good starting point… ;)

Maybe I’ll post about this engine again, goind deep on it. For time, don’t forget to check the latest Bossa Conference 2009 videos on our other channel, on blip.tv.

Also, check Anselmo’s post about this example and on a previous one, about the integration of Qt State Machine and Animated Layouts.