DzApp Class Reference
[Core Objects]

The main application object. More...

List of all members.

Enumerations



enum  OperatingSystem {
  WindowsUnknown, Windows95, Windows98, WindowsMe,
  Windows2000, WindowsXP, Windows2003, WindowsVista,
  MacUnknown, Mac10_0, Mac10_1, Mac10_2,
  Mac10_3, Mac10_4, Mac10_5
}
enum  Platform { Windows, MacOSX }
enum  ReleaseEdition { Free, Advanced }

Properties

String appName
Number buildNumber
String longVersionString
Number majorVersion
Number minorVersion
Number version
String versionString

Methods

Number bitArchitecture ()
String bitArchitectureString ()
void cancelProgress ()
void debug (String msg)
Boolean flushLogBuffer ()
String getAbsoluteScriptPath (String scriptName) String getResourcesPath()
String getAppDataPath ()
DzCallBackMgr getCallBackMgr ()
DzContentMgr getContentMgr ()
DzAuthor getCurrentAuthor ()
String getDataFolderName ()
String getDataFolderPath ()
String getDataFolderPathBase ()
DzDeviceMgr getDeviceMgr ()
String getDocumentationPath ()
String getDocumentsPath ()
DzExportMgr getExportMgr ()
String getGeneratedScriptsPath ()
String getGeneratedShadersPath ()
DzHelpMgr getHelpMgr ()
String getHomePath ()
DzImageMgr getImageMgr ()
DzImportMgr getImportMgr ()
DzMainWindow getInterface ()
String getLoadSavePath ()
DzMultiMediaMgr getMultiMediaMgr ()
DzPluginMgr getPluginMgr ()
String getPluginsPath ()
DzRenderMgr getRenderMgr ()
DzSaveFilterMgr getSaveFilterMgr ()
String getScriptsPath ()
String getShadersPath ()
DzStyle getStyle ()
String getStyleDefinition ()
Array getStyleDefinitionList ()
String getTempFilename ()
String getTempPath ()
String getTempRenderFilename ()
String getTempTextureConvertPath ()
String getUtilitiesPath ()
Boolean isClosing ()
Boolean isRunning ()
Boolean isSlave ()
Boolean isStarting ()
void log (String buffer)
Number modifierKeyState ()
OperatingSystem operatingSystem ()
String operatingSystemString ()
Platform platform ()
ReleaseEdition releaseEdition ()
String releaseEditionString ()
void restoreDefaultTempPath ()
void setLoadSavePath (String dir)
Boolean setStyleDefinition (String name)
Boolean setTempPath (String tempPath)
void showURL (String url)
void statusLine (String msg, Boolean writeToLog=true)
Boolean usingInterface ()
void warning (String msg)
Boolean writeConfigScript (String configScriptFilename="")

Methods (Deprecated)

DzAppSettingsMgr getAppSettingsMgr ()
DzRenderOptions getRenderOptions ()

Signals

void closing ()
 Signature: "closing()"
void debugMsg (String msg)
 Signature: "debugMsg(const QString&)"
void progressCancelled ()
 Signature: "progressCancelled()"
void progressFinished ()
 Signature: "progressFinished()"
void progressStarting (Number totalSteps)
 Signature: "progressStarting(int)"
void progressUpdate (Number numSteps)
 Signature: "progressUpdate(int)"
void saveStateScript (DzScript script)
 Signature: "saveStateScript(DzScript&)"
void setupWizardComplete ()
 Signature: "setupWizardComplete()"
void starting ()
 Signature: "starting()"
void styleChanged (DzStyle newStyle)
 Signature: "styleChanged(DzStyle*)"
void warningMsg (String msg)
 Signature: "warningMsg(const QString&)"


Detailed Description

The main application object.

Derived from QApplication, this class embodies the main event loop, and owns application-wide settings and objects not directly related to the user interface.

Can be directly accessed using the global variable App.


Member Enumeration Documentation

enum DzApp::OperatingSystem

The operating system

Enumerator:
WindowsUnknown  An unknown version of Windows
Windows95  The Windows 95 operating system
Windows98  The Windows 98 operating system
WindowsMe  The Windows Me operating system
Windows2000  The Windows 2000 operating system
WindowsXP  The Windows XP operating system
Windows2003  The Windows 2003 operating system
WindowsVista  The Windows Vista operating system
MacUnknown  An unknown version of the Machintosh operating system
Mac10_0  The OSX 10.0 (Cheetah) operating system
Mac10_1  The OSX 10.1 (Puma) operating system
Mac10_2  The OSX 10.2 (Jaguar) operating system
Mac10_3  The OSX 10.3 (Panther) operating system
Mac10_4  The OSX 10.4 (Tiger) operating system
Mac10_5  The OSX 10.5 (Leopard) operating system

enum DzApp::Platform

The platforms DAZ Studio can run on

Enumerator:
Windows  Supported Microsoft Windows Operating Systems
MacOSX  Supported Apple Macintosh OSX Operating Systems

enum DzApp::ReleaseEdition

The available editions of DAZ Studio

Enumerator:
Free  The free edition of DAZ Studio.
Advanced  The advanced edition of DAZ Studio.


Member Function Documentation

Number DzApp::bitArchitecture (  ) 

Returns:
A numeric representation of the bit architecture the application was compiled for.

String DzApp::bitArchitectureString (  ) 

Returns:
A user-friendly string representation of the bit architecture the application was compiled for.

void DzApp::cancelProgress (  ) 

This cancels the current action - i.e. it has the same effect as the user pressing the cancel button. This should have no effect if 'isCancellable' was not set.

void DzApp::closing (  )  [signal]

Signature: "closing()"

Emitted immediately after the main event loop exits

void DzApp::debug ( String  msg  ) 

Write a debug message to the DAZ Studio log file.

Parameters:
msg The debug message to write to the log
See also:
log(), warning()

DzApp::debugMsg ( String  msg  )  [signal]

Signature: "debugMsg(const QString&)"

Emitted when a debug message is sent to the application.

bool DzApp::flushLogBuffer (  ) 

Writes any currently buffered log messages to the log file. This is automatically called whenever the log buffer has more than 512 characters of data, but can be called at any time to force all messages to be written out.

String DzApp::getAbsoluteScriptPath ( String  scriptName  ) 

Searches in default locations for a script file of the given name, and returns the absolute path to the file if one is found, and an empty string otherwise. A path relative to one of the default script locations can also be used for scriptName. Currently the default locations searched includes the paths returned from DzApp::getGeneratedScriptsPath(), and DzApp::getScriptsPath().

Parameters:
scriptName The name (or relative path) of a script file to find.
Returns:
The absolute path to the located script file, or an empty string is no script was found.

String DzApp::getAppDataPath (  ) 

Returns:
The absolute path to the DAZ Studio application data directory.

DzAppSettingsMgr DzApp::getAppSettingsMgr (  ) 

Deprecated:
Use the DzAppSettings class now instead.
Returns:
A pointer to the application-wide persistent settings manager - used to set and retrieve application settings.

DzApp::getCallBackMgr (  ) 

Returns:
A pointer to the application-wide Call Back manager - responsible for tracking call back objects.

DzContentMgr DzApp::getContentMgr (  ) 

Returns:
A pointer to the application-wide Content manager

DzAuthor DzApp::getCurrentAuthor (  ) 

Returns:
The current author (user that is currently running the app).

String DzApp::getDataFolderName (  ) 

Returns:
The name of the data folder under the content directory

String DzApp::getDataFolderPath (  ) 

Returns:
Full path to the data folder

String DzApp::getDataFolderPathBase (  ) 

Returns:
Path to where data is stored

DzDeviceMgr DzApp::getDeviceMgr (  ) 

Returns:
A pointer to the application-wide Device manager - responsible for devices supported by DAZ Studio.

String DzApp::getDocumentationPath (  ) 

Returns:
The directory path where Application documentation files are stored.

String DzApp::getDocumentsPath (  ) 

Returns:
The absolute path to the user documents folder for DAZ Studio.

DzExportMgr DzApp::getExportMgr (  ) 

Returns:
A pointer to the application-wide Export manager in charge of file exporters

String DzApp::getGeneratedScriptsPath (  ) 

Returns:
The directory path where support DAZ Script files which are automatically generated are stored.

String DzApp::getGeneratedShadersPath (  ) 

Returns:
The directory path for automatically generated shaders.

DzHelpMgr DzApp::getHelpMgr (  ) 

Returns:
A pointer to the application-wide Help manager.

String DzApp::getHomePath (  ) 

Returns:
The absolute path to the DAZ Studio executable directory.

DzImageMgr DzApp::getImageMgr (  ) 

Returns:
A pointer to the application-wide Image manager - responsible for image i/o and tracking of currently loaded images.

DzImportMgr DzApp::getImportMgr (  ) 

Returns:
A pointer to the application-wide Import manager in charge of file importers

DzMainWindow DzApp::getInterface (  ) 

Returns:
The main interface widget, if we are running with the interface, otherwise NULL.

String DzApp::getLoadSavePath (  ) 

Last directory that files were loaded or saved to/from.

See also:
setLoadSavePath()

DzMultiMediaMgr DzApp::getMultiMediaMgr (  ) 

Returns:
A pointer to the application-wide Video and Audio manager - responsible for video and audio i/o.

DzApp::getPluginMgr (  ) 

Returns:
A pointer to the application-wide Plug-in manager - responsible for tracking plug-ins.

String DzApp::getPluginsPath (  ) 

Returns:
The directory path where plugins are loaded from.

DzRenderMgr DzApp::getRenderMgr (  ) 

Returns:
A pointer to the application-wide Render manager.

DzRenderOptions DzApp::getRenderOptions (  ) 

Deprecated:
This function is provided to keep old source working. Script and plugin source should be updated to use DzRenderMgr::getRenderOptions(). This function will likely not be supported in future versions.

DzSaveFilterMgr DzApp::getSaveFilterMgr (  ) 

Returns:
A pointer to the application-wide Save Filter manager in charge of save filters

String DzApp::getScriptsPath (  ) 

Returns:
The directory path where support DAZ Script files are stored.

String DzApp::getShadersPath (  ) 

Returns:
The directory path for all shaders

DzStyle DzApp::getStyle (  ) 

Get the application wide style.

Returns:
A pointer to the application-wide style object. This pointer is subject to becoming invalid if the application style changes.

String DzApp::getStyleDefinition (  ) 

Returns:
The name of the style definition currently in use.

Array DzApp::getStyleDefinitionList (  ) 

Returns:
A list of the available style definitions.

QString DzApp::getTempFilename (  ) 

Get a filename for temporary storage.

Returns:
A unique filename (with no extension) whose path will be in the current temporary working folder. (All files in this folder will be deleted when shutdown() is called)

String DzApp::getTempPath (  ) 

Returns:
The directory path where temporary files are stored.
See also:
setTempPath(), restoreDefaultTempPath()

QString DzApp::getTempRenderFilename (  ) 

Get a filename for temporary storage of rendered images.

Returns:
A filename (with no extension) whose path will be in the current temporary working folder. (All files in this folder will be deleted when shutdown() is called)

QString DzApp::getTempTextureConvertPath (  ) 

Returns:
A directory path where temporary files of texture converter are stored. All files in this folder will be deleted when the application is shut down.

String DzApp::getUtilitiesPath (  ) 

Returns:
The directory path for all binary utilities.

Boolean DzApp::isClosing (  ) 

Returns:
true if the application is in the process of shutting down.

Boolean DzApp::isRunning (  ) 

Returns:
true if the main event loop is running and events that are posted can be expected to be delivered.

Boolean DzApp::isSlave (  ) 

Returns:
true if the application is running as a slave to another application.

Boolean DzApp::isStarting (  ) 

Returns:
true if the application is in the process of starting up.

void DzApp::log ( String  buffer  ) 

Write a message to the DAZ Studio log file.

Parameters:
buffer String to be written to the log file.
Example:
    // the message will be written to the log file
    dzApp->log( "Hello World!" );
See also:
statusLine()

Number DzApp::modifierKeyState (  ) 

Returns the current modifier key state (this is cleared when an accelerator is activated).

    META            = 0x00100000
    SHIFT           = 0x00200000
    CTRL            = 0x00400000
    ALT             = 0x00800000

    META  + SHIFT   = 0x00300000
    META  + CTRL    = 0x00500000
    META  + ALT     = 0x00900000
    SHIFT + CTRL    = 0x00600000
    SHIFT + ALT     = 0x00C00000
    CTRL  + ALT     = 0x00A00000

Returns:
The current modifier key state - this value is a bitwise or of the Qt::Modifier flags for the active keys, if any.
Example:
        var ctrlKey  = App.modifierKeyState() == 0x00400000;
        var altShift = App.modifierKeyState() == 0x00A00000;
        if (ctrlKey )
            print("Control");
        if (altShift )
            print("Alt + Shift");

OperatingSystem DzApp::operatingSystem (  ) 

Returns:
The enumerated value associated with the OperatingSystem that DAZ Studio is running under.

String DzApp::operatingSystemString (  ) 

Returns:
A user-readable string that describes the current Operating System.

Platform DzApp::platform (  ) 

DAZ Studio is intended to be as platform independant as possible, but there are cases where something needs to be done differently on one platform or another. This function provides a simple way to check which platform DAZ Studio is running under.

Returns:
The enumerated value associated with the Platform that DAZ Studio is running under.
Example:
        var nPlatform = App.platform();
        if( nPlatform == App.Windows )
            doWinSomething();
        else if( nPlatform == App.MacOSX )
            doMacSomething();

void DzApp::progressCancelled (  )  [signal]

Signature: "progressCancelled()"

Emitted when the user clicks the cancel button in the currently active progress dialog. This is not notification that the progress cycle is complete - only that the user has requested the current operation be cancelled.

void DzApp::progressFinished (  )  [signal]

Signature: "progressFinished()"

Emitted when the active progress cycle has been finished. Like DzApp::progressStarting(), this is emitted only once for each progress cycle, even if DzApp::finishProgress() is called multiple times.

DzApp::progressStarting ( Number  totalSteps  )  [signal]

Signature: "progressStarting(int)"

Emitted when the progress bar for the application becomes active (i.e. when the total number of steps is specified). This is emitted only once for each progress cycle, even if DzApp::startProgress() is called multiple times.

Parameters:
totalSteps The total number of steps for the progress operation.

DzApp::progressUpdate ( Number  numSteps  )  [signal]

Signature: "progressUpdate(int)"

Emitted when the progress bar position has been changed (i.e. whenever DzApp::stepProgress(), or DzApp::updateProgress() is called). The value passed is the current number of steps out of the total number of steps for the progress cycle.

Parameters:
numSteps The number of steps to increment for this update.

ReleaseEdition DzApp::releaseEdition (  ) 

Returns:
The enumerated value associated with the ReleaseEdition of DAZ Studio.

String DzApp::releaseEditionString (  ) 

Returns:
A user-friendly string describing the release edition of DAZ Studio.

void DzApp::restoreDefaultTempPath (  ) 

Restores the temporary files directory to the default location.

See also:
setTempPath(), getTempPath()

DzApp::saveStateScript ( DzScript  script  )  [signal]

Signature: "saveStateScript(DzScript&)"

Emitted when the state (startup) script is being saved. Interface items and other components that want to write to save state information in this script should connect to this signal, and add their specific code to the given script.

Parameters:
script The script that will be saved as the startup script.

void DzApp::setLoadSavePath ( String  dir  ) 

Set the default directory for loading or saving files.

Parameters:
dir The default directory for loading/saving files.
Example:
    // set the load/save path to our favorite folder
    dzApp->setLoadSavePath( "c:/MyScenes" );
See also:
getLoadSavePath()

Boolean DzApp::setStyleDefinition ( String  name  ) 

Sets the current style for the application.

Parameters:
name The name of the style definition to use.
Returns:
true if the application switched to the given style. False if an error occured.

Boolean DzApp::setTempPath ( String  tempPath  ) 

Sets the directory path where temporary files are stored. The path provided needs to be an absolute path. A directory will be created at the new location if it does not already exist.

Parameters:
tempPath The path to the new temporary files directory
Returns:
True if the path provided is valid and changing the temporary path succeeded. False if any errors occured.
See also:
getTempPath(), restoreDefaultTempPath()

void DzApp::setupWizardComplete (  )  [signal]

Signature: "setupWizardComplete()"

Emitted immediately after the setup wizard finishes

void DzApp::showURL ( String  url  ) 

A convenience method for browsing to a given URL.

Example:
    // open the DAZ home page in the user's default browser
    dzApp->showURL( "http://www.daz3d.com/" );

    // open a local html file in the user's browser
    dzApp->showURL( "file://" + dzApp->getDocumentationPath() + "index.html" );
Parameters:
url The url to open in the system's default browser. Be sure to specify the scheme of the url (e.g 'http://' or 'file://').

void DzApp::starting (  )  [signal]

Signature: "starting()"

Emitted after the application has finished its startup just before the main event loop begins

void DzApp::statusLine ( String  msg,
Boolean  writeToLog = true 
)

Display a message in the current status interface.

Example:
    // the message will be displayed in status bar, and written to the log file
    dzApp->statusLine( "Hello World!" );
Parameters:
msg String to be displayed (and logged if logging is enabled)
writeToLog If true, the message will also be written the the log file.
See also:
log()

DzApp::styleChanged ( DzStyle  newStyle  )  [signal]

Signature: "styleChanged(DzStyle*)"

Emitted when the application wide style has changed

Boolean DzApp::usingInterface (  ) 

Returns:
true if the application is using a user interface.

void DzApp::warning ( String  msg  ) 

Write a warning message to the DAZ Studio log file.

Parameters:
msg The message to write to the log as a warning
See also:
log(), debug()

DzApp::warningMsg ( String  msg  )  [signal]

Signature: "warningMsg(const QString&)"

Emitted when a warning message is sent to the application.

Boolean DzApp::writeConfigScript ( String  configScriptFilename = ""  ) 

Parameters:
filename The name of the file to save a configuration script to. Saves out a user configuration script to the given filename. If no filename is given, the script is saved to the same file read from in startup(). The run() function calls this at the end of each execution.
Returns:
true if the file was written successfully.


Member Data Documentation

String DzApp::appName

Holds the name of the application (DAZ Studio). (Read Only)

Number DzApp::buildNumber

Holds the product build number. (Read Only)

String DzApp::longVersionString

Holds a string representation of the full product version number. (Read Only)

Number DzApp::majorVersion

Holds the product major version number. (Read Only)

Number DzApp::minorVersion

Holds the product minor version number. (Read Only)

Number DzApp::version

Holds the full product version number as an encoded integer. (Read Only)

String DzApp::versionString

Holds a string representation of the product version number. (Read Only)


Generated on Thu Sep 24 12:21:10 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.