User Tools

Site Tools


DzMainWindow

The main interface widget.

More...

Inherits :

Properties

Methods

Signals

Detailed Description

There is only one of these widgets in the application, which is created and owned by DzApp. It can be accessed by using the Global::MainWindow variable.

Properties


Boolean : alwaysOnTop

Whether or not the main window is always on top of other application windows.


Boolean : toolTipsEnabled

Whether or not tool tips are enabled.

Methods


Boolean : askSaveChanges()

Presents the user with a dialog that asks if they want to save changes to the scene, and does a scene save if the user selects yes.

Return Value:

  • true if the user selects 'Yes' or 'No', otherwise false.

Boolean : askTurnOffLimits()

Presents the user with a dialog that asks if they want to turn off limits to apply the preset currently being loaded.

Return Value:

  • true if limits should be turned off, false if limits should be left alone.

Boolean : checkExistingFile( String filename )

Checks to see if the given file already exists - if it does, prompts the user for whether or not they want to overwrite it.

Parameter(s):

  • filename - The full path of the file to check.

Return Value:

  • true if the file does not exist or the user wants to overwrite it, false if the user needs to select a new name.

void : clearUIPopUp()

Clears a the current UI popup if there is one.


void : displayPrompt( String msg, Number msecs=-1 )

Display a message in the status bar.

Parameter(s):

  • msg - Message to display.
  • msecs - If greater than zero, the message will be displayed for the given amount of time, otherwise the message will be displayed until another message is sent.

DzDockArea : dockArea( Point pos )

Return Value:

  • The dock area located at the goven position.

Boolean : doFileExport( QWidget parent=null )

Displays a dialog for saving the scene to a non-native file, and saves the scene if the user does not cancel.

Parameter(s):

Return Value:

  • true if a file was selected and successfully saved, otherwise false.

Boolean : doFileImport( QWidget parent=null )

Displays a dialog for loading a non-native file, and loads the file if the user does not cancel.

Parameter(s):

Return Value:

  • true if a file was selected and successfully loaded, otherwise false.

Boolean : doFileMerge( QWidget parent=null )

Displays a dialog for loading a native scene file, and merges the file into the current scene if the user does not cancel.

Parameter(s):

Return Value:

  • true if a file was selected and successfully loaded, otherwise false.

Boolean : doFileOpen( QWidget parent=null )

Displays a dialog for loading a native scene file, and opens the file as a new scene if the user does not cancel.

Parameter(s):

Return Value:

  • true if a file was selected and successfully loaded, otherwise false.

Boolean : doFileSave( QWidget parent=null )

Saves the scene to the current scene file; displays a dialog to the user if a file needs to be selected.

Parameter(s):

Return Value:

  • true if a file was selected and successfully saved, otherwise false.

Boolean : doFileSaveAs( QWidget parent=null, String startWith=“” )

Displays a dialog for saving the scene to a native file, and saves the scene if the user does not cancel.

Parameter(s):

  • parent - The widget to parent the dialog to; see DzApp::getDialogParent().
  • startWith - The directory to start the file dialog in (can include a default filename). If empty, the current load/save directory is used.

Return Value:

  • true if a file was selected and successfully saved, otherwise false.

Image : doImageOpen( QWidget parent=null )

Displays a dialog for loading an image file, and loads the file if the user does not cancel.

Parameter(s):

Return Value:

  • An empty image if the user cancels or loading fails, otherwise the selected image.

Boolean : doImageSaveAs( Image image, QWidget parent=null )

Displays a dialog for saving the given image, and saves the image if the user does not cancel.

Parameter(s):

  • image - The image to save.
  • parent - The widget to parent the dialog to; see DzApp::getDialogParent().

Return Value:

  • true if a file was selected and successfully saved, otherwise false.

Boolean : doNewFile()

Clears the scene.


Boolean : doVideoClipSaveAs( DzVideoClip clip, QWidget parent=null )

Displays a dialog for saving the given video clip, and saves the clip if the user does not cancel.

Parameter(s):

  • clip - The video clip to save.
  • parent - The widget to parent the dialog to; see DzApp::getDialogParent().

Return Value:

  • true if a file was selected and successfully saved, otherwise false.

void : exitFullScreen()

Switches from full screen back to normal mode.


DzActionMgr : getActionMgr()

Return Value:

  • The global action manager for the application interface.

DzDockArea : getBottomDockArea()

Return Value:

  • The dock area located at the bottom of the main window.

DzDockArea : getCenterDockArea()

Return Value:

  • The dock area located in the center of the main window.

Since:

  • 4.6.4.4

DzInteractiveLessonMgr : getInteractiveLessonMgr()

Return Value:

  • The global interactive lesson manager for the application interface.

DzDockArea : getLeftDockArea()

Return Value:

  • The dock area located at the left of the main window.

DzPaneMgr : getPaneMgr()

Return Value:

  • The global pane manager for the application interface.

DzDockArea : getRightDockArea()

Return Value:

  • The dock area located at the right of the main window.

Number : getSliderMouseDragScalar()

Return Value:

  • The sensitivity of the mouse move response in limitless sliders.

Since:

  • 4.11.0.159

DzDockArea : getTopDockArea()

Return Value:

  • The dock area located at the top of the main window.

DzUIPopUpWgt : getUIPopUp()

Return Value:

  • The current user interface popup widget (if any), otherwise null.

DzViewportMgr : getViewportMgr()

Return Value:

  • The global viewport manager for the application interface.

void : goFullScreen()

Switches from normal to full screen mode


Boolean : isUILocked()

Return Value:

  • true if the user interface is locked, otherwise false.

void : positionUIPopUp( QWidget posWgt )

Position the popup according to a widget.

Parameter(s):

  • posWgt - The widget to position the popup on.

void : removePrompt()

Clear the message in the status bar.


void : repaintActive3DViewport()

A convenience method for forcing a repaint of the currently active 3D viewport (if any).


void : restoreUILockState()

Restores the locked state of the user interface to the value in the application settings.


void : setSliderMouseDragScalar( Number val )

Sets the sensitivity of the mouse move response in limitless sliders.

Parameter(s):

  • val - The scalar value to set.
var nOldScalar = MainWindow.getSliderMouseDragScalar();
var nNewScalar = Math.max( nOldScalar - 0.05, 0.01 );
MainWindow.setSliderMouseDragScalar( nNewScalar );
print( "Old:", nOldScalar, "New:", nNewScalar );

Since:

  • 4.11.0.159

void : setUILocked( Boolean onOff, Boolean storeSetting=true )

Sets the locked state of the user interface.

Parameter(s):

  • onOff - If true, the user interface is locked.
  • storeSetting - If true (default), records the application setting.

void : showHomeDlg()

Show the Home page dialog.


DzUIPopUpWgt : showUIPopUpWgt( String filename, QWidget posWgt=null )

Parameter(s):

  • filename - The script that loads a .ui file, or a .ui file directly, to show in the popup widget.
  • posWgt - The widget to position the popup on.

Return Value:

  • The popup widget.

DzUIPopUpWgt : toggleUIPopUpWgt( String filename, QWidget posWgt=null )

If a popup already exists with the same filename, it is cleared (toggled). Otherwise it has the same effect as calling DzMainWindow::showUIPopUpWgt()

Parameter(s):

  • filename - The script that loads a .ui file, or a .ui file directly, to show in the popup widget.
  • posWgt - The widget to position the popup on.

Return Value:

  • The popup widget (if it was toggled on), otherwise null.

Signals


void : aboutToClose()

Signature:“aboutToClose()”

Emitted just before the main window closes.


void : alwaysOnTopChanged( Boolean onOff )

Signature:“aboutToClose()”

Emitted when the main window is switched to/from being always on top.


void : sliderMouseDragScalarChanged( Number scalar )

Signature:“sliderMouseDragScalarChanged(float)”

Emitted when the scalar for limitless slider mouse movement changes.

Parameter(s):

  • scalar - The new scalar.

Since:

  • 4.11.0.159

void : started()

Signature:“started()”

Emitted after the startup() function has finished.


void : uiLockedChanged()

Signature:“uiLockedChanged()”

Emitted when the main window is switched to/from having the ui locked.