QT EventTransition implementation

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-04-07T20:29:58Z Indexed on 2010/04/07 20:53 UTC
Read the original article Hit count: 311

Filed under:
|

I am trying to build an QT State Maschine. I have some States, and for those States i need Transition that alter the Graphics on my gui. The Problem i having and the only reason i am asking, i am Stuck and Point 1.

The compiler cant identifie the QTEventTransition. I have QT 4.6 wroking with QT Creator on Windows. The compiler does not find Header #include < QtEventTransition >

This is what i did i never did this bevor but i think it should be correct, I have A Header File where i have my Transitions Declareted like this:

       class validateBoatTransition : public QtEventTransition
    {
    public:
        validateBoatTransition(Widget *widget,ServerSkeleton* server);

    protected:
       bool eventTest(QEvent *e);
       void onTransition(QEvent *);

    private:
       Chart* ourChart;
       Message current;
       BarelySocket* myBarelySocket;
    };

Than i have my Cpp File where i have this:

validateBoatTransition::validateBoatTransition(Widget *widget,ServerSkeleton* server)
{


}


void validateBoatTransition::onTransition(QEvent *e)
{
    /*
  My Logik should go here
*/
}

What i want is that if the Transition is activated by an Button (clicked) it should fire this transition!

I searched the net, but cant find an solution. Can i do that? I should i think.

Yours Thomas

© Stack Overflow or respective owner

Related posts about qt

Related posts about transition