Uranium
Application Framework
UM.FileHandler.FileHandler.FileHandler Class Reference
Inheritance diagram for UM.FileHandler.FileHandler.FileHandler:
UM.Mesh.MeshFileHandler.MeshFileHandler UM.Workspace.WorkspaceFileHandler.WorkspaceFileHandler

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)
 
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)
 

Detailed Description

Central class for reading and writing meshes.
This class is created by Application and handles reading and writing mesh files.

Member Function Documentation

◆ getReaderForFile()

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.

◆ getSupportedFileTypesWrite()

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.

◆ getWriter()

Optional["FileWriter"] UM.FileHandler.FileHandler.FileHandler.getWriter (   self,
str  writer_id 
)
Get an instance of a mesh writer by ID

◆ getWriterByMimeType()

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.

The documentation for this class was generated from the following file: