User Tools

Site Tools


DzContentFolder

Represents a folder in the content library.

More...

Inherits :

Enumerations

Properties

Methods

Signals

voidaddedFolder ( DzContentFolder newFolder )
voidfileListChanged ()
voidfolderListChanged ()
voidremovedFolder ( DzContentFolder folder )

Detailed Description

Represents a folder in the content library that holds DzContentFile objects as well as other DzContentFolder objects.

See Also:

Enumerations


: FolderType

The possible types of content folders.

  • NATIVE_TYPE - Folder containing native content.
  • POSER_TYPE - Folder containing Poser content.
  • IMPORT_TYPE - Folder containing other importable content.

Properties


Boolean : canAddSubFolder

Holds whether or not a sub folder can be added in this folder. (Read Only)


Boolean : canDelete

Holds whether or not this folder can be deleted. (Read Only)


Boolean : canRename

Holds whether or not this folder can be renamed. (Read Only)


Boolean : filesAreLoaded

Holds whether or not the files of this folder are loaded. (Read Only)


String : folderName

Holds the name of the folder on disk. (Read Only)


Boolean : foldersAreLoaded

Holds whether or not the subfolders of this folder are loaded. (Read Only)

Return Value:

  • true if the child folders of this folder are already loaded, otherwise false.

FolderType : folderType

Holds the type of this folder. (Read Only)


String : fullPath

Holds the full path of the folder on disk. (Read Only)


Pixmap : icon

Holds the icon of the folder. (Read Only)


Boolean : isBuiltInContentFolder

Holds whether or not this folder is a built-in content folder. (Read Only)


String : label

Holds the label of the folder as it is displayed to the user. (Read Only)

Methods


Boolean : addSubFolder( String folderName )

Adds a new subfolder with the given name to this folder.

Parameter(s):

  • folderName - The name of the new sub folder.

Return Value:

  • true if the new subfolder was created successfully, otherwise false.

Boolean : canMoveFile( DzContentFile file )

Parameter(s):

  • file - The file to test for moving.

Return Value:

  • true if the file is a type that can be moved or copied to this folder, otherwise false.

Boolean : copyFile( DzContentFile file )

Copies the given content file to this folder.

Parameter(s):

  • file - The file to copy to this folder.

Return Value:

  • true if the file was copied successfully, otherwise false.

Boolean : deleteFolder()

Removes this content folder. The default implementation of this function deletes all files and subfolders in this directory from the disk, so use with care!

Return Value:

  • true if the file was removed successfully, otherwise false.

DzContentFile : getFirstFile()

Return Value:

  • The first file in this folder (if any), otherwise null.

DzContentFolder : getFirstFolder()

Return Value:

  • The first child folder (if any), otherwise null.

DzContentFile : getFirstHiddenFile()

Return Value:

  • The first hidden file in this folder (if any), otherwise null.

DzContentFolder : getFirstHiddenFolder()

Return Value:

  • The first hidden folder (if any), otherwise null.

DzContentFolder : getNext()

Return Value:

  • The next sibling folder (if any), otherwise null.

DzContentFolder : getParent()

Return Value:

  • The parent folder of this folder (if any), otherwise null.

Boolean : hasSubFolders()

Return Value:

  • true if this folder has subfolders, otherwise false.

Boolean : isModifiable()

Return Value:

  • true if the folder can be modified, otherwise false.

Boolean : moveFile( DzContentFile file )

Moves the given content file to this folder.

Parameter(s):

  • file - The file to move to this folder.

Return Value:

  • true if the file was moved successfully, otherwise false.

Boolean : refresh( Boolean reloadIcons=false )

Checks for changes in sub folders and files (if loaded).

Parameter(s):

  • reloadIcons - If true, the icons will be reloaded from disk.

Return Value:

  • true if a change in subfolders was found and the tree needs to be reloaded, otherwise false.

Boolean : rename( String newName )

Rename the folder to the given name.

Parameter(s):

  • newName - The new name for the folder.

Return Value:

  • true if the folder was successfully renamed, otherwise false.

Signals


void : addedFolder( DzContentFolder newFolder )

Signature:“addedFolder(DzContentFolder*)”

Emitted when a new folder is added.

Parameter(s):

  • newFolder - The folder that was added.

void : fileListChanged()

Signature:“fileListChanged()”

Emitted when the file list has changed.


void : folderListChanged()

Signature:“folderListChanged()”

Emitted when a folder is added or removed.


void : removedFolder( DzContentFolder folder )

Signature:“removedFolder(DzContentFolder*)”

Emitted when a folder is removed.

Parameter(s):

  • folder - The folder that was removed.