Uranium
Application Framework
UM.Qt.QtApplication.QtApplication Class Reference
Inheritance diagram for UM.Qt.QtApplication.QtApplication:
UM.Application.Application

Public Member Functions

None __init__ (self, str tray_icon_name=None, **kwargs)
 
None addCommandLineOptions (self)
 
None initialize (self)
 
None startSplashWindowPhase (self)
 
None initializeEngine (self)
 
List[QUrl] recentFiles (self)
 
None addFileToRecentFiles (self, str file_name)
 
None run (self)
 
None hideMessage (self, Message message)
 
None showMessage (self, Message message)
 
None showToastMessage (self, str title, str message)
 
None setMainQml (self, str path)
 
None exec_ (self, *Any args, **Any kwargs)
 
None reloadQML (self)
 
None purgeWindows (self)
 
bool isShuttingDown (self)
 
None registerObjects (self, engine)
 
QtRenderer getRenderer (self)
 
Optional[MainWindowgetMainWindow (self)
 
None setMainWindow (self, MainWindow window)
 
None setVisible (self, bool visible)
 
bool isVisible (self)
 
Optional[Theme] getTheme (self)
 
None functionEvent (self, QEvent event)
 
bool event (self, QEvent event)
 
None windowClosed (self, bool save_data=True)
 
bool checkWindowMinimizedState (self)
 
Backend getBackend (self)
 
Backend backend (self)
 
None createSplash (self)
 
None showSplashMessage (self, str message)
 
None closeSplash (self)
 
Optional["QObject"] createQmlComponent (self, str qml_file_path, Dict[str, "QObject"] context_properties=None)
 
None deleteAll (self, only_selectable=True)
 
None resetWorkspace (self)
 
MeshFileHandler getMeshFileHandler (self)
 
WorkspaceFileHandler getWorkspaceFileHandler (self)
 
PackageManager getPackageManager (self)
 
"HttpRequestManager" getHttpRequestManager (self)
 
"QtApplication" getInstance (cls, *args, **kwargs)
 
str applicationDisplayName (self)
 
- Public Member Functions inherited from UM.Application.Application
None __init__ (self, str name, str version, str api_version, str app_display_name="", str build_type="", bool is_debug_mode=False, **kwargs)
 
"Version" getAPIVersion (self)
 
WorkspaceMetadataStorage getWorkspaceMetadataStorage (self)
 
None parseCliOptions (self)
 
None startPostSplashWindowPhase (self)
 
bool hasJustUpdatedFromOldVersion (self)
 
ContainerRegistry getContainerRegistry (self)
 
str getApplicationLockFilename (self)
 
None setGlobalContainerStack (self, Optional["ContainerStack"] stack)
 
Optional["ContainerStack"] getGlobalContainerStack (self)
 
str getVersion (self)
 
str getBuildType (self)
 
bool getIsDebugMode (self)
 
bool getIsHeadLess (self)
 
bool getUseExternalBackend (self)
 
None hideMessageById (self, int message_id)
 
List[MessagegetVisibleMessages (self)
 
str getApplicationName (self)
 
str getApplicationDisplayName (self)
 
Preferences getPreferences (self)
 
None savePreferences (self)
 
str getApplicationLanguage (self)
 
List[str] getRequiredPlugins (self)
 
None setRequiredPlugins (self, List[str] plugin_names)
 
None setBackend (self, "Backend" backend)
 
PluginRegistry getPluginRegistry (self)
 
Controller getController (self)
 
OperationStack getOperationStack (self)
 
OutputDeviceManager getOutputDeviceManager (self)
 
None functionEvent (self, CallFunctionEvent event)
 
None callLater (self, Callable[..., Any] func, *args, **kwargs)
 
threading.Thread getMainThread (self)
 
None addExtension (self, "Extension" extension)
 
List["Extension"] getExtensions (self)
 

Static Public Attributes

 pluginsLoaded = Signal()
 
 applicationRunning = Signal()
 
 recentFilesChanged = pyqtSignal()
 
 notify
 
 engineCreatedSignal = Signal()
 
 mainWindowChanged = Signal()
 
 result
 
 constant
 
 splash = None
 
 str
 
- Static Public Attributes inherited from UM.Application.Application
 applicationShuttingDown = Signal()
 
 showMessageSignal = Signal()
 
 hideMessageSignal = Signal()
 
 globalContainerStackChanged = Signal()
 
 workspaceLoaded = Signal()
 
 visibleMessageAdded = Signal()
 
 visibleMessageRemoved = Signal()
 

Additional Inherited Members

- Static Public Member Functions inherited from UM.Application.Application
str getAppFolderPrefix ()
 
str getInstallPrefix ()
 
- Public Attributes inherited from UM.Application.Application
 default_theme
 
 change_log_url
 

Detailed Description

Application subclass that provides a Qt application object.

Member Function Documentation

◆ backend()

Backend UM.Qt.QtApplication.QtApplication.backend (   self)
Property used to expose the backend

It is made static as the backend is not supposed to change during runtime.
This makes the connection between backend and QML more reliable than the pyqtSlot above.
:returns: Backend :type{Backend}

◆ closeSplash()

None UM.Qt.QtApplication.QtApplication.closeSplash (   self)
Close the splash screen after the application has started.

◆ createQmlComponent()

Optional["QObject"] UM.Qt.QtApplication.QtApplication.createQmlComponent (   self,
str  qml_file_path,
Dict[str, "QObject"]   context_properties = None 
)
Create a QML component from a qml file.
:param qml_file_path:: The absolute file path to the root qml file.
:param context_properties:: Optional dictionary containing the properties that will be set on the context of the
qml instance before creation.
:return: None in case the creation failed (qml error), else it returns the qml instance.
:note If the creation fails, this function will ensure any errors are logged to the logging service.

◆ deleteAll()

None UM.Qt.QtApplication.QtApplication.deleteAll (   self,
  only_selectable = True 
)
Delete all nodes containing mesh data in the scene.
:param only_selectable:. Set this to False to delete objects from all build plates

◆ getBackend()

Backend UM.Qt.QtApplication.QtApplication.getBackend (   self)
Get the backend of the application (the program that does the heavy lifting).

The backend is also a QObject, which can be used from qml.

Reimplemented from UM.Application.Application.

◆ getInstance()

"QtApplication" UM.Qt.QtApplication.QtApplication.getInstance (   cls,
args,
**  kwargs 
)
Gets the instance of this application.

This is just to further specify the type of Application.getInstance().
:return: The instance of this application.

Reimplemented from UM.Application.Application.

◆ getMeshFileHandler()

MeshFileHandler UM.Qt.QtApplication.QtApplication.getMeshFileHandler (   self)
Get the MeshFileHandler of this application.

◆ getRenderer()

QtRenderer UM.Qt.QtApplication.QtApplication.getRenderer (   self)
Return an application-specific Renderer object.
:exception NotImplementedError

Reimplemented from UM.Application.Application.

◆ run()

None UM.Qt.QtApplication.QtApplication.run (   self)
Run the main event loop.
This method should be re-implemented by subclasses to start the main event loop.
:exception NotImplementedError:

Reimplemented from UM.Application.Application.

◆ showSplashMessage()

None UM.Qt.QtApplication.QtApplication.showSplashMessage (   self,
str  message 
)
Display text on the splash screen.

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