Hello Olli Salonen,

> So in all of these cases, state machine is actually the source state,
> but the state machine framework requires creating the transition by
> specifying the bottom level child source state. Would this still fit
> into the idea of the framework? Or should I be building my own?

AFAIR, from the State Charts point of view, what you want makes sense,
considering that the "root state" (the machine) is a state. A
*workaround* is to create a common parent state for state{A,B,C}, and
do something like

    // base is the initial state of machine
    // state{A,B,C} are "children" of base
    // stateA is the inital state of "base"
    base->addTransition(&buttonA, SIGNAL(clicked()), stateA);
    base->addTransition(&buttonB, SIGNAL(clicked()), stateB);
    base->addTransition(&buttonC, SIGNAL(clicked()), stateC);

I would expect this to work with the machine itself (which is a state)
instead of a base state as well. But in my tests it doesn't... Maybe
checking whether the "root state" is treated specially by
addTransition() or the transition "dispatching" algorithm.


Cheers,

-- 
Caio Marcelo de Oliveira Filho
OpenBossa - INdT
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to