Uranium
Application Framework
|
Application subclass that provides a Qt application object. More...
Public Member Functions | |
def | __init__ (self, tray_icon_name=None, **kwargs) |
def | recentFiles (self) |
def | run (self) |
Run the main event loop. More... | |
def | hideMessage (self, message) |
def | showMessage (self, message) |
def | showToastMessage (self, str title, str message) |
def | setMainQml (self, path) |
def | initializeEngine (self) |
def | exec_ (self, *args, **kwargs) |
def | reloadQML (self) |
def | purgeWindows (self) |
def | isShuttingDown (self) |
def | registerObjects (self, engine) |
def | getRenderer (self) |
Return an application-specific Renderer object. More... | |
def | addCommandLineOptions (self, parser, parsed_command_line={}) |
Can be overridden to add additional command line options to the parser. More... | |
def | getMainWindow (self) |
def | getSplashScreen (self) |
def | setMainWindow (self, window) |
def | setVisible (self, visible) |
def | isVisible (self) |
def | getTheme (self) |
def | functionEvent (self, event) |
Post a function event onto the event loop. More... | |
def | event (self, event) |
def | windowClosed (self) |
def | checkWindowMinimizedState (self) |
def | getBackend (self) |
Get the backend of the application (the program that does the heavy lifting). More... | |
def | backend (self) |
def | loadQtTranslation (self, file_name, language="default") |
Load a Qt translation catalog. More... | |
def | createSplash (self) |
def | showSplashMessage (self, message) |
Display text on the splash screen. More... | |
def | closeSplash (self) |
Close the splash screen after the application has started. More... | |
Optional["QObject"] | createQmlComponent (self, str qml_file_path, Dict[str, "QObject"] context_properties=None) |
Create a QML component from a qml file. More... | |
def | preventComputerFromSleeping (self, prevent) |
![]() | |
def | __init__ (self, str name, str version, str build_type="", is_debug_mode=False, parser=None, parsed_command_line={}, **kwargs) |
Init method. More... | |
def | getContainerRegistry (self) |
def | setGlobalContainerStack (self, "ContainerStack" stack) |
Optional["ContainerStack"] | getGlobalContainerStack (self) |
def | isExitAllowed (self) |
str | getVersion (self) |
Get the version of the application. More... | |
def | getStaticVersion (cls) |
str | getBuildType (self) |
Get the buildtype of the application. More... | |
bool | getIsDebugMode (self) |
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) |
str | getApplicationName (self) |
Get name of the application. More... | |
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 (self, List[str] plugin_names) |
Set the plugins that the application must have in order to function. More... | |
def | setBackend (self, "Backend" backend) |
Set the backend of the application (the program that does the heavy lifting). More... | |
PluginRegistry | getPluginRegistry (self) |
Get the PluginRegistry of this application. More... | |
Controller | getController (self) |
Get the Controller of this application. More... | |
MeshFileHandler | getMeshFileHandler (self) |
Get the MeshFileHandler of this application. More... | |
WorkspaceFileHandler | getWorkspaceFileHandler (self) |
OperationStack | getOperationStack (self) |
OutputDeviceManager | getOutputDeviceManager (self) |
def | preRun (self) |
Includes eg. More... | |
def | callLater (self, Callable[[Any], Any] func, *args, **kwargs) |
Call a function the next time the event loop runs. More... | |
def | getMainThread (self) |
Get the application"s main thread. More... | |
"Application" | getInstance (cls, **kwargs) |
Return the singleton instance of the application object. | |
def | getCommandlineParser (self, with_help=False) |
def | parseCommandLine (self) |
def | addExtension (self, "Extension" extension) |
List["Extension"] | getExtensions (self) |
Public Attributes | |
assertID | |
![]() | |
default_theme | |
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... | |
![]() | |
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 | |
![]() | |
def | getInstallPrefix () |
Application subclass that provides a Qt application object.
def UM.Qt.QtApplication.QtApplication.addCommandLineOptions | ( | cls, | |
parser, | |||
parsed_command_line = {} |
|||
) |
Can be overridden to add additional command line options to the parser.
parser | argparse.ArgumentParser The parser that will parse the command line. |
Reimplemented from UM.Application.Application.
def UM.Qt.QtApplication.QtApplication.closeSplash | ( | self | ) |
Close the splash screen after the application has started.
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.
qml_file_path | The absolute file path to the root qml file. |
context_properties | Optional dictionary containing the properties that will be set on the context of the qml instance before creation. |
def UM.Qt.QtApplication.QtApplication.functionEvent | ( | self, | |
event | |||
) |
Post a function event onto the event loop.
This takes a CallFunctionEvent object and puts it into the actual event loop.
NotImplementedError |
Reimplemented from UM.Application.Application.
def UM.Qt.QtApplication.QtApplication.getBackend | ( | self | ) |
Get the backend of the application (the program that does the heavy lifting).
Reimplemented from UM.Application.Application.
def UM.Qt.QtApplication.QtApplication.getRenderer | ( | self | ) |
Return an application-specific Renderer object.
NotImplementedError |
Reimplemented from UM.Application.Application.
def UM.Qt.QtApplication.QtApplication.loadQtTranslation | ( | self, | |
file_name, | |||
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.
file_name | The 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. |
language | The 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. |
language
is default
, the language to load can be changed with the environment variable "LANGUAGE". def UM.Qt.QtApplication.QtApplication.preventComputerFromSleeping | ( | self, | |
prevent | |||
) |
Function used to prevent the computer from going into sleep mode. :param prevent: True = Prevent the system from going to sleep from this point on. :param prevent: False = No longer prevent the system from going to sleep.
def 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.
NotImplementedError |
Reimplemented from UM.Application.Application.
def UM.Qt.QtApplication.QtApplication.showSplashMessage | ( | self, | |
message | |||
) |
Display text on the splash screen.
|
static |
|
static |