Home

QtScriptedStateMachine Class Reference

The QtScriptedStateMachine class provides a way to use scripting with the Qt State Machine Framework. More...

 #include <QtScriptedStateMachine>

Inherits QtStateMachine.

Note: All the functions in this class are reentrant.

Properties

Public Functions

Public Slots

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QtScriptedStateMachine class provides a way to use scripting with the Qt State Machine Framework.

Though can be used alone, QtScriptedStateMachine is mainly a runtime helper to using the state-machine framework with SCXML files.

See also QtStateMachine.


Property Documentation

baseUrl : QUrl

The url used to resolve scripts and invoke urls.

Access functions:


Member Function Documentation

QtScriptedStateMachine::QtScriptedStateMachine ( QObject * parent = NULL )

Creates a new QtScriptedStateMachine object, with parent parent.

void QtScriptedStateMachine::eventTriggered ( const QString & name )   [signal]

This signal is emitted when external event name is handled in the state machine.

void QtScriptedStateMachine::executeScript ( const QString & s )   [slot]

Executes script s in the attached script engine. If the script fails, a "error.illegalvalue" event is posted to the state machine.

QtScriptedStateMachine * QtScriptedStateMachine::load ( const QString & filename, QObject * o = NULL )   [static]

Loads a state machine from an scxml file located at filename, with parent object o.

void QtScriptedStateMachine::postNamedEvent ( const QString & event )   [slot]

Posts a QtScriptedEvent named event, with no payload.

See also QtScriptedEvent.

void QtScriptedStateMachine::registerInvokerFactory ( QtSsmInvokerFactory * f )

Enabled invoker factory f to be called from <invoke /> tags.

void QtScriptedStateMachine::registerObject ( QObject * o, const QString & name = QString(), bool recursive = false )

Registers object o to the script engine attached to the state machine. The object can be accessible from global variable name. If name is not provided, the object's name is used. If recursive is true, all the object's decendants are registered as global objects, with their respective object names as variable names.

QScriptEngine * QtScriptedStateMachine::scriptEngine () const

Returns the script engine attached to the state-machine.


Copyright © 2009 Nokia Trademarks
Qt Solutions