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.
The operating system
enum DzApp::Platform |
Number DzApp::bitArchitecture | ( | ) |
String DzApp::bitArchitectureString | ( | ) |
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 | ) |
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.
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().
scriptName | The name (or relative path) of a script file to find. |
String DzApp::getAppDataPath | ( | ) |
DzAppSettingsMgr DzApp::getAppSettingsMgr | ( | ) |
DzApp::getCallBackMgr | ( | ) |
DzContentMgr DzApp::getContentMgr | ( | ) |
DzAuthor DzApp::getCurrentAuthor | ( | ) |
String DzApp::getDataFolderName | ( | ) |
String DzApp::getDataFolderPath | ( | ) |
String DzApp::getDataFolderPathBase | ( | ) |
DzDeviceMgr DzApp::getDeviceMgr | ( | ) |
String DzApp::getDocumentationPath | ( | ) |
String DzApp::getDocumentsPath | ( | ) |
DzExportMgr DzApp::getExportMgr | ( | ) |
String DzApp::getGeneratedScriptsPath | ( | ) |
String DzApp::getGeneratedShadersPath | ( | ) |
DzHelpMgr DzApp::getHelpMgr | ( | ) |
String DzApp::getHomePath | ( | ) |
DzImageMgr DzApp::getImageMgr | ( | ) |
DzImportMgr DzApp::getImportMgr | ( | ) |
DzMainWindow DzApp::getInterface | ( | ) |
String DzApp::getLoadSavePath | ( | ) |
Last directory that files were loaded or saved to/from.
DzMultiMediaMgr DzApp::getMultiMediaMgr | ( | ) |
DzApp::getPluginMgr | ( | ) |
String DzApp::getPluginsPath | ( | ) |
DzRenderMgr DzApp::getRenderMgr | ( | ) |
DzRenderOptions DzApp::getRenderOptions | ( | ) |
DzSaveFilterMgr DzApp::getSaveFilterMgr | ( | ) |
String DzApp::getScriptsPath | ( | ) |
String DzApp::getShadersPath | ( | ) |
DzStyle DzApp::getStyle | ( | ) |
Get the application wide style.
String DzApp::getStyleDefinition | ( | ) |
Array DzApp::getStyleDefinitionList | ( | ) |
QString DzApp::getTempFilename | ( | ) |
Get a filename for temporary storage.
String DzApp::getTempPath | ( | ) |
QString DzApp::getTempRenderFilename | ( | ) |
Get a filename for temporary storage of rendered images.
QString DzApp::getTempTextureConvertPath | ( | ) |
String DzApp::getUtilitiesPath | ( | ) |
Boolean DzApp::isClosing | ( | ) |
Boolean DzApp::isRunning | ( | ) |
Boolean DzApp::isSlave | ( | ) |
Boolean DzApp::isStarting | ( | ) |
void DzApp::log | ( | String | buffer | ) |
Write a message to the DAZ Studio log file.
buffer | String to be written to the log file. |
// the message will be written to the log file dzApp->log( "Hello World!" );
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
var ctrlKey = App.modifierKeyState() == 0x00400000; var altShift = App.modifierKeyState() == 0x00A00000; if (ctrlKey ) print("Control"); if (altShift ) print("Alt + Shift");
OperatingSystem DzApp::operatingSystem | ( | ) |
String DzApp::operatingSystemString | ( | ) |
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.
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.
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.
numSteps | The number of steps to increment for this update. |
ReleaseEdition DzApp::releaseEdition | ( | ) |
String DzApp::releaseEditionString | ( | ) |
void DzApp::restoreDefaultTempPath | ( | ) |
Restores the temporary files directory to the default location.
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.
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.
dir | The default directory for loading/saving files. |
// set the load/save path to our favorite folder dzApp->setLoadSavePath( "c:/MyScenes" );
Sets the current style for the application.
name | The name of the style definition to use. |
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.
tempPath | The path to the new temporary files directory |
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.
// 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" );
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
Display a message in the current status interface.
// the message will be displayed in status bar, and written to the log file dzApp->statusLine( "Hello World!" );
msg | String to be displayed (and logged if logging is enabled) | |
writeToLog | If true, the message will also be written the the log file. |
DzApp::styleChanged | ( | DzStyle | newStyle | ) | [signal] |
Signature: "styleChanged(DzStyle*)"
Emitted when the application wide style has changed
Boolean DzApp::usingInterface | ( | ) |
void DzApp::warning | ( | String | msg | ) |
DzApp::warningMsg | ( | String | msg | ) | [signal] |
Signature: "warningMsg(const QString&)"
Emitted when a warning message is sent to the application.
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. |
Holds the name of the application (DAZ Studio). (Read Only)
Holds the product build number. (Read Only)
Holds a string representation of the full product version number. (Read Only)
Holds the product major version number. (Read Only)
Holds the product minor version number. (Read Only)
Holds the full product version number as an encoded integer. (Read Only)
Holds a string representation of the product version number. (Read Only)