QScxmlEvent

The QScxmlEvent class is an event for a Qt SCXML state machine. More

Inheritance diagram of PySide2.QtScxml.QScxmlEvent

Synopsis

Functions

Detailed Description

SCXML events drive transitions. Most events are generated by using the <raise> and <send> elements in the application. The state machine automatically generates some mandatory events, such as errors.

For more information, see SCXML Specification - 5.10.1 The Internal Structure of Events . For more information about how the Qt SCXML API differs from the specification, see SCXML Compliance .

class QScxmlEvent

QScxmlEvent(other)

param other

QScxmlEvent

Creates a new external SCXML event.

Constructs a copy of other .

PySide2.QtScxml.QScxmlEvent.EventType

This enum type specifies the type of an SCXML event:

Constant

Description

QScxmlEvent.PlatformEvent

An event generated internally by the state machine. For example, errors.

QScxmlEvent.InternalEvent

An event generated by a <raise> element.

QScxmlEvent.ExternalEvent

An event generated by a <send> element.

PySide2.QtScxml.QScxmlEvent.clear()

Clears the contents of the event.

PySide2.QtScxml.QScxmlEvent.data()
Return type

object

Returns the data included by the sender.

See also

setData()

PySide2.QtScxml.QScxmlEvent.delay()
Return type

int

Returns the delay in milliseconds after which this event is to be delivered after processing the <send> element.

See also

setDelay()

PySide2.QtScxml.QScxmlEvent.errorMessage()
Return type

unicode

If this is an error event, returns the error message. Otherwise, returns an empty QString .

PySide2.QtScxml.QScxmlEvent.eventType()
Return type

EventType

Returns the type of this event.

See also

setEventType() EventType

PySide2.QtScxml.QScxmlEvent.invokeId()
Return type

unicode

If this event is generated by an invoked state machine, returns the ID of the <invoke> element. Otherwise, returns an empty value.

See also

setInvokeId()

PySide2.QtScxml.QScxmlEvent.isErrorEvent()
Return type

bool

Returns true when this is an error event, false otherwise.

PySide2.QtScxml.QScxmlEvent.name()
Return type

unicode

Returns the name of the event.

See also

setName()

PySide2.QtScxml.QScxmlEvent.origin()
Return type

unicode

Returns a URI that points to the origin of an SCXML event.

See also

setOrigin()

PySide2.QtScxml.QScxmlEvent.originType()
Return type

unicode

Returns the origin type of an SCXML event.

See also

setOriginType()

PySide2.QtScxml.QScxmlEvent.scxmlType()
Return type

unicode

Returns the event type.

PySide2.QtScxml.QScxmlEvent.sendId()
Return type

unicode

Returns the ID of the event.

See also

setSendId()

PySide2.QtScxml.QScxmlEvent.setData(data)
Parameters

data – object

Sets the payload data to data .

See also

data

PySide2.QtScxml.QScxmlEvent.setDelay(delayInMiliSecs)
Parameters

delayInMiliSecsint

Sets the delay in milliseconds as the value of delayInMiliSecs .

See also

delay

PySide2.QtScxml.QScxmlEvent.setErrorMessage(message)
Parameters

message – unicode

If this is an error event, the message is set as the error message.

See also

errorMessage()

PySide2.QtScxml.QScxmlEvent.setEventType(type)
Parameters

typeEventType

Sets the event type to type .

See also

eventType EventType

PySide2.QtScxml.QScxmlEvent.setInvokeId(invokeId)
Parameters

invokeId – unicode

Sets the ID of an invoked state machine to invokeid .

See also

invokeId

PySide2.QtScxml.QScxmlEvent.setName(name)
Parameters

name – unicode

Sets the name of the event to name .

See also

name()

PySide2.QtScxml.QScxmlEvent.setOrigin(origin)
Parameters

origin – unicode

Sets the origin of an SCXML event to origin .

See also

origin

PySide2.QtScxml.QScxmlEvent.setOriginType(originType)
Parameters

originType – unicode

Sets the origin type of an SCXML event to origintype .

See also

originType

PySide2.QtScxml.QScxmlEvent.setSendId(sendId)
Parameters

sendId – unicode

Sets the ID sendid for this event.

See also

sendId()