4.24. umbra.engine — Umbra 1.0.4 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.4 documentation »
- 4. Api »

# 4.24. umbra.engine

engine.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  This module is the main Umbra package module.
  It 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'')

  This decorator is used for a processing operation.

  Parameters: | message – Operation description. ( String )
  Returns: | Object. ( Object )

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

  This decorator is used to encapsulate a processing operation.

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

`umbra.engine.` `setUserApplicationDataDirectory`(path)

  This definition sets the Application data directory.

  Parameters: | path – Starting point for the directories tree creation. ( String )
  Returns: | Definition success. ( Boolean )

`umbra.engine.` `getCommandLineParametersParser`()

  This definition returns the command line parameters parser.

  Returns: | Parser. ( Parser )

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

  This definition returns the logging file path.

  Parameters: | maximumLoggingFiles – Maximum allowed logging files in the logging directory. ( Integer ) retries – Number of retries to generate a unique logging file name. ( Integer )
  Returns: | Logging file path. ( String )

`umbra.engine.` `run`(engine, parameters, componentsPaths=None, requisiteComponents=None, visibleComponents=None)

  This definition starts the Application.

  Parameters: | engine – Engine. ( QObject ) parameters – Command line parameters. ( Tuple ) componentsPaths – Components componentsPaths. ( Tuple / List ) requisiteComponents – Requisite components names. ( Tuple / List ) visibleComponents – Visible components names. ( Tuple / List )
  Returns: | Definition success. ( Boolean )

`umbra.engine.` `exit`(exitCode=0)

  This definition exits the Application.

  Parameters: | exitCode – Exit code. ( Integer )

## 4.24.3. Classes

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

  Bases: `foundations.ui.common.QWidget`

  This class is the main class of the Umbra package.

  Parameters: | componentsPaths – Components componentsPaths. ( Tuple / List ) requisiteComponents – Requisite components names. ( Tuple / List ) visibleComponents – Visible components names. ( Tuple / List ) *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. ( Integer )

  `contentDropped`

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

    Returns: | Event. ( QEvent )

  `sizeChanged`

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

    Returns: | Event. ( QEvent )

  `timer`

    This method is the property for self.__timer attribute.

    Returns: | self.__timer. ( QTimer )

  `requestsStack`

    This method is the property for self.__requestsStack attribute.

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

  `componentsPaths`

    This method is the property for self.__componentsPaths attribute.

    Returns: | self.__componentsPaths. ( Tuple / List )

  `requisiteComponents`

    This method is the property for self.__requisiteComponents attribute.

    Returns: | self.__requisiteComponents. ( Tuple / List )

  `visibleComponents`

    This method is the property for self.__visibleComponents attribute.

    Returns: | self.__visibleComponents. ( Tuple / List )

  `patchesManager`

    This method is the property for self.__patchesManager attribute.

    Returns: | self.__patchesManager. ( ActionsManager )

  `componentsManager`

    This method is the property for self.__componentsManager attribute.

    Returns: | self.__componentsManager. ( ComponentsManager )

  `notificationsManager`

    This method is the property for self.__notificationsManager attribute.

    Returns: | self.__notificationsManager. ( NotificationsManager )

  `actionsManager`

    This method is the property for self.__actionsManager attribute.

    Returns: | self.__actionsManager. ( ActionsManager )

  `fileSystemEventsManager`

    This method is the property for self.__fileSystemEventsManager attribute.

    Returns: | self.__fileSystemEventsManager. ( FileSystemEventsManager )

  `layoutsManager`

    This method is the property for self.__layoutsManager attribute.

    Returns: | self.__layoutsManager. ( LayoutsManager )

  `userApplicationDataDirectory`

    This method is the property for self.__userApplicationDataDirectory attribute.

    Returns: | self.__userApplicationDataDirectory. ( String )

  `loggingSessionHandler`

    This method is the property for self.__loggingSessionHandler attribute.

    Returns: | self.__loggingSessionHandler. ( Handler )

  `loggingFileHandler`

    This method is the property for self.__loggingFileHandler attribute.

    Returns: | self.__loggingFileHandler. ( Handler )

  `loggingConsoleHandler`

    This method is the property for self.__loggingConsoleHandler attribute.

    Returns: | self.__loggingConsoleHandler. ( Handler )

  `loggingSessionHandlerStream`

    This method is the property for self.__loggingSessionHandlerStream attribute.

    Returns: | self.__loggingSessionHandlerStream. ( StreamObject )

  `settings`

    This method is the property for self.__settings attribute.

    Returns: | self.__settings. ( QSettings )

  `verbosityLevel`

    This method is the property for self.__verbosityLevel attribute.

    Returns: | self.__verbosityLevel. ( Integer )

  `parameters`

    This method is the property for self.__parameters attribute.

    Returns: | self.__parameters. ( Object )

  `arguments`

    This method is the property for self.__arguments attribute.

    Returns: | self.__arguments. ( List )

  `workerThreads`

    This method is the property for self.__workerThreads attribute.

    Returns: | self.__workerThreads. ( List )

  `isProcessing`

    This method is the property for self.__isProcessing attribute.

    Returns: | self.__isProcessing. ( Boolean )

  `locals`

    This method is the property for self.__locals attribute.

    Returns: | self.__locals. ( Dictionary )

  `dragEnterEvent`(event)

    This method reimplements the `QWidget.dragEnterEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `dragMoveEvent`(event)

    This method reimplements the `QWidget.dragMoveEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `dropEvent`(event)

    This method reimplements the `QWidget.dropEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `show`()

    This method reimplements the `QWidget.show()` method.

  `closeEvent`(event)

    This method reimplements the `QWidget.closeEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `resizeEvent`(event)

    This method reimplements the `QWidget.resizeEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `setVerbosityLevel`(verbosityLevel)

    This method sets the Application verbosity level.

    Parameters: | verbosityLevel – Verbosity level. ( Integer )
    Returns: | Method success. ( Boolean )
    Note : | The expected verbosity level value is an integer between 0 to 4.

  `setVisualStyle`(fullScreenStyle=False)

    This method sets the Application visual style.

    Parameters: | fullScreenStyle – Use fullscreen stylesheet file. ( Boolean )
    Returns: | Method success. ( Boolean )

  `isFullScreen`()

    This method returns if Application is in fullscreen state.

    Returns: | FullScreen state. ( Boolean )

  `toggleFullScreen`(*args)

    This method toggles Application fullscreen state.

    Parameters: | *args – Arguments. ( * )
    Returns: | Method success. ( Boolean )

  `processEvents`(flags=0)

    This method process Application events.

    Parameters: | flags – Events flags. ( Integer )
    Returns: | Method success. ( Boolean )

  `setProcessingMessage`(message, warning=True)

    This method sets the processing operation message.

    Parameters: | message – Operation description. ( String ) warning – Emit warning message. ( Integer )
    Returns: | Method success. ( Boolean )

  `startProcessing`(message, steps=0, warning=True)

    This method registers the start of a processing operation.

    Parameters: | message – Operation description. ( String ) steps – Operation steps. ( Integer ) warning – Emit warning message. ( Integer )
    Returns: | Method success. ( Boolean )

  `stepProcessing`(warning=True)

    This method steps the processing operation progress indicator.

    Parameters: | warning – Emit warning message. ( Integer )
    Returns: | Method success. ( Boolean )

  `stopProcessing`(warning=True)

    This method registers the end of a processing operation.

    Parameters: | warning – Emit warning message. ( Integer )
    Returns: | Method success. ( Boolean )

  `garbageCollect`()

    This method triggers the garbage collecting.

    Returns: | Number of unreachable objects found. ( Integer )

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

    This method quits the Application.

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

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.4 documentation »
- 4. Api »