December 1, 2010

Pedro Mateo Pedro Mateo
Lab Rat
28 posts

Automatic layout for Qt GUIs

 

Hi all!!

The automatic layout for GUI elements is the research topic we are addressing now.
It is a process in which the widgets composing a GUI are automatically arranged depending on the relationships between them, and on the features of the container dialog. Initial widgets’ layout (if exist) is broken, and a new QAutomaticLayout is added in order to arrange all the elements in a container/dialog/window. The arrangement process is level-based (a container widget represents a new level).

You can see it working in the following video: http://www.youtube.com/watch?v=bokT_6FRlNk [youtube.com]

http://www.youtube.com/embed/bokT_6FRlNk

You can find further information about this project and other related ones in the Cátedra SAES website (http://www.catedrasaes.org [catedrasaes.org]).

Please, send me your impressions, suggestions, likes, dislikes, etc. We would like to improve the prototype and, as the rest of our work, release it as an open-source contribution.

Cheers!!!

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

11 replies

December 1, 2010

leinir leinir
Ant Farmer
26 posts

That looks quite interesting, i must say! Seeing this all opensourced would be a great addition, methinks :) Calling it a QAutomaticLayout seems a little fun, mind, as the Q classes tend to indicate something which lives inside the Qt framework itself… So one small suggestion would be that, to avoid confusion, it might be worth it to not call your class that – an example of that approach is KDAB’s widgets, such as KDChart :)

 Signature 

..Dan // Leinir..
http://leinir.dk/

December 1, 2010

Pedro Mateo Pedro Mateo
Lab Rat
28 posts

just changed!!!
thanks leinir.

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

December 1, 2010

Denis Kormalev Denis Kormalev
Area 51 Engineer
1652 posts

Looks interesting, but I failed to find info about project at your website.

December 1, 2010

Alexander Kuchumov Alexander Kuchumov
Hobby Entomologist
377 posts

It’s interesting, can we see this prototype code?

December 1, 2010

Pedro Mateo Pedro Mateo
Lab Rat
28 posts

Hi again!!!

Sorry Denis, but these results are very recent, so we have not yet created any documentation. We would like to write something to present all the details of this solution.

Alexander, we are finishing this first prototype. Note that the video was recorded this morning, so it shows the first results we obtained. There is a lot of remaining work, but we will try to share the code as soon as possible.

Our idea is to improve it as much as possible, and implement it to allow developers to choose (and also implement) among several arrangement strategies.

I will send a new post when any documentation and/or the code are available.

Thanks a lot for your comments!!

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

December 1, 2010

Denis Kormalev Denis Kormalev
Area 51 Engineer
1652 posts

pedromateo, ok, I will wait for your next post :)
What about licenses? Will it be under lgpl?

December 2, 2010

Pedro Mateo Pedro Mateo
Lab Rat
28 posts
Denis Kormalev wrote:
pedromateo, ok, I will wait for your next post :) What about licenses? Will it be under lgpl?

Hi Denis,

all of our work is released under the lgpl license, because one of the principles underlying our organization is to share our results in order to obtain feedback from the community.
However, another of our goals is writing papers. So, I do not know if I can free the details of this design before the paper is written.

Nevertheles, if I can, I will post some process details or pieces of code for people to give me some feedback and try to improve this solution. Thus don’t worry, I will free this code as soon as I can.

Best Regards.

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

December 3, 2010

Milot Shala Milot Shala
Ant Farmer
393 posts

Great work Pedro!

As everyone else here in the forums, I like to see code, so I guess we should wait for that :)

December 14, 2010

Pedro Mateo Pedro Mateo
Lab Rat
28 posts

Hi!!!

Now I am working on improving the arrangement strategy to support some “extreme” cases in which the elements of the initial GUI are very very misplaced.

I think that a GUI in which the elements are distributed like a square, that is, all the widgets are distributed all over the available space (please, see the video above), it seems the GUI is better arranged because, if for example we divide the GUI space into 4 similar sub-squares, all of them have a similar “weight”.

However, GUIs can be composed of a very heterogeneous group of elements, so I think trying to get always a square shape could be “dangerous”.

What do you think about this?

Thnaks, and Regards

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

January 14, 2011

Andre Andre
Mad Scientist
4667 posts

Could you explain how the relationships between the elements are defined? The video does not show that.

 Signature 

Nokia Certified Qt Specialist.
Interested in Qt consultancy and job opportunities.

January 21, 2011

Pedro Mateo Pedro Mateo
Lab Rat
28 posts
Andre wrote:
Could you explain how the relationships between the elements are defined? The video does not show that.

Hi Andre,

now I can’t give you details about how the relatinships between widgets are defined. We are wondering whether to create a new paper an then an open-source contribution related to this idea.

However, I can say you that the position of each widget is compared to the position of closer widgets, and then is ordered according to its position inside the container which is holding it.

I will provide you with further details ass soon as I can.

Cheers!!

 Signature 

Pedro Mateo
.(JavaScript must be enabled to view this email address)
http://www.pedromateo.es

 
  ‹‹ OAuth for Qt - kQOAuth      OHT+Behavior: heat-maps and path-maps for Qt GUIs. User-interaction abstraction. ››

You must log in to post a reply. Not a member yet? Register here!