4.47. umbra.ui.views

views.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines the Application Views classes.

Others:

4.47.1. Module Attributes

umbra.ui.views.LOGGER

4.47.2. Classes

class umbra.ui.views.ReadOnlyFilter[source]

Bases: PyQt4.QtCore.QObject

Defines a QObject subclass used as an event filter for the Abstract_QListView and Abstract_QTreeView classes.

eventFilter(object, event)[source]

Reimplements the QObject.eventFilter method.

Parameters:
  • object (QObject) – Object.
  • event (QEvent) – Event.
Returns:

Event filtered.

Return type:

bool

class umbra.ui.views.Mixin_AbstractBase(message=None)[source]

Bases: object

Defines the base mixin used to bring common capabilities in Application Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • message (unicode) – View default message when Model is empty.
message[source]

Property for self.__message attribute.

Returns:self.__message.
Return type:unicode
resizeEvent(event)[source]

Reimplements the *.resizeEvent() method.

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

Reimplements the *.paintEvent() method.

Parameters:event (QEvent) – QEvent.
class umbra.ui.views.Mixin_AbstractView(readOnly=None, message=None)[source]

Bases: umbra.ui.views.Mixin_AbstractBase

Defines a mixin used to bring common capabilities in Application Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • readOnly (bool) – View is read only.
  • message (unicode) – View default message when Model is empty.
readOnly[source]

Property for self.__readOnly attribute.

Returns:self.__readOnly.
Return type:bool
getNodes()[source]

Returns the View nodes.

Returns:View nodes.
Return type:list
filterNodes(pattern, attribute, flags=2)[source]

Filters the View Nodes on given attribute using given pattern.

Parameters:
  • pattern (unicode) – Filtering pattern.
  • attribute (unicode) – Filtering attribute.
  • flags (int) – Regex filtering flags.
Returns:

View filtered nodes.

Return type:

list

getViewNodesFromIndexes(*indexes)[source]

Returns the View Nodes from given indexes.

Parameters:
  • view (QWidget) – View.
  • *indexes (list) – Indexes.
Returns:

View nodes.

Return type:

dict

getViewSelectedNodes()[source]

Returns the View selected nodes.

Parameters:view (QWidget) – View.
Returns:View selected nodes.
Return type:dict
getSelectedNodes()[source]

Returns the View selected nodes.

Returns:View selected nodes.
Return type:dict
selectViewIndexes(indexes, flags=<PyQt4.QtGui.SelectionFlags object at 0x106b7d488>)[source]

Selects the View given indexes.

Parameters:
  • view (QWidget) – View.
  • indexes (list) – Indexes to select.
  • flags – Selection flags. ( QItemSelectionModel.SelectionFlags )
Returns:

Definition success.

Return type:

bool

selectIndexes(indexes, flags=<PyQt4.QtGui.SelectionFlags object at 0x106b7d578>)[source]

Selects given indexes.

Parameters:
  • indexes (list) – Indexes to select.
  • flags – Selection flags. ( QItemSelectionModel.SelectionFlags )
Returns:

Method success.

Return type:

bool

class umbra.ui.views.Mixin_AbstractWidget(message=None)[source]

Bases: umbra.ui.views.Mixin_AbstractBase

Defines a mixin used to bring common capabilities in Application Widgets Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QListView(parent=None, readOnly=False, message=None)[source]

Bases: PyQt4.QtGui.QListView, umbra.ui.views.Mixin_AbstractView

Defines a QListView subclass used as base by others Application Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • readOnly (bool) – View is read only.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QTableView(parent=None, readOnly=False, message=None)[source]

Bases: PyQt4.QtGui.QTableView, umbra.ui.views.Mixin_AbstractView

Defines a QTableView subclass used as base by others Application Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • readOnly (bool) – View is read only.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QTreeView(parent=None, readOnly=False, message=None)[source]

Bases: PyQt4.QtGui.QTreeView, umbra.ui.views.Mixin_AbstractView

Defines a QTreeView subclass used as base by others Application Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • readOnly (bool) – View is read only.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QListWidget(parent=None, message=None)[source]

Bases: PyQt4.QtGui.QListWidget, umbra.ui.views.Mixin_AbstractWidget

Defines a QListWidget subclass used as base by others Application Widgets Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QTableWidget(parent=None, readOnly=False, message=None)[source]

Bases: PyQt4.QtGui.QTableWidget, umbra.ui.views.Mixin_AbstractWidget

Defines a QTableWidget subclass used as base by others Application Widgets Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • message (unicode) – View default message when Model is empty.
class umbra.ui.views.Abstract_QTreeWidget(parent=None, message=None)[source]

Bases: PyQt4.QtGui.QTreeWidget, umbra.ui.views.Mixin_AbstractWidget

Defines a QTreeWidget subclass used as base by others Application Widgets Views classes.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • message (unicode) – View default message when Model is empty.