User Tools

Site Tools


DzCallBack

DAZ Script callback object.

More...

Inherits :

Methods

Detailed Description

Encapsulates an object that is used to execute a script when a signal that it is connected to is triggered.

See Also:

Methods


void : addToGroup( String group )

Adds the callback to the given callback group.

Parameter(s):

  • group - The name of the group to add the callback to.

void : clearConnection()

Disconnects from the signal that triggers this callback.


Object : getArg( Number i )

Return Value:

  • The i'th argument from the current execution of the callback.

Attention:

  • Callbacks that are processed as events or blocked during scene load are provided no arguments and getSender() always returns the first QObject connected to, which is not necessarily the one sending the signal.

See Also:


Number : getArgCount()

Return Value:

  • The number of arguments for the current execution of the callback.

Attention:

  • Callbacks that are processed as events or blocked during scene load are provided no arguments and getSender() always returns the first QObject connected to, which is not necessarily the one sending the signal.

See Also:


Boolean : getBlockedDuringSceneLoad()

Return Value:

  • true if this callback is not processed during a scene load but is instead processed at the end of a scene load, otherwise false.

Boolean : getDeleteAfterExecution()

Return Value:

  • true if this callback is set to be deleted after it has been executed, otherwise false.

Since:

  • 4.6.4.67

QVariant : getDynamicProperty( String name )

Return Value:

Since:

  • 4.9.4.90

Array : getGroups()

Return Value:

  • A list of the groups that this callback belongs to.

Boolean : getProcessAsEvent()

Return Value:

  • true if this callback is processed as an event, otherwise false.

String : getScript()

Return Value:

  • The script that is executed when the signal is emitted.

QObject : getSender()

Return Value:

  • The object that sent the signal, or NULL.

Boolean : isEvaluated()

Return Value:

  • true if getScript() for this callback is the actual code that gets executed, false if getScript() contains the filename of the script to execute.

void : removeFromGroup( String group )

Removes this callback from the group callback group.

Parameter(s):

  • group - The name of the group to remove the callback from.

void : setBlockedDuringSceneLoad( Boolean onOff )

Parameter(s):

  • onOff - If true, this callback will not be processed while the scene is loading, it will be processed when the scene is finished loading.

Attention:

  • Callbacks that are blocked during scene load are provided no arguments and getSender() always returns the first QObject connected to, which is not necessarily the one sending the signal.

Boolean : setConnection( QObject sender, String signal, Boolean garbageCollect )

Makes the connection that triggers this callback.

Parameter(s):

  • sender - The object that the signal belongs to.
  • signal - The signature of the signal to connect to.
  • garbageCollect - If true, remove this callback from the DzCallBackMgr when sender is deleted.

Boolean : setConnection( QObject sender, String signal )

Makes the connection that triggers this callback.

Parameter(s):

  • sender - The object that the signal belongs to.
  • signal - The signature of the signal to connect to.

Number : setConnections( QObject sender, Array signalList, Boolean garbageCollect )

Makes the connection that triggers this callback.

Parameter(s):

  • sender - The object that the signal belongs to.
  • signalList - List of signal signatures to connect to.
  • garbageCollect - If true, remove this callback from the DzCallBackMgr when sender is deleted.

Return Value:

  • The number of connections in signalList that are established, or -1 if sender is null.

void : setDeleteAfterExecution( Boolean onOff )

Parameter(s):

  • onOff - If true, sets this callback to be deleted after it has been executed.

Since:

  • 4.6.4.67

void : setDynamicProperty( String name, QVariant value )

Set QObject dynamic property on this callback

Since:

  • 4.9.4.90

void : setProcessAsEvent( Boolean onOff )

Parameter(s):

  • onOff - If true, sets this callback to trigger as it is encountered in the event stack.

Attention:

  • Callbacks that are processed as events are provided no arguments and getSender() always returns the first QObject connected to, which is not necessarily the one sending the signal.

void : setScript( String script, Boolean evaluate )

Sets the script that will be executed by this callback.

Parameter(s):

  • script - The filename or code of the script to execute.
  • evaluate - If script is the actual code and it should be embedded, set this to true, otherwise it is assumed that script is the path of a script file to execute.