4.24. umbra.engine — Umbra 1.0.9 documentation

# 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`

`umbra.engine.` `SESSION_FOOTER_TEXT`

## 4.24.2. Functions

`umbra.engine.` `showProcessing`(message=u'')

  Shows processing behavior.

  Parameters: | message (unicode) – Operation description.
  Returns: | Object.
  Return type: | object

`umbra.engine.` `encapsulateProcessing`(object)

  Encapsulates a processing operation.

  Parameters: | object (object) – Object to decorate.
  Returns: | Object.
  Return type: | object

`umbra.engine.` `setUserApplicationDataDirectory`(directory)

  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`()

  Returns the command line parameters parser.

  Returns: | Parser.
  Return type: | Parser

`umbra.engine.` `getLoggingFile`(maximumLoggingFiles=10, retries=18)

  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)

  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)

  Exits the Application.

  Parameters: | exitCode (int) – Exit code.

## 4.24.3. Classes

class `umbra.engine.` `Umbra`(parent=None, *args, **kwargs)

  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`

    Property for self.__timer attribute.

    Returns: | self.__timer.
    Return type: | QTimer

  `requestsStack`

    Property for self.__requestsStack attribute.

    Returns: | self.__requestsStack. ( collections.deque )

  `componentsPaths`

    Property for self.__componentsPaths attribute.

    Returns: | self.__componentsPaths.
    Return type: | tuple or list

  `requisiteComponents`

    Property for self.__requisiteComponents attribute.

    Returns: | self.__requisiteComponents.
    Return type: | tuple or list

  `visibleComponents`

    Property for self.__visibleComponents attribute.

    Returns: | self.__visibleComponents.
    Return type: | tuple or list

  `splashscreen`

    Property for self.__splashscreen attribute.

    Returns: | self.__splashscreen.
    Return type: | Delayed_QSplashScreen

  `patchesManager`

    Property for self.__patchesManager attribute.

    Returns: | self.__patchesManager.
    Return type: | PatchesManager

  `componentsManager`

    Property for self.__componentsManager attribute.

    Returns: | self.__componentsManager.
    Return type: | ComponentsManager

  `notificationsManager`

    Property for self.__notificationsManager attribute.

    Returns: | self.__notificationsManager.
    Return type: | NotificationsManager

  `actionsManager`

    Property for self.__actionsManager attribute.

    Returns: | self.__actionsManager.
    Return type: | ActionsManager

  `fileSystemEventsManager`

    Property for self.__fileSystemEventsManager attribute.

    Returns: | self.__fileSystemEventsManager.
    Return type: | FileSystemEventsManager

  `layoutsManager`

    Property for self.__layoutsManager attribute.

    Returns: | self.__layoutsManager.
    Return type: | LayoutsManager

  `userApplicationDataDirectory`

    Property for self.__userApplicationDataDirectory attribute.

    Returns: | self.__userApplicationDataDirectory.
    Return type: | unicode

  `loggingSessionHandler`

    Property for self.__loggingSessionHandler attribute.

    Returns: | self.__loggingSessionHandler.
    Return type: | Handler

  `loggingFileHandler`

    Property for self.__loggingFileHandler attribute.

    Returns: | self.__loggingFileHandler.
    Return type: | Handler

  `loggingConsoleHandler`

    Property for self.__loggingConsoleHandler attribute.

    Returns: | self.__loggingConsoleHandler.
    Return type: | Handler

  `loggingSessionHandlerStream`

    Property for self.__loggingSessionHandlerStream attribute.

    Returns: | self.__loggingSessionHandlerStream.
    Return type: | StreamObject

  `loggingActiveFormatter`

    Property for self.__loggingActiveFormatter attribute.

    Returns: | self.__loggingActiveFormatter.
    Return type: | Formatter

  `verbosityLevel`

    Property for self.__verbosityLevel attribute.

    Returns: | self.__verbosityLevel.
    Return type: | int

  `settings`

    Property for self.__settings attribute.

    Returns: | self.__settings.
    Return type: | Preferences

  `parameters`

    Property for self.__parameters attribute.

    Returns: | self.__parameters.
    Return type: | object

  `arguments`

    Property for self.__arguments attribute.

    Returns: | self.__arguments.
    Return type: | list

  `workerThreads`

    Property for self.__workerThreads attribute.

    Returns: | self.__workerThreads.
    Return type: | list

  `isProcessing`

    Property for self.__isProcessing attribute.

    Returns: | self.__isProcessing.
    Return type: | bool

  `locals`

    Property for self.__locals attribute.

    Returns: | self.__locals.
    Return type: | dict

  `dragEnterEvent`(event)

    Reimplements the `QWidget.dragEnterEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `dragMoveEvent`(event)

    Reimplements the `QWidget.dragMoveEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `dropEvent`(event)

    Reimplements the `QWidget.dropEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `show`()

    Reimplements the `QWidget.show()` method.

  `closeEvent`(event)

    Reimplements the `QWidget.closeEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `resizeEvent`(event)

    Reimplements the `QWidget.resizeEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `setVerbosityLevel`(verbosityLevel)

    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)

    Sets the Application visual style.

    Parameters: | fullScreenStyle (bool) – Use fullscreen stylesheet file.
    Returns: | Method success.
    Return type: | bool

  `isFullScreen`()

    Returns if Application is in fullscreen state.

    Returns: | FullScreen state.
    Return type: | bool

  `toggleFullScreen`(*args)

    Toggles Application fullscreen state.

    Parameters: | *args (*) – Arguments.
    Returns: | Method success.
    Return type: | bool

  `processEvents`(flags=0)

    Process Application events.

    Parameters: | flags (int) – Events flags.
    Returns: | Method success.
    Return type: | bool

  `setProcessingMessage`(message, warning=True)

    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)

    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)

    Steps the processing operation progress indicator.

    Parameters: | warning (int) – Emit warning message.
    Returns: | Method success.
    Return type: | bool

  `stopProcessing`(warning=True)

    Registers the end of a processing operation.

    Parameters: | warning (int) – Emit warning message.
    Returns: | Method success.
    Return type: | bool

  `garbageCollect`()

    Triggers the garbage collecting.

    Returns: | Number of unreachable objects found.
    Return type: | int

  `quit`(exitCode=0, event=None)

    Quits the Application.

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