views:

166

answers:

3

Greetings,

We are developing a scientific QT Application which detect the border of a cell.Please refer to following prototype snapshots.

http://i27.tinypic.com/25tub9v.png

http://i26.tinypic.com/9l8kcj.jpg

Now ,we are going to develop this as a opensource product with a good design and architecture.We reconed that it has many complex actions and flows. Eg: move contour node,delete coutour node,add contour node,draw barrier,select multiple nodes...etc

We were hoping to use QT State Machine Framework for UI, and wondering whether to use several state-machine instances for each flow/action or use one "huge" state-machine? We need unde/redo operations and is it possible to interate QT State-Machine Framework with QT Undo/Redo Framework?

[edit] Is it really possible to use QT SM Framekwork to handle UI interactions? What kind of design they use in GIMP or CAD applications ?

Thanks in advance, umanga

+2  A: 

We have experimented with Qt's State Machine Framework and the Animation Framework for simple UI transitions. I believe there are tutorials or examples of how to do this in their docs or on their site. So yes, it is possible.

I don't know how well it would scale or the best architecture. If it were me, I would try to use lots of simple state machines, making use of their hierarchical capabilities.

Chris Morlier
+1 I don't know anything about QT, but the idea of breaking a large problem into smaller (more easily managable) ones is definately a good principle to work on.
Adrian K
+2  A: 
andref
thanks andref for the detailed answer.I am now implementing exactly as you described.I use State machine for handling states and use QTs Undo Framework.
umanga
i mean State patter for implement StateMachines for each interactions..
umanga