I've created a stand alone class to visualize QStateMachine states.
It's based on GammaRay's state machine plugin, and has graphviz integrated to 
simplify building (especially on Windows):

https://github.com/syntheticpp/StateMachineViewer


Usage is very simple:

StateMachineViewer is designed to be linked into an existing application.

Projects using CMake should add this project with 'add_subdirectory()' and link 
against 'statemachineviewer'.

Example code:

#include "statemachineviewer.h"

StateMachineViewer* showStateMachine(QStateMachine* machine)
{
    StateMachineViewer* smv = new StateMachineViewer();
    smv->setStateMachine(machine);
    smv->show();
    return smv;
}



Attached a saved state chart from the trafficlight example.

Cheers,
Peter


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to