Inheritance diagram for DzImportMgr:
Methods | |
Boolean | canImport (String filename) |
DzImporter | findImporter (String filename) |
DzImporter | findImporterByClassName (String className) |
Number | findImporterIndex (String filename) |
String | getImportFileName () |
String | getImportPath () const |
Number | getNumImporters () |
void | makeGeometryFileFilter (DzFileFilter filter, String defaultFilter="", Boolean makeAllFilesEntry=true) |
void | makeImportFileFilter (DzFileFilter filter, String defaultFilter="", Boolean makeAllFilesEntry=true) |
DzError | readFile (String filename, Number importerIdx, DzFileIOSettings options) |
DzError | readFile (String filename, Number importerIdx=-1) |
DzShape | readGeometry (String filename, Number importerIdx, DzFileIOSettings options) |
DzShape | readGeometry (String filename, Number importerIdx=-1) |
void | setImportFileName (String fileName) |
void | setImportPath (String path) |
Signals | |
void | fileImported () |
Signature: "fileImported()" | |
void | fileImportStarting () |
Signature: "fileImportStarting()" |
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::getImportMgr().
Calls recognize() on each of the importers and attempts to match an importer with the filename.
filename | The name of the file to try to find an importer for. |
void DzImportMgr::fileImported | ( | ) | [signal] |
Signature: "fileImported()"
Emitted after importing a file. This may not always be emitted after every fileImportStarting() signal if there were errors during file loading.
void DzImportMgr::fileImportStarting | ( | ) | [signal] |
Signature: "fileImportStarting()"
Emitted just before importing a file.
DzImporter DzImportMgr::findImporter | ( | String | filename | ) |
Calls recognize() on each of the importers and attempts to match an importer with the filename.
filename | The name of the file to try to find an importer for. |
DzImporter DzImportMgr::findImporterByClassName | ( | String | className | ) |
Attempts to locate an importer class type by name.
className | The class name of the importer to find. |
Calls recognize() on each of the importers and attempts to match an importer with the filename.
filename | The name of the file to try to find an importer for. |
String DzImportMgr::getImportFileName | ( | ) |
Gets the full import file name.
QString DzImportMgr::getImportPath | ( | ) | const |
Gets the default import directory - this is typically the last directory that the user imported a file from, and will be the directory that user will be taken to next time the file import dialog is displayed.
int DzImportMgr::getNumImporters | ( | ) |
void DzImportMgr::makeGeometryFileFilter | ( | DzFileFilter | filter, | |
String | defaultFilter = "" , |
|||
Boolean | makeAllFilesEntry = true | |||
) |
Populates the given filter with all the geometry types recognized by the import manager.
filter | The filter to populate | |
defaultFilter | The filter to set as the default | |
makeAllFilesEntry | If true, an extra filter is appended to the list that matches all the valid extensions. |
void DzImportMgr::makeImportFileFilter | ( | DzFileFilter | filter, | |
String | defaultFilter = "" , |
|||
Boolean | makeAllFilesEntry = true | |||
) |
Populates the given filter with all the types recognized by the import manager.
filter | The filter to populate | |
defaultFilter | The filter to set as the default | |
makeAllFilesEntry | If true, an extra filter is appended to the list that matches all the valid extensions. |
DzError DzImportMgr::readFile | ( | String | filename, | |
Number | importerIdx, | |||
DzFileIOSettings | options | |||
) |
Import the contents of a file into the scene.
filename | The name of the file to import. This must be the full filename including the path to the file. | |
importerIdx | The index of the importer class to use. If this is less than 0, then the recognize function of the importer classes will be called with the fileName to attempt to find an appropiate importer. |
Import the contents of a file into the scene.
filename | The name of the file to import. This must be the full filename including the path to the file. | |
importerIdx | The index of the importer class to use. If this is less than 0, then the recognize function of the importer classes will be called with the fileName to attempt to find an appropiate importer. |
DzShape DzImportMgr::readGeometry | ( | String | filename, | |
Number | importerIdx, | |||
DzFileIOSettings | options | |||
) |
Reads the geometry file into a new shape.
filename | The full path of the file to import. | |
importerIdx | The index of the importer to use, if invalid (<0) the file's extension will be used to select an appropriate importer. |
Reads the geometry file into a new shape.
filename | The full path of the file to import. | |
importerIdx | The index of the importer to use, if invalid (<0) the file's extension will be used to select an appropriate importer. |
void DzImportMgr::setImportFileName | ( | String | fileName | ) |
Sets the import file name - this is the full file name that file was import
path | The full file name . |
void DzImportMgr::setImportPath | ( | String | path | ) |
Sets the default import directory - this is the directory that user will be taken to next time the file import dialog is displayed.
path | The new default import directory. |