4.38. umbra.ui.common — Umbra 1.0.9 documentation

# 4.38. umbra.ui.common

common.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  Defines common ui manipulation related objects.

Others:

## 4.38.1. Module Attributes

`umbra.ui.common.` `LOGGER`

## 4.38.2. Functions

`umbra.ui.common.` `getApplicationInstance`()

  Returns the current QApplication instance or create one if it doesn’t exists.

  Returns: | Application instance.
  Return type: | QApplication

`umbra.ui.common.` `parseLocation`(data)

  Parses given location data.

  Parameters: | data (Exception) – Exception.
  Returns: | Location object.
  Return type: | Location

`umbra.ui.common.` `getResourcePath`(name, raiseException=False)

  Returns the resource file path matching the given name.

  Parameters: | name (unicode) – Resource name. raiseException (bool) – Raise the exception.
  Returns: | Resource path.
  Return type: | unicode

`umbra.ui.common.` `setWindowDefaultIcon`(window)

  Sets the default Application icon to the given window.

  Parameters: | window (QWidget) – Window.
  Returns: | Definition success.
  Return type: | bool

`umbra.ui.common.` `getSectionsFileParser`(file)

  Returns a sections file parser.

  Parameters: | file (unicode) – File.
  Returns: | Parser.
  Return type: | SectionsFileParser

`umbra.ui.common.` `storeLastBrowsedPath`(data)

  Defines a wrapper method used to store the last browsed path.

  Parameters: | data (QString or QList) – Path data.
  Returns: | Last browsed path.
  Return type: | unicode

`umbra.ui.common.` `getQVariantAsString`(data)

  Returns given QVariant data as a string.

  Parameters: | data (object) – Given data.
  Returns: | QVariant data as string.
  Return type: | unicode

`umbra.ui.common.` `parentsWalker`(object)

  Defines a generator used to retrieve the chain of parents of the given `QObject` instance.

  Parameters: | object (QObject) – Given path.
  Yield: | Object parent. ( QObject )

`umbra.ui.common.` `signalsBlocker`(instance, attribute, *args, **kwargs)

  Blocks given instance signals before calling the given attribute with given arguments and then unblocks the signals.

  Parameters: | instance (QObject) – Instance object. attribute (QObject) – Attribute to call. *args (*) – Arguments. **kwargs (**) – Keywords arguments.
  Returns: | Object.
  Return type: | object

`umbra.ui.common.` `showWaitCursor`(object)

  Shows a wait cursor while processing.

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

`umbra.ui.common.` `setToolBoxHeight`(toolBox, height=32)

  Sets given height to given QToolBox widget.

  Parameters: | toolbox (QToolBox) – ToolBox. height (int) – Height.
  Returns: | Definition success.
  Return type: | bool

`umbra.ui.common.` `setChildrenPadding`(widget, types, height=None, width=None)

  Sets given Widget children padding.

  Parameters: | widget (QWidget) – Widget to sets the children padding. types (tuple or list) – Children types. height (int) – Height padding. width (int) – Width padding.
  Returns: | Definition success.
  Return type: | bool

## 4.38.3. Classes

class `umbra.ui.common.` `Location`(**kwargs)

  Bases: `foundations.dataStructures.Structure`

  Defines a storage object for the `SearchInFiles` class location.

  Initializes the class.

  Parameters: | **kwargs (dict) – directories, files, filtersIn, filtersOut, targets.