内容表

上一话题

QScxmlError

下一话题

QScxmlExecutableContent

QScxmlEvent

QScxmlEvent class is an event for a Qt SCXML state machine. 更多

Inheritance diagram of PySide2.QtScxml.QScxmlEvent

概要

函数

详细描述

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.

解更多信息,见 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 合规 .

class QScxmlEvent

QScxmlEvent(other)

param other

QScxmlEvent

Creates a new external SCXML event.

构造副本为 other .

PySide2.QtScxml.QScxmlEvent. EventType

This enum type specifies the type of an SCXML event:

常量

描述

QScxmlEvent.PlatformEvent

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

QScxmlEvent.InternalEvent

An event generated by a <raise> 元素。

QScxmlEvent.ExternalEvent

An event generated by a <send> 元素。

PySide2.QtScxml.QScxmlEvent. clear ( )

Clears the contents of the event.

PySide2.QtScxml.QScxmlEvent. data ( )
返回类型

object

Returns the data included by the sender.

另请参阅

setData()

PySide2.QtScxml.QScxmlEvent. delay ( )
返回类型

int

Returns the delay in milliseconds after which this event is to be delivered after processing the <send> 元素。

另请参阅

setDelay()

PySide2.QtScxml.QScxmlEvent. errorMessage ( )
返回类型

unicode

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

另请参阅

setErrorMessage()

PySide2.QtScxml.QScxmlEvent. eventType ( )
返回类型

EventType

Returns the type of this event.

另请参阅

setEventType() EventType

PySide2.QtScxml.QScxmlEvent. invokeId ( )
返回类型

unicode

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

另请参阅

setInvokeId()

PySide2.QtScxml.QScxmlEvent. isErrorEvent ( )
返回类型

bool

返回 true when this is an error event, false 否则。

PySide2.QtScxml.QScxmlEvent. name ( )
返回类型

unicode

Returns the name of the event.

另请参阅

setName()

PySide2.QtScxml.QScxmlEvent. origin ( )
返回类型

unicode

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

另请参阅

setOrigin()

PySide2.QtScxml.QScxmlEvent. originType ( )
返回类型

unicode

Returns the origin type of an SCXML event.

另请参阅

setOriginType()

PySide2.QtScxml.QScxmlEvent. scxmlType ( )
返回类型

unicode

返回事件类型。

PySide2.QtScxml.QScxmlEvent. sendId ( )
返回类型

unicode

Returns the ID of the event.

另请参阅

setSendId()

PySide2.QtScxml.QScxmlEvent. setData ( data )
参数

data – object

Sets the payload data to data .

另请参阅

data

PySide2.QtScxml.QScxmlEvent. setDelay ( delayInMiliSecs )
参数

delayInMiliSecs int

Sets the delay in milliseconds as the value of delayInMiliSecs .

另请参阅

delay

PySide2.QtScxml.QScxmlEvent. setErrorMessage ( message )
参数

message – unicode

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

另请参阅

errorMessage()

PySide2.QtScxml.QScxmlEvent. setEventType ( type )
参数

type EventType

Sets the event type to type .

另请参阅

eventType EventType

PySide2.QtScxml.QScxmlEvent. setInvokeId ( invokeId )
参数

invokeId – unicode

Sets the ID of an invoked state machine to invokeid .

另请参阅

invokeId

PySide2.QtScxml.QScxmlEvent. setName ( name )
参数

name – unicode

Sets the name of the event to name .

另请参阅

name()

PySide2.QtScxml.QScxmlEvent. setOrigin ( origin )
参数

origin – unicode

Sets the origin of an SCXML event to origin .

另请参阅

origin

PySide2.QtScxml.QScxmlEvent. setOriginType ( originType )
参数

originType – unicode

Sets the origin type of an SCXML event to origintype .

另请参阅

originType

PySide2.QtScxml.QScxmlEvent. setSendId ( sendId )
参数

sendId – unicode

Sets the ID sendid 对于此事件而言。

另请参阅

sendId()