User Tools

Site Tools


DzUiLoader

Script wrapper for QUiLoader.

More...

Inherits :

Constructors

DAZ Script
DzUiLoader ()

Methods

DAZ Script
voidaddPluginPath ( String path )
ArrayavailableLayouts ()
ArrayavailableWidgets ()
voidclearPluginPaths ()
DzLayoutcreateLayout ( String className, QObject parent=0, String name=“” )
DzWidgetcreateWidget ( String className, DzWidget parent, String name=“” )
DzWidgetload ( String filePath, DzWidget parent=0 )
ArraypluginPaths ()
voidsetWorkingDirectory ( String dir )
StringworkingDirectory ()

Detailed Description

Provides functionality that allows QtDesigner to be used in the creation of graphical user interfaces used by scripts.

See Also:

Constructors


DzUiLoader()

Default Constructor.

Methods


void : addPluginPath( String path )

Adds a path to the list of paths the .ui loader searches when locating QtDesigner plug-ins.

Parameter(s):

  • path - The path to add.

Array : availableLayouts()

Return Value:

  • A list of the names of layouts that can be built using createLayout().

Array : availableWidgets()

Return Value:

  • A list of the names of widgets that can be built using createWidget().

void : clearPluginPaths()

Clears the list of paths the .ui loader searches when locating QtDesigner plug-ins.


DzLayout : createLayout( String className, QObject parent=0, String name=“” )

Creates a new layout.

Parameter(s):

  • className - The name of the class to create an instance of.
  • parent - The object to parent the layout to.
  • name - The name to assign to the layout.

Return Value:

  • The created layout (if any), otherwise null.

DzWidget : createWidget( String className, DzWidget parent, String name=“” )

Creates a new widget.

Parameter(s):

  • className - The name of the class to create an instance of.
  • parent - The widget to parent the widget to.
  • name - The name to assign to the widget.

Return Value:

  • The created widget (if any), otherwise null.

See Also:


DzWidget : load( String filePath, DzWidget parent=0 )

Loads a QtDesigner form (*.ui) and creates a new widget.

Parameter(s):

  • filename - The path of the .ui file to load.
  • parent - The widget to parent the contents of the file to.

Return Value:

  • A widget parented to parent that holds the contents of the loaded form (if any), otherwise null.

Array : pluginPaths()

Return Value:

  • A list of the paths the .ui loader searches when locating custom QtDesigner widget plug-ins.

void : setWorkingDirectory( String dir )

Sets the base directory of the .ui loader. The .ui loader looks for other resources, such as icons and resource files, in paths relative to this directory.

Parameter(s):

  • dir - The path to use as the base directory for other resources.

String : workingDirectory()

Return Value:

  • The working directory of the .ui loader.