4.24. umbra.engine

engine.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines various classes, methods and definitions to run, maintain and exit the Application.
The main Application object is the Umbra class.

Others:

4.24.1. Module Attributes

umbra.engine.LOGGER
umbra.engine.SESSION_HEADER_TEXT

4.24.2. Functions

umbra.engine.showProcessing(message=u'')[source]

Shows processing behavior.

Parameters:message (unicode) – Operation description.
Returns:Object.
Return type:object
umbra.engine.encapsulateProcessing(object)[source]

Encapsulates a processing operation.

Parameters:object (object) – Object to decorate.
Returns:Object.
Return type:object
umbra.engine.setUserApplicationDataDirectory(directory)[source]

Sets the user Application data directory.

Parameters:directory (unicode) – Starting point for the directories tree creation.
Returns:Definition success.
Return type:bool
umbra.engine.getCommandLineParametersParser()[source]

Returns the command line parameters parser.

Returns:Parser.
Return type:Parser
umbra.engine.getLoggingFile(maximumLoggingFiles=10, retries=18)[source]

Returns the logging file path.

Parameters:
  • maximumLoggingFiles (int) – Maximum allowed logging files in the logging directory.
  • retries (int) – Number of retries to generate a unique logging file name.
Returns:

Logging file path.

Return type:

unicode

umbra.engine.run(engine, parameters, componentsPaths=None, requisiteComponents=None, visibleComponents=None)[source]

Starts the Application.

Parameters:
  • engine (QObject) – Engine.
  • parameters (tuple) – Command line parameters.
  • componentsPaths (tuple or list) – Components componentsPaths.
  • requisiteComponents (tuple or list) – Requisite components names.
  • visibleComponents (tuple or list) – Visible components names.
Returns:

Definition success.

Return type:

bool

umbra.engine.exit(exitCode=0)[source]

Exits the Application.

Parameters:exitCode (int) – Exit code.

4.24.3. Classes

class umbra.engine.Umbra(parent=None, *args, **kwargs)[source]

Bases: foundations.ui.common.QWidget

Defines the main class of the Umbra package.

Initializes the class.

Parameters:
  • parent (QWidget) – QWidget parent.
  • *args (*) – Arguments.
  • **kwargs (**) – Keywords arguments.
verbosityLevelChanged

This signal is emited by the Umbra class when the current verbosity level has changed. ( pyqtSignal )

Returns:Current verbosity level.
Return type:int
contentDropped

This signal is emited by the Umbra class when it receives dropped content. ( pyqtSignal )

Returns:Event.
Return type:QEvent
sizeChanged

This signal is emited by the Umbra class when its size changes. ( pyqtSignal )

Returns:Event.
Return type:QEvent
timer[source]

Property for self.__timer attribute.

Returns:self.__timer.
Return type:QTimer
requestsStack[source]

Property for self.__requestsStack attribute.

Returns:self.__requestsStack. ( collections.deque )
componentsPaths[source]

Property for self.__componentsPaths attribute.

Returns:self.__componentsPaths.
Return type:tuple or list
requisiteComponents[source]

Property for self.__requisiteComponents attribute.

Returns:self.__requisiteComponents.
Return type:tuple or list
visibleComponents[source]

Property for self.__visibleComponents attribute.

Returns:self.__visibleComponents.
Return type:tuple or list
splashscreen[source]

Property for self.__splashscreen attribute.

Returns:self.__splashscreen.
Return type:Delayed_QSplashScreen
patchesManager[source]

Property for self.__patchesManager attribute.

Returns:self.__patchesManager.
Return type:PatchesManager
componentsManager[source]

Property for self.__componentsManager attribute.

Returns:self.__componentsManager.
Return type:ComponentsManager
notificationsManager[source]

Property for self.__notificationsManager attribute.

Returns:self.__notificationsManager.
Return type:NotificationsManager
actionsManager[source]

Property for self.__actionsManager attribute.

Returns:self.__actionsManager.
Return type:ActionsManager
fileSystemEventsManager[source]

Property for self.__fileSystemEventsManager attribute.

Returns:self.__fileSystemEventsManager.
Return type:FileSystemEventsManager
layoutsManager[source]

Property for self.__layoutsManager attribute.

Returns:self.__layoutsManager.
Return type:LayoutsManager
userApplicationDataDirectory[source]

Property for self.__userApplicationDataDirectory attribute.

Returns:self.__userApplicationDataDirectory.
Return type:unicode
loggingSessionHandler[source]

Property for self.__loggingSessionHandler attribute.

Returns:self.__loggingSessionHandler.
Return type:Handler
loggingFileHandler[source]

Property for self.__loggingFileHandler attribute.

Returns:self.__loggingFileHandler.
Return type:Handler
loggingConsoleHandler[source]

Property for self.__loggingConsoleHandler attribute.

Returns:self.__loggingConsoleHandler.
Return type:Handler
loggingSessionHandlerStream[source]

Property for self.__loggingSessionHandlerStream attribute.

Returns:self.__loggingSessionHandlerStream.
Return type:StreamObject
loggingActiveFormatter[source]

Property for self.__loggingActiveFormatter attribute.

Returns:self.__loggingActiveFormatter.
Return type:Formatter
verbosityLevel[source]

Property for self.__verbosityLevel attribute.

Returns:self.__verbosityLevel.
Return type:int
settings[source]

Property for self.__settings attribute.

Returns:self.__settings.
Return type:Preferences
parameters[source]

Property for self.__parameters attribute.

Returns:self.__parameters.
Return type:object
arguments[source]

Property for self.__arguments attribute.

Returns:self.__arguments.
Return type:list
workerThreads[source]

Property for self.__workerThreads attribute.

Returns:self.__workerThreads.
Return type:list
isProcessing[source]

Property for self.__isProcessing attribute.

Returns:self.__isProcessing.
Return type:bool
locals[source]

Property for self.__locals attribute.

Returns:self.__locals.
Return type:dict
dragEnterEvent(event)[source]

Reimplements the QWidget.dragEnterEvent() method.

Parameters:event (QEvent) – QEvent.
dragMoveEvent(event)[source]

Reimplements the QWidget.dragMoveEvent() method.

Parameters:event (QEvent) – QEvent.
dropEvent(event)[source]

Reimplements the QWidget.dropEvent() method.

Parameters:event (QEvent) – QEvent.
show()[source]

Reimplements the QWidget.show() method.

closeEvent(event)[source]

Reimplements the QWidget.closeEvent() method.

Parameters:event (QEvent) – QEvent.
resizeEvent(event)[source]

Reimplements the QWidget.resizeEvent() method.

Parameters:event (QEvent) – QEvent.
setVerbosityLevel(verbosityLevel)[source]

Sets the Application verbosity level.

Parameters:verbosityLevel (int) – Verbosity level.
Returns:Method success.
Return type:bool
Note:The expected verbosity level value is an integer between 0 to 4.
setVisualStyle(fullScreenStyle=False)[source]

Sets the Application visual style.

Parameters:fullScreenStyle (bool) – Use fullscreen stylesheet file.
Returns:Method success.
Return type:bool
isFullScreen()[source]

Returns if Application is in fullscreen state.

Returns:FullScreen state.
Return type:bool
toggleFullScreen(*args)[source]

Toggles Application fullscreen state.

Parameters:*args (*) – Arguments.
Returns:Method success.
Return type:bool
processEvents(flags=0)[source]

Process Application events.

Parameters:flags (int) – Events flags.
Returns:Method success.
Return type:bool
setProcessingMessage(message, warning=True)[source]

Sets the processing operation message.

Parameters:
  • message (unicode) – Operation description.
  • warning (int) – Emit warning message.
Returns:

Method success.

Return type:

bool

startProcessing(message, steps=0, warning=True)[source]

Registers the start of a processing operation.

Parameters:
  • message (unicode) – Operation description.
  • steps (int) – Operation steps.
  • warning (int) – Emit warning message.
Returns:

Method success.

Return type:

bool

stepProcessing(warning=True)[source]

Steps the processing operation progress indicator.

Parameters:warning (int) – Emit warning message.
Returns:Method success.
Return type:bool
stopProcessing(warning=True)[source]

Registers the end of a processing operation.

Parameters:warning (int) – Emit warning message.
Returns:Method success.
Return type:bool
garbageCollect()[source]

Triggers the garbage collecting.

Returns:Number of unreachable objects found.
Return type:int
quit(exitCode=0, event=None)[source]

Quits the Application.

Parameters:
  • exitCode (int) – Exit code.
  • event (QEvent) – QEvent.