Inheritance diagram for DzContentMgr:
Manager that is responsible for all the content folder & file trees that are accessible from the content library.
There is only one instance of this manager in an application. This instance is created and owned by DzApp. Don't create an instance of this class, but rather request a pointer to it from DzApp via DzApp::getContentMgr().
void DzContentMgr::addContentDirectory | ( | String | directory | ) |
Adds a content directory to the list.
directory | The path of the directory to add. |
void DzContentMgr::addImportDirectory | ( | String | directory | ) |
Adds an import directory to the list.
directory | The name of the directory to add. |
void DzContentMgr::addPoserDirectory | ( | String | directory | ) |
Adds a Poser import directory to the list. Poser import paths are folders one level above any Poser Runtime folder.
directory | The Poser directory to add |
Boolean DzContentMgr::alterDBContent | ( | DzContentDBEntry | entry | ) |
entry | entry to update |
DzContentMgr::autoRefreshChanged | ( | Boolean | onOff | ) | [signal] |
Signature: "autoRefreshChanged(bool)"
Emitted when the enabled state of the auto refresh has changed
onOff | The new state of auto refresh. |
DzContentMgr::categorizeDBContent | ( | Number | categoryIndex, | |
Number | contentIndex, | |||
Boolean | useNew = false | |||
) |
categoryIndex | Index of the category | |
contentIndex | Index of the content | |
useNew | Whether to march this content as new Adds the content from the given category |
void DzContentMgr::categoryListChanged | ( | ) | [signal] |
Signature: "categoryListChanged()"
Emitted when the list of categories has changed.
void DzContentMgr::categoryTypeChanged | ( | ) | [signal] |
Signature: "categoryTypeChanged()"
Emitted when the current category type has changed.
void DzContentMgr::changeViewType | ( | DzContentManagerViewType | type | ) | [signal] |
Signature: "changeViewType(DzContentManagerViewType)"
Emitted when the content manager view type has changed.
void DzContentMgr::contentDirectoryListChanged | ( | ) | [signal] |
Signature: "contentDirectoryListChanged()"
Emitted when a content directory is added or removed.
sCategoryPath | path for the categry seperated by "/". Categories in the path can be given as category indexes,or category name, but root must be a valid category number. Use "1/" to go from root. | |
fileCalling | Index of the content Creates the given category and returns its index or -1 if unscessful |
DzContentMgr::deleteDBCategory | ( | Number | categoryIndex | ) |
categoryIndex | Index of the category |
Scans mapped directories for content to add to the database.
forceScan | is true if the scan must be performed. False if a previous scan is sufficient. |
bool DzContentMgr::doContentSearch | ( | ) |
Displays a dialog to the user to perform a Poser content search on the local machine.
void DzContentMgr::doContentVerificationScan | ( | ) |
Prompts the user to rescan all the content in the database and remove invalid content.
void DzContentMgr::doDirNumCheck | ( | ) |
Causes the content manager to check the number of mapped content directories, and display a warning to the user if it is excessive.
void DzContentMgr::fileCreated | ( | String | filename | ) |
Notifies the content manager that a new content file has been saved.
DzContentFolder DzContentMgr::findBaseDirectory | ( | String | path, | |
Boolean | useImportFolders | |||
) |
Given an absolute path, this method traverses the content directories and attempts to find the base (mapped) folder.
path | The absolute path | |
useImportFolders | If true, the import folders will also be searched. |
Given a partial path (a file path that is relative to a content directory) this function traverses the DAZ Studio Native content directories to find the given file.
partialPath | The releative path to the file to find. |
void DzContentMgr::folderTreeChanged | ( | ) | [signal] |
Signature: "folderTreeChanged()"
Emitted when the currently loaded tree of folders has changed and needs to be rebuilt. Usually a result of a call to refresh(), or when one of the content directory lists has changed.
Attempts to locate a file with the given relative path by prepending the path information for each content directory.
relativePath | The relative path to find | |
useImportFolders | If true, the import folders will also be searched. |
DzContentFolder DzContentMgr::getBuiltInContentDirectory | ( | ) |
String DzContentMgr::getBuiltInContentDirectoryPath | ( | ) |
DzContentFolder DzContentMgr::getContentDirectory | ( | Number | which | ) |
which | The index of the content directory to be returned. |
which | The index of the content directory to return the path of. |
Checks the given node for a source file data item, and returns the path of the source file if one is found.
node | The scene node to get the source file of. |
DzContentReplaceMgr * DzContentMgr::getContentReplaceMgr | ( | ) |
DzContentMgr::getDBCategory | ( | Number | index, | |
DzCategoriesDBEntry | entry | |||
) |
index | Index of the content | |
entry | Entry to fill with this category's entry Fills the given entry with the datbase entry if the index exists in the database, otherwise sets the entry's id to -1 |
categoryIndex | Index of the category to get the content for |
categoryIndex | Index of the category Returns the index of the category's parent |
categoryIndex | Index of the category Returns the index of the category's root |
DzContentMgr::getDBContentData | ( | Number | contentIndex, | |
DzContentDBEntry | entry | |||
) |
contentIndex | Index of the content | |
entry | Entry to fill with this content's entry Fills the given entry with the datbase entry if the index exists in the database, otherwise sets the entry's id to -1 |
path | Absolute path the the file | |
file | Filename of the file Returns the index of the content or -1 if it is not in the database |
absolutePath | Absolute path of the content to get the path for. Returns the index for the content at the given path or -1 if it is not in the database |
itemIndex | Index of the content item |
parentCategory | Index of the category to get subcategories for |
DzContentFolder DzContentMgr::getImportDirectory | ( | Number | which | ) |
which | The index of the import directory to return. |
which | The index of the import directory to return the path of. |
Number DzContentMgr::getNumContentDirectories | ( | ) |
Number DzContentMgr::getNumImportDirectories | ( | ) |
Number DzContentMgr::getNumPoserDirectories | ( | ) |
DzContentFolder DzContentMgr::getPoserDirectory | ( | Number | which | ) |
which | The index of the Poser directory to return. |
which | The index of the Poser directory to return the path of. |
Attempts to shorten the given absolute path to a path that is relative to one of the current content directories. If the path cannot be shortened, the original string is returned.
absolutePath | The path name to make relative | |
useImportFolders | If true, then the import folders will also be searched. |
Looks up the file in the content database to find its type.
fullPath | The file to get the type of. |
Checks the given node for a source file data item, looks up the item in the content database to find its type.
node | The scene node to get the source file type of. |
void DzContentMgr::importDirectoryListChanged | ( | ) | [signal] |
Signature: "importDirectoryListChanged()"
Emitted when an import directory is added or removed.
Imports the file at the given path. A companion script (a DAZ Script file with the same name as the file being imported) will be executed if one exists. This function should only be used in special circumstances. Use openFile() instead.
filename | The name of the file to import |
Number DzContentMgr::insertDBContent | ( | String | path, | |
String | file, | |||
String | name, | |||
String | timestamp, | |||
Number | categoryIndex, | |||
Boolean | useNew | |||
) |
path | path to the conent (absolute path not including filename) | |
file | filename of the content | |
name | name of the content | |
timestamp | timestamp for the file | |
categoryIndex | category to categorize as | |
useNew | whether to mark as new |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
type | The type string to test. |
categoryIndex | Index of the category | |
toIndex | Index of the category to move this category under Moves the category to be a subcategory of the target category. |
DzContentMgr::newFileCreated | ( | String | filename | ) | [signal] |
Signature: "newFileCreated(const QString&)"
Emitted when a new content file has been created.
DzContentMgr::onNewSceneChanged | ( | String | filename | ) | [signal] |
Signature: "onNewSceneChanged(const QString&)"
Emitted when the file that is loaded on 'new' has been changed.
Loads the file, either as a native file or an imported file, by calling openNativeFile() or importFile() based on the file extension. For file imports, a companion script (a DAZ Script file with the same name as the file being imported) will be executed if one exists.
filename | The name of the file to load. | |
merge | True to merge file, false to open it (applies only for native files). |
Loads a native file into the scene. This function should only be used in special circumstances. Use openFile() instead.
filename | The name of the file to load | |
isMerge | If true, the file is merged into the scene. If false, the file is loaded as the scene. |
void DzContentMgr::poserDirectoryListChanged | ( | ) | [signal] |
Signature: "poserDirectoryListChanged()"
Emitted when a poser import directory is added or removed.
Refreshes any currently loaded content directories. Call this after any operation that makes changes to the file system, e.g. saving or deleting files, etc.
reloadIcons | If true, all file icons will be reloaded - good for updating the current content directory when a file has been saved over, etc. |
void DzContentMgr::refreshCategories | ( | ) |
Triggers a refresh of the categories list.
void DzContentMgr::removeAllContentDirectories | ( | ) |
Removes all content directories.
void DzContentMgr::removeAllImportDirectories | ( | ) |
Removes all import directories from the list.
void DzContentMgr::removeAllPoserDirectories | ( | ) |
Removes all Poser import directories from the list.
Removes the given directory from the content directory list.
directory | The name of the content directory to remove. |
Removes an import directory from the list.
directory | The import directory to remove. |
Removes a Poser import directory from the list.
directory | The name of the directory to remove. |
categoryIndex | Index of the category | |
newName | New name for the category Renames the category to the given name |
void DzContentMgr::setCheckCompatibilityOn | ( | Boolean | useCheckCompatibility | ) |
Turns file compatibility testing on or off.
useCheckCompatibility | If true, turns on compatibility checking, if false, turns off compatibility checking. |
void DzContentMgr::setUseDatabaseSearch | ( | Boolean | useDatabaseSearch | ) |
Sets whether or not to use the database.
useDatabaseSearch | If true, turns database use on, if false, turns database use off. |
DzContentMgr::startupSceneChanged | ( | String | filename | ) | [signal] |
Signature: "startupSceneChanged(const QString&)"
Emitted when the startup scene file has changed
filename | The new startup scene file. |
categoryIndex | Index of the category | |
contentIndex | Index of the content Removes the content from the given category |
void DzContentMgr::updateCategoryType | ( | ) |
Triggers an update of the current category type.
bool DzContentMgr::usingCheckCompatibility | ( | ) |
bool DzContentMgr::usingDatabaseSearch | ( | ) |
This property determines whether or not the content manager automatically refreshes itself.
This property determines whether or not the built-in content is shown in the content pane.
This property holds the path of the scene that DAZ Studio will load on startup.