User Tools

Site Tools


DzFileProperty

A static (non-animatable) string property that holds a file path. Attempts to save and restore as relative path when possible.

More...

Inherits :

Enumerations

DAZ Script
FileType{ FileSave, FileOpen, Dir }

Constructors

DAZ Script
DzFileProperty ()
DzFileProperty ( String name, Boolean isUserProperty )

Methods

DAZ Script
StringgetAbsolutePath ( String path )
StringgetFilter ()
FileTypegetType ()
voidsetFilter ( String filter )
voidsetType ( FileType type )

Signals

voidfilterChanged ()

Detailed Description

TODO: Add detailed description.

Enumerations


: FileType

The type of file dialog that will used when the user browses for the file.

  • FileSave - The user will be prompted with a 'Save As' type dialog when browsing for a file.
  • FileOpen - The user will be prompted with an 'Open' type dialog when browsing for a file.
  • Dir - The user will be prompted with a 'Select Folder' type dialog when browsing for a directory.

Constructors


DzFileProperty()

Default Constructor. Creates a non-user property.


DzFileProperty( String name, Boolean isUserProperty )

Parameter(s):

  • name - The name of this property.
  • isUserProperty - If true, creates a user property; user properties are properties that can be added/deleted by users.

Methods


String : getAbsolutePath( String path )

Parameter(s):

  • path - The (relative) path of the file.

Return Value:

  • The absolute path of the file specified by the given path

String : getFilter()

Gets the filter value.


FileType : getType()

Gets the file type.


void : setFilter( String filter )

Sets the value to use as a file extention filter.

Parameter(s):

  • filter - The filter to set. This should be in the form “FilterName (*.ext1 *.ext2 *.ext3)”.

Attention:

  • If this property is of the type SaveFile, and if the save file is not given an extension by the user, then the first extension listed will be added to the filename. The filter is not checked if setValue() is used.

void : setType( FileType type )

Sets the file type for the property.

Parameter(s):

  • type - The file type to set.

Signals


void : filterChanged()

Signature:“filterChanged()”

Emitted when the filter for the property changes.