Uranium
Application Framework
|
Central object responsible for running the main event loop and creating other central objects. More...
Public Member Functions | |
None | __init__ (self, str name, str version, str api_version, str app_display_name="", str build_type="", bool is_debug_mode=False, **kwargs) |
Init method. More... | |
"Version" | getAPIVersion (self) |
None | addCommandLineOptions (self) |
None | parseCliOptions (self) |
None | initialize (self) |
None | startSplashWindowPhase (self) |
None | startPostSplashWindowPhase (self) |
bool | hasJustUpdatedFromOldVersion (self) |
def | run (self) |
Run the main event loop. More... | |
def | getContainerRegistry (self) |
str | getApplicationLockFilename (self) |
Get the lock filename. | |
None | setGlobalContainerStack (self, "ContainerStack" stack) |
Optional["ContainerStack"] | getGlobalContainerStack (self) |
None | hideMessage (self, Message message) |
None | showMessage (self, Message message) |
None | showToastMessage (self, str title, str message) |
str | getVersion (self) |
Get the version of the application. | |
str | getBuildType (self) |
Get the build type of the application. | |
bool | getIsDebugMode (self) |
bool | getIsHeadLess (self) |
bool | getUseExternalBackend (self) |
None | hideMessageById (self, int message_id) |
Hide message by ID (as provided by built-in id function) | |
List[Message] | getVisibleMessages (self) |
Get list of all visible messages. | |
str | getApplicationName (self) |
Get name of the application. More... | |
str | getApplicationDisplayName (self) |
Preferences | getPreferences (self) |
Get the preferences. More... | |
None | savePreferences (self) |
str | getApplicationLanguage (self) |
Get the currently used IETF language tag. More... | |
List[str] | getRequiredPlugins (self) |
Application has a list of plugins that it must have. More... | |
None | setRequiredPlugins (self, List[str] plugin_names) |
Set the plugins that the application must have in order to function. More... | |
None | setBackend (self, "Backend" backend) |
Set the backend of the application (the program that does the heavy lifting). | |
"Backend" | getBackend (self) |
Get 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... | |
OperationStack | getOperationStack (self) |
OutputDeviceManager | getOutputDeviceManager (self) |
Renderer | getRenderer (self) |
Return an application-specific Renderer object. More... | |
None | functionEvent (self, CallFunctionEvent event) |
Post a function event onto the event loop. More... | |
None | callLater (self, Callable[..., Any] func, *args, **kwargs) |
Call a function the next time the event loop runs. More... | |
threading.Thread | getMainThread (self) |
Get the application's main thread. | |
None | addExtension (self, "Extension" extension) |
List["Extension"] | getExtensions (self) |
"Application" | getInstance (cls, *args, **kwargs) |
Static Public Member Functions | |
str | getInstallPrefix () |
Public Attributes | |
default_theme | |
change_log_url | |
Static Public Attributes | |
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() | |
Central object responsible for running the main event loop and creating other central objects.
The Application object is a central object for accessing other important objects. It is also responsible for starting the main event loop. It is passed on to plugins so it can be easily used to access objects required for those plugins.
None UM.Application.Application.__init__ | ( | self, | |
str | name, | ||
str | version, | ||
str | api_version, | ||
str | app_display_name = "" , |
||
str | build_type = "" , |
||
bool | is_debug_mode = False , |
||
** | kwargs | ||
) |
Init method.
name | string The name of the application. |
version | string Version, formatted as major.minor.rev |
build_type | Additional version info on the type of build this is, such as "master". |
is_debug_mode | Whether to run in debug mode. |
None UM.Application.Application.callLater | ( | self, | |
Callable[..., Any] | func, | ||
* | args, | ||
** | kwargs | ||
) |
Call a function the next time the event loop runs.
You can't get the result of this function directly. It won't block.
function | The function to call. |
args | The positional arguments to pass to the function. |
kwargs | The keyword arguments to pass to the function. |
None UM.Application.Application.functionEvent | ( | self, | |
CallFunctionEvent | event | ||
) |
Post a function event onto the event loop.
This takes a CallFunctionEvent object and puts it into the actual event loop.
NotImplementedError |
str UM.Application.Application.getApplicationLanguage | ( | self | ) |
Get the currently used IETF language tag.
The returned tag is during runtime used to translate strings.
str UM.Application.Application.getApplicationName | ( | self | ) |
Get name of the application.
"Backend" UM.Application.Application.getBackend | ( | self | ) |
Get the backend of the application (the program that does the heavy lifting).
Reimplemented in UM.Qt.QtApplication.QtApplication.
Controller UM.Application.Application.getController | ( | self | ) |
Get the Controller of this application.
PluginRegistry UM.Application.Application.getPluginRegistry | ( | self | ) |
Get the PluginRegistry of this application.
Preferences UM.Application.Application.getPreferences | ( | self | ) |
Get the preferences.
Renderer UM.Application.Application.getRenderer | ( | self | ) |
Return an application-specific Renderer object.
NotImplementedError |
Reimplemented in UM.Qt.QtApplication.QtApplication.
List[str] UM.Application.Application.getRequiredPlugins | ( | self | ) |
Application has a list of plugins that it must have.
If it does not have these, it cannot function. These plugins can not be disabled in any way.
def UM.Application.Application.run | ( | self | ) |
Run the main event loop.
This method should be re-implemented by subclasses to start the main event loop.
NotImplementedError |
Reimplemented in UM.Qt.QtApplication.QtApplication.
None UM.Application.Application.setRequiredPlugins | ( | self, | |
List[str] | plugin_names | ||
) |
Set the plugins that the application must have in order to function.
plugin_names | list List of strings with the names of the required plugins |