QScxmlDataModel Class

The QScxmlDataModel class is the data model base class for a Qt SCXML state machine. More...

Header: #include <QScxmlDataModel>
qmake: QT += scxml
Since: Qt 5.7
Inherits: QObject
Inherited By:

QScxmlCppDataModel, QScxmlEcmaScriptDataModel, and QScxmlNullDataModel

This class was introduced in Qt 5.7.

Public Types

Properties

Public Functions

void setStateMachine(QScxmlStateMachine *stateMachine)
QScxmlStateMachine *stateMachine() const

Signals

void stateMachineChanged(QScxmlStateMachine *stateMachine)

Detailed Description

SCXML data models are described in SCXML Specification - 5 Data Model and Data Manipulation. For more information about supported data models, see SCXML Compliance.

One data model can only belong to one state machine.

See also QScxmlStateMachine, QScxmlCppDataModel, QScxmlEcmaScriptDataModel, and QScxmlNullDataModel.

Property Documentation

stateMachine : QScxmlStateMachine*

This property holds the state machine this data model belongs to.

A data model can only belong to a single state machine and a state machine can only have one data model. This relation needs to be set up before the state machine is started. Setting this property on a data model will automatically set the corresponding dataModel property on the stateMachine.

Access functions:

QScxmlStateMachine *stateMachine() const
void setStateMachine(QScxmlStateMachine *stateMachine)

Notifier signal:

void stateMachineChanged(QScxmlStateMachine *stateMachine)