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__ (self, kwargs)
 
def recentFiles (self)
 
def run (self)
 
def hideMessage (self, message)
 
def showMessage (self, message)
 
def setMainQml (self, path)
 
def initializeEngine (self)
 
def isShuttingDown (self)
 
def registerObjects (self, engine)
 
def getRenderer (self)
 
def addCommandLineOptions (self, parser)
 
def getMainWindow (self)
 
def setMainWindow (self, window)
 
def getTheme (self, args)
 
def functionEvent (self, event)
 
def event (self, event)
 
def windowClosed (self)
 
def getBackend (self)
 
def loadQtTranslation (self, file, language="default")
 Load a Qt translation catalog. More...
 
def showSplashMessage (self, message)
 Display text on the splash screen. More...
 
def closeSplash (self)
 Close the splash screen after the application has started. More...
 
- Public Member Functions inherited from UM.Application.Application
def __init__
 Init method. More...
 
def getContainerRegistry (self)
 
def setGlobalContainerStack
 
def getGlobalContainerStack (self)
 
def hideMessage (self, message)
 
def showMessage (self, message)
 
def getVersion (self)
 Get the version of the application. More...
 
def getStaticVersion (cls)
 
def getBuildType (self)
 Get the buildtype of the application. More...
 
def hideMessageById (self, message_id)
 Hide message by ID (as provided by built-in id function) More...
 
def getVisibleMessages (self)
 Get list of all visible messages. More...
 
def getCommandLineOption (self, name, default=None)
 
def getApplicationName (self)
 Get name of the application. More...
 
def getApplicationLanguage (self)
 
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 getMeshFileHandler (self)
 Get the MeshFileHandler of this application. More...
 
def getWorkspaceFileHandler (self)
 
def getOperationStack (self)
 
def getOutputDeviceManager (self)
 
def run (self)
 Run the main event loop. More...
 
def getRenderer (self)
 Return an application-specific Renderer object. More...
 
def functionEvent (self, event)
 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 getInstance (cls)
 Return the singleton instance of the application object.
 
def parseCommandLine (self)
 
def addCommandLineOptions (cls, parser)
 Can be overridden to add additional command line options to the parser. More...
 
def addExtension
 
def getExtensions (self)
 

Static Public Attributes

 recentFilesChanged = pyqtSignal()
 
 notify
 
 engineCreatedSignal = Signal()
 
 mainWindowChanged = Signal()
 
 result
 Get the backend of the application (the program that does the heavy lifting). 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()
 
 visibleMessageAdded = Signal()
 
 visibleMessageRemoved = Signal()
 

Additional Inherited Members

- Static Public Member Functions inherited from UM.Application.Application
def getInstallPrefix ()
 

Detailed Description

Application subclass that provides a Qt application object.

Member Function Documentation

◆ closeSplash()

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

Close the splash screen after the application has started.

◆ loadQtTranslation()

def UM.Qt.QtApplication.QtApplication.loadQtTranslation (   self,
  file,
  language = "default" 
)

Load a Qt translation catalog.

This method will locate, load and install a Qt message catalog that can be used by Qt's translation system, like qsTr() in QML files.

Parameters
fileThe file name to load, without extension. It will be searched for in the i18nLocation Resources directory. If it can not be found a warning will be logged but no error will be thrown.
languageThe language to load translations for. This can be any valid language code or 'default' in which case the language is looked up based on system locale. If the specified language can not be found, this method will fall back to loading the english translations file.
Note
When language is default, the language to load can be changed with the environment variable "LANGUAGE".

◆ showSplashMessage()

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

Display text on the splash screen.

Member Data Documentation

◆ 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.

Returns
Backend Backend

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