Uranium
Application Framework
UM.Qt.QtApplication.QtApplication Class Reference

Application subclass that provides a Qt application object. More...

Inheritance diagram for UM.Qt.QtApplication.QtApplication:
UM.Application.Application

Public Member Functions

def __init__
 
def addCommandLineOptions (self)
 
def initialize (self)
 
def startSplashWindowPhase (self)
 
def initializeEngine (self)
 
def recentFiles (self)
 
def addFileToRecentFiles
 
def run (self)
 
def hideMessage
 
def showMessage
 
def showToastMessage
 
def setMainQml
 
def exec_
 
def reloadQML (self)
 
def purgeWindows (self)
 
def isShuttingDown (self)
 
def registerObjects (self, engine)
 
def getRenderer (self)
 
def getMainWindow (self)
 
def setMainWindow
 
def setVisible
 
def isVisible (self)
 
def getTheme (self)
 
def functionEvent
 
def event
 
def windowClosed
 
def checkWindowMinimizedState (self)
 
def getBackend (self)
 
def backend (self)
 
def createSplash (self)
 
def showSplashMessage
 Display text on the splash screen. More...
 
def closeSplash (self)
 Close the splash screen after the application has started. More...
 
def createQmlComponent
 Create a QML component from a qml file. More...
 
def deleteAll (self, only_selectable=True)
 Delete all nodes containing mesh data in the scene. More...
 
def getMeshFileHandler (self)
 Get the MeshFileHandler of this application. More...
 
def getWorkspaceFileHandler (self)
 
def getPackageManager (self)
 
def getInstance (cls, args, kwargs)
 Gets the instance of this application. More...
 
- Public Member Functions inherited from UM.Application.Application
def __init__
 Init method. More...
 
def addCommandLineOptions (self)
 
def parseCliOptions (self)
 
def initialize (self)
 
def startSplashWindowPhase (self)
 
def startPostSplashWindowPhase (self)
 
def run (self)
 Run the main event loop. More...
 
def getContainerRegistry (self)
 
def getApplicationLockFilename (self)
 Get the lock filename.
 
def setGlobalContainerStack
 
def getGlobalContainerStack (self)
 
def hideMessage
 
def showMessage
 
def showToastMessage
 
def getVersion (self)
 Get the version of the application.
 
def getBuildType (self)
 Get the build type of the application.
 
def getIsDebugMode (self)
 
def getIsHeadLess (self)
 
def getUseExternalBackend (self)
 
def hideMessageById
 Hide message by ID (as provided by built-in id function)
 
def getVisibleMessages (self)
 Get list of all visible messages.
 
def getApplicationName (self)
 Get name of the application. More...
 
def getPreferences (self)
 Get the preferences. More...
 
def savePreferences (self)
 
def getApplicationLanguage (self)
 Get the currently used IETF language tag. More...
 
def getRequiredPlugins (self)
 Application has a list of plugins that it must have. More...
 
def setRequiredPlugins
 Set the plugins that the application must have in order to function. More...
 
def setBackend
 Set the backend of the application (the program that does the heavy lifting). More...
 
def getBackend (self)
 Get the backend of the application (the program that does the heavy lifting). More...
 
def getPluginRegistry (self)
 Get the PluginRegistry of this application. More...
 
def getController (self)
 Get the Controller of this application. More...
 
def getOperationStack (self)
 
def getOutputDeviceManager (self)
 
def getRenderer (self)
 Return an application-specific Renderer object. More...
 
def functionEvent
 Post a function event onto the event loop. More...
 
def callLater
 Call a function the next time the event loop runs. More...
 
def getMainThread (self)
 Get the application's main thread. More...
 
def addExtension
 
def getExtensions (self)
 
def getInstance (cls, args, kwargs)
 

Static Public Attributes

 pluginsLoaded = Signal()
 
 applicationRunning = Signal()
 
 recentFilesChanged = pyqtSignal()
 
 notify
 
 engineCreatedSignal = Signal()
 
 mainWindowChanged = Signal()
 
 result
 Get the backend of the application (the program that does the heavy lifting). More...
 
 constant
 Property used to expose the backend It is made static as the backend is not supposed to change during runtime. More...
 
 splash = None
 Create a class variable so we can manage the splash in the CrashHandler dialog when the Application instance is not yet created, e.g. More...
 
- Static Public Attributes inherited from UM.Application.Application
 applicationShuttingDown = Signal()
 Emitted when the application window was closed and we need to shut down the application.
 
 showMessageSignal = Signal()
 
 hideMessageSignal = Signal()
 
 globalContainerStackChanged = Signal()
 
 workspaceLoaded = Signal()
 
 visibleMessageAdded = Signal()
 
 visibleMessageRemoved = Signal()
 

Additional Inherited Members

- Static Public Member Functions inherited from UM.Application.Application
def 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

◆ closeSplash()

def UM.Qt.QtApplication.QtApplication.closeSplash (   self,
  None 
)

Close the splash screen after the application has started.

◆ createQmlComponent()

def UM.Qt.QtApplication.QtApplication.createQmlComponent (   self,
  qml_file_path 
)

Create a QML component from a qml file.

Parameters
qml_file_pathThe absolute file path to the root qml file.
context_propertiesOptional dictionary containing the properties that will be set on the context of the qml instance before creation.
Returns
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()

def UM.Qt.QtApplication.QtApplication.deleteAll (   self,
  only_selectable = True,
  None 
)

Delete all nodes containing mesh data in the scene.

Parameters
only_selectable.Set this to False to delete objects from all build plates

◆ getInstance()

def UM.Qt.QtApplication.QtApplication.getInstance (   cls,
  args,
  kwargs,
  QtApplication 
)

Gets the instance of this application.

This is just to further specify the type of Application.getInstance().

Returns
The instance of this application.

◆ getMeshFileHandler()

def UM.Qt.QtApplication.QtApplication.getMeshFileHandler (   self,
  MeshFileHandler 
)

Get the MeshFileHandler of this application.

◆ showSplashMessage()

def UM.Qt.QtApplication.QtApplication.showSplashMessage (   self,
  message 
)

Display text on the splash screen.

Member Data Documentation

◆ constant

UM.Qt.QtApplication.QtApplication.constant
static

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 Backend

◆ result

UM.Qt.QtApplication.QtApplication.result
static

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.

◆ splash

UM.Qt.QtApplication.QtApplication.splash = None
static

Create a class variable so we can manage the splash in the CrashHandler dialog when the Application instance is not yet created, e.g.

when an error occurs during the initialization


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