DzScriptContext Class Reference
[Script Objects]

Encapsulates a DAZ Script script context. More...

Inheritance diagram for DzScriptContext:

DzBase QObject Object List of all members.

Properties

DzApp App
DzColorDialog ColorDialog
DzFileDialog FileDialog
DzGeometry Geometry
DzMainWindow MainWindow
DzMessageBox MessageBox
DzOpenGL OpenGL
DzScene Scene
DzSystem System

Methods

void acceptUndo (String caption)
void beginUndo ()
void cancelUndo ()
void clearBusyCursor ()
Boolean ctrlPressed ()
void finishProgress ()
Array getArguments ()
QDesktopWidget getDesktop ()
String getErrorMessage (Number errCode)
DzAuthor getScriptAuthor ()
String getScriptFileName ()
String getScriptType ()
String getScriptVersionString ()
Boolean pointersAreEqual (Object ptr1, Object ptr2)
void processEvents ()
Boolean progressIsActive ()
Boolean progressIsCancelled ()
void setBusyCursor ()
Boolean shiftPressed ()
void startProgress (String info, Number totalSteps=0, Boolean isCancellable=false, Boolean showTimeElapsed=false)
void stepProgress (Number numSteps=1)
void updateProgress (Number position)

Detailed Description

Encapsulates a DAZ Script script context.

All DzScripts are executed in the context of a DzScriptContext instance - therefore, all the properties and methods on DzScriptContext are accessible to a script as global functions and variables. It will usually not be necessary for a script to create or use this class directly.


Member Function Documentation

void DzScriptContext::acceptUndo ( String  caption  ) 

Accept and finish a hold on the undo stack started by calling beginUndo().

See also:
acceptUndo()

void DzScriptContext::beginUndo (  ) 

Starts a hold on the undo stack.

See also:
beginUndo()

void DzScriptContext::cancelUndo (  ) 

Cancel a hold on the undo stack started by calling beginUndo().

See also:
cancelUndo()

void DzScriptContext::clearBusyCursor (  ) 

Clears the application-standard busy cursor and returns the mouse cursor to the previous cursor. Match every call to setBusyCursor() with a call to this function.

See also:
clearBusyCursor()

Boolean DzScriptContext::ctrlPressed (  ) 

This function allows a script to determine what meta keys were pressed when the script was activated.

Returns:
true if the control button was pressed when the script was activated
See also:
ctrlPressed()

void DzScriptContext::finishProgress (  ) 

Ends the current progress operation in the application from script.

See also:
finishProgress()

Array DzScriptContext::getArguments (  ) 

Returns:
The list of arguments for the current script execution.
See also:
getArguments()

QDesktopWidget DzScriptContext::getDesktop (  ) 

This function provides access to the desktop widget.

Returns:
A pointer to the desktop widget.
See also:
getDesktop()

String DzScriptContext::getErrorMessage ( Number  errCode  ) 

This function converts an error code into a string message.

Returns:
A user-readable message that describes the error represented by the error code.
See also:
getErrorMessage()

DzAuthor DzScriptContext::getScriptAuthor (  ) 

Returns:
The author of the current script (if any).
See also:
getScriptAuthor()

String DzScriptContext::getScriptFileName (  ) 

Returns:
The file name of the current script (if any).
See also:
getScriptFileName()

String DzScriptContext::getScriptType (  ) 

Returns:
The file type that this script was saved out as.
See also:
getScriptType()

String DzScriptContext::getScriptVersionString (  ) 

Returns:
The version of the current script (if any).
See also:
getScriptVersionString()

Boolean DzScriptContext::pointersAreEqual ( Object  ptr1,
Object  ptr2 
)

This function allows a script to test if two QObject-derived variables point to the same instance.

Returns:
true if the pointers point to the same object, otherwise false.
See also:
pointersAreEqual()

void DzScriptContext::processEvents (  ) 

Pauses execution of the script and allows the GUI thread time to process events.

See also:
processEvents()

Boolean DzScriptContext::progressIsActive (  ) 

Returns:
true if there is an active progress operation in the application, otherwise false.
See also:
progressIsActive()

Boolean DzScriptContext::progressIsCancelled (  ) 

Returns:
true if the user cancelled the current progress operation in the application, otherwise, false.
See also:
progressIsCancelled()

void DzScriptContext::setBusyCursor (  ) 

Sets the application-standard busy cursor. Match every call to this function with a call to clearBusyCursor() to restore the previous cursor.

See also:
setBusyCursor()

Boolean DzScriptContext::shiftPressed (  ) 

This function allows a script to determine what meta keys were pressed when the script was activated.

Returns:
true if the shift button was pressed when the script was activated
See also:
shiftPressed()

void DzScriptContext::startProgress ( String  info,
Number  totalSteps = 0,
Boolean  isCancellable = false,
Boolean  showTimeElapsed = false 
)

Starts a progress operation in the application from script.

See also:
startProgress()

void DzScriptContext::stepProgress ( Number  numSteps = 1  ) 

Steps the current progress operation in the application from script.

See also:
stepProgress()

void DzScriptContext::updateProgress ( Number  position  ) 

Updates the current progress operation in the application from script.

See also:
updateProgress()


Member Data Documentation

DzApp DzScriptContext::App

Read Only
The DAZ Studio Application object

See also:
App

DzColorDialog DzScriptContext::ColorDialog

Read Only
The DAZ Script Color Dialog object

See also:
ColorDialog

DzFileDialog DzScriptContext::FileDialog

Read Only
The DAZ Script File Dialog object

See also:
FileDialog

DzGeometry DzScriptContext::Geometry

Read Only
The DAZ Script Geometry Utility object

See also:
Geometry

DzMainWindow DzScriptContext::MainWindow

Read Only
The DAZ Studio Main Interface object

See also:
MainWindow

DzMessageBox DzScriptContext::MessageBox

Read Only
The DAZ Script Message Box object

See also:
MessageBox

DzOpenGL DzScriptContext::OpenGL

Read Only
The DAZ Studio OpenGL object

See also:
OpenGL

DzScene DzScriptContext::Scene

Read Only
The DAZ Studio Scene object

See also:
Scene

DzSystem DzScriptContext::System

Read Only
The DAZ Script System Utility object

See also:
System


Generated on Thu Sep 24 12:21:15 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.