User Tools

Site Tools


DzCallBack

DAZ Script callback object.

More...

Inherits :

Methods

DAZ Script
voidaddToGroup ( String group )
voidclearConnection ()
voidclearScriptFunction ()
ObjectgetArg ( Number i )
NumbergetArgCount ()
BooleangetBlockedDuringSceneLoad ()
BooleangetDeleteAfterExecution ()
QVariantgetDynamicProperty ( String name )
ArraygetGroups ()
BooleangetProcessAsEvent ()
StringgetScript ()
QObjectgetSender ()
BooleanisEvaluated ()
voidremoveFromGroup ( String group )
voidsetBlockedDuringSceneLoad ( Boolean onOff )
BooleansetConnection ( QObject sender, String signal )
BooleansetConnection ( QObject sender, String signal, Boolean garbageCollect )
NumbersetConnections ( QObject sender, Array signalList, Boolean garbageCollect )
voidsetDeleteAfterExecution ( Boolean onOff )
voidsetDynamicProperty ( String name, QVariant value )
voidsetProcessAsEvent ( Boolean onOff )
voidsetScript ( String script, Boolean evaluate )
voidsetScriptFunction ( Function functionRef, Object thisObject )
voidsetScriptFunction ( Function functionRef )

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.


void : clearScriptFunction()

Clears the script Function assigned to this callback.

Since:

  • 4.11.0.270

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 )

Parameter(s):

  • name - The name of the property to retrieve the value of.

Return Value:

  • The value of the dynamic property (if any).

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 )

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.

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.

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 )

Sets a dynamic property on this callback.

Parameter(s):

  • name - The name of the property to set.
  • value - The value to set.

Attention:

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.

void : setScriptFunction( Function functionRef, Object thisObject )

Connects this callback to a script Function.

Parameter(s):

  • functionRef - The script Function to call.
  • thisObject - The object to bind to 'this' in the scope of functionRef.

Since:

  • 4.11.0.270

void : setScriptFunction( Function functionRef )

Connects this callback to a script Function.

Parameter(s):

  • functionRef - The script Function to call.

Since:

  • 4.11.0.270