QScxmlDataModel¶
The
QScxmlDataModel
class is the data model base class for a Qt SCXML state machine. More…
Inherited by: QScxmlCppDataModel, QScxmlEcmaScriptDataModel, QScxmlNullDataModel
New in version 5.12.
Synopsis¶
Functions¶
def
setStateMachine
(stateMachine)def
stateMachine
()
Virtual functions¶
def
evaluateAssignment
(id, ok)def
evaluateForeach
(id, ok, body)def
evaluateInitialization
(id, ok)def
evaluateToBool
(id)def
evaluateToString
(id)def
evaluateToVariant
(id)def
evaluateToVoid
(id, ok)def
hasScxmlProperty
(name)def
scxmlProperty
(name)def
setScxmlEvent
(event)def
setScxmlProperty
(name, value, context)def
setup
(initialDataValues)
Signals¶
def
stateMachineChanged
(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.
-
class
QScxmlDataModel
([parent=None])¶ - param parent
QObject
Creates a new data model, with the parent object
parent
.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateAssignment
(id, ok)¶ - Parameters
id –
int
ok –
bool
Evaluates the assignment pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateForeach
(id, ok, body)¶ - Parameters
id –
int
ok –
bool
body –
ForeachLoopBody
Evaluates the foreach loop pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not. Thebody
is executed on each iteration.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateInitialization
(id, ok)¶ - Parameters
id –
int
ok –
bool
Evaluates the initialization pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateToBool
(id)¶ - Parameters
id –
int
- Return type
bool
Evaluates the executable content pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not. Returns the result of the evaluation as a boolean value.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateToString
(id)¶ - Parameters
id –
int
- Return type
unicode
Evaluates the executable content pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not. Returns the result of the evaluation as aQString
.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateToVariant
(id)¶ - Parameters
id –
int
- Return type
object
Evaluates the executable content pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not. Returns the result of the evaluation as aQVariant
.
-
PySide2.QtScxml.QScxmlDataModel.
evaluateToVoid
(id, ok)¶ - Parameters
id –
int
ok –
bool
Evaluates the executable content pointed to by
id
and setsok
tofalse
if there was an error or totrue
if there was not. The execution is expected to return no result.
-
PySide2.QtScxml.QScxmlDataModel.
hasScxmlProperty
(name)¶ - Parameters
name – unicode
- Return type
bool
Returns
true
if a property with the givenname
exists,false
otherwise.
-
PySide2.QtScxml.QScxmlDataModel.
scxmlProperty
(name)¶ - Parameters
name – unicode
- Return type
object
Returns the value of the property
name
.See also
-
PySide2.QtScxml.QScxmlDataModel.
setScxmlEvent
(event)¶ - Parameters
event –
QScxmlEvent
Sets the
event
to use in the subsequent executable content execution.
-
PySide2.QtScxml.QScxmlDataModel.
setScxmlProperty
(name, value, context)¶ - Parameters
name – unicode
value – object
context – unicode
- Return type
bool
Sets a the value
value
for the propertyname
.The
context
is a string that is used in error messages to indicate the location in the SCXML file where the error occurred.Returns
true
if successful orfalse
if an error occurred.See also
-
PySide2.QtScxml.QScxmlDataModel.
setStateMachine
(stateMachine)¶ - Parameters
stateMachine –
QScxmlStateMachine
Sets the state machine this model belongs to to
stateMachine
. There is a 1:1 relation between state machines and models. After setting the state machine once you cannot change it anymore. Any further attempts to set the state machine using this method will be ignored.See also
-
PySide2.QtScxml.QScxmlDataModel.
setup
(initialDataValues)¶ - Parameters
initialDataValues –
QVariantMap
- Return type
bool
Initializes the data model with the initial values specified by
initialDataValues
.Returns
false
if parse errors occur or if any of the initialization steps fail. Returnstrue
otherwise.
-
PySide2.QtScxml.QScxmlDataModel.
stateMachine
()¶ - Return type
Returns the state machine associated with the data model.
See also
-
PySide2.QtScxml.QScxmlDataModel.
stateMachineChanged
(stateMachine)¶ - Parameters
stateMachine –
QScxmlStateMachine
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.