summaryrefslogtreecommitdiffstats
path: root/examples/calc/main.cpp
diff options
context:
space:
mode:
authorNoam Rosenthal <nrosenth@nokia.com>2009-06-08 12:27:03 -0700
committerNoam Rosenthal <nrosenth@nokia.com>2009-06-08 12:27:03 -0700
commitd0441f605434a89b53735427e4e81182c65debbd (patch)
treeb96d25dc89cdb523c007a22bc0deed3a5aa5dd56 /examples/calc/main.cpp
parenta6553f68f17c28adca049857686496a69b4c1e7a (diff)
scxml for 4.6
Diffstat (limited to 'examples/calc/main.cpp')
-rw-r--r--examples/calc/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/calc/main.cpp b/examples/calc/main.cpp
new file mode 100644
index 0000000..9d30c6b
--- /dev/null
+++ b/examples/calc/main.cpp
@@ -0,0 +1,15 @@
+
+#include <QtGui/QApplication>
+#include "calc.h"
+#include "qscriptedstatemachine.h"
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ QtScriptedStateMachine *sm = QtScriptedStateMachine::load(":/calc.scxml");
+ CalcWidget w;
+ sm->registerObject(&w,"",true);
+ QObject::connect (&w, SIGNAL(command(QString)), sm, SLOT(postNamedEvent(QString)));
+ w.show();
+ sm->start();
+ return a.exec();
+}