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()[source]
- Returns the current QApplication instance or
create one if it doesn’t exists. - 
| Returns: | Application instance. | 
|---|
 | Return type: | QApplication | 
|---|
 
 
- 
umbra.ui.common.parseLocation(data)[source]
- Parses given location data. - 
| Parameters: | data (Exception) – Exception. | 
|---|
 | Returns: | Location object. | 
|---|
 | Return type: | Location | 
|---|
 
 
- 
umbra.ui.common.getResourcePath(name, raiseException=False)[source]
- 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)[source]
- Sets the default Application icon to the given window. - 
| Parameters: | window (QWidget) – Window. | 
|---|
 | Returns: | Definition success. | 
|---|
 | Return type: | bool | 
|---|
 
 
- 
umbra.ui.common.getSectionsFileParser(file)[source]
- Returns a sections file parser. - 
| Parameters: | file (unicode) – File. | 
|---|
 | Returns: | Parser. | 
|---|
 | Return type: | SectionsFileParser | 
|---|
 
 
- 
umbra.ui.common.storeLastBrowsedPath(data)[source]
- 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)[source]
- 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)[source]
- 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)[source]
- 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)[source]
- Shows a wait cursor while processing. - 
| Parameters: | object (object) – Object to decorate. | 
|---|
 | Returns: | Object. | 
|---|
 | Return type: | object | 
|---|
 
 
- 
umbra.ui.common.setToolBoxHeight(toolBox, height=32)[source]
- 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)[source]
- 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)[source]
- Bases: foundations.dataStructures.Structure - Defines a storage object for the SearchInFiles class location. - Initializes the class. - 
| Parameters: | **kwargs (dict) – directories, files, filtersIn, filtersOut, targets. | 
|---|