Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self, "QtApplication" application, str writer_type="unknown_file_writer", str reader_type="unknown_file_reader", QObject parent=None) |
List[str] | supportedReadFileTypes (self) |
List[str] | supportedWriteFileTypes (self) |
None | readLocalFile (self, QUrl file, bool add_to_recent_files_hint=True) |
List[Dict[str, Union[str, int]]] | getSupportedFileTypesWrite (self) |
Dict[str, str] | getSupportedFileTypesRead (self) |
None | addReader (self, "FileReader" reader) |
None | addWriter (self, "FileWriter" writer) |
def | readerRead (self, reader, str file_name, **Any kwargs) |
Optional["FileWriter"] | getWriterByMimeType (self, str mime) |
Optional["FileWriter"] | getWriter (self, str writer_id) |
Optional["FileReader"] | getReaderForFile (self, str file_name) |
"FileHandler" | getInstance (cls, *args, **kwargs) |
Protected Member Functions | |
None | _readLocalFile (self, QUrl file, bool add_to_recent_files_hint=True) |
Protected Attributes | |
_application | |
_readers | |
_writers | |
_writer_type | |
_reader_type | |
_add_to_recent_files_hints | |
Central class for reading and writing meshes. This class is created by Application and handles reading and writing mesh files.
Optional["FileReader"] UM.FileHandler.FileHandler.FileHandler.getReaderForFile | ( | self, | |
str | file_name | ||
) |
Find a Reader that accepts the given file name. :param file_name: The name of file to load. :returns: Reader that accepts the given file name. If no acceptable Reader is found None is returned.
List[Dict[str, Union[str, int]]] UM.FileHandler.FileHandler.FileHandler.getSupportedFileTypesWrite | ( | self | ) |
Get list of all supported filetypes for writing. :return: List of dicts containing id, extension, description and mime_type for all supported file types.
Optional["FileWriter"] UM.FileHandler.FileHandler.FileHandler.getWriter | ( | self, | |
str | writer_id | ||
) |
Get an instance of a mesh writer by ID
Optional["FileWriter"] UM.FileHandler.FileHandler.FileHandler.getWriterByMimeType | ( | self, | |
str | mime | ||
) |
Get a mesh writer object that supports writing the specified mime type :param mime: The mime type that should be supported. :return: A FileWriter instance or None if no mesh writer supports the specified mime type. If there are multiple writers that support the specified mime type, the first entry is returned.
def UM.FileHandler.FileHandler.FileHandler.readerRead | ( | self, | |
reader, | |||
str | file_name, | ||
**Any | kwargs | ||
) |
Reimplemented in UM.Mesh.MeshFileHandler.MeshFileHandler.