Package mrv :: Package maya :: Package ui :: Module qa :: Class QALayout
[hide private]
[frames] | no frames]

Class QALayout

source code

         object --+                        
                  |                        
         basestring --+                    
                      |                    
                unicode --+                
                          |                
             object --+   |                
                      |   |                
            base.BaseUI --+                
                          |                
         object --+       |                
                  |       |                
interface.Interface --+   |                
                      |   |                
     interface.iDagItem --+                
                          |                
         object --+       |                
                  |       |                
   util.EventSender --+   |                
                      |   |                
     util.EventSenderUI --+                
                          |                
               base.NamedUI --+            
                              |            
              base.SizedControl --+        
                                  |        
                     object --+   |        
                              |   |        
           util.UIContainerBase --+        
                                  |        
                      layout.Layout --+    
                                      |    
                      layout.FormLayout --+
                                          |
                             object --+   |
                                      |   |
                          util.iItemSet --+
                                          |
                                         QALayout

Layout able to dynamically display QAChecks, run them and display their result
Nested Classes [hide private]

Inherited from layout.FormLayout: FormConstraint

Inherited from base.SizedControl: __metaclass__

Inherited from util.EventSenderUI (private): _UIEvent

    Configuration
  checkuicls
Row Layout able to display a qa check and related information
Instance Methods [hide private]

Inherited from layout.FormLayout: setup

Inherited from layout.Layout: __getitem__, setParentActive

Inherited from base.SizedControl: p_pma, p_popupMenuArray

Inherited from base.NamedUI: delete, exists, shortName, type, uiDeleted

Inherited from base.NamedUI (private): _parentString

Inherited from unicode: __add__, __contains__, __eq__, __format__, __ge__, __getattribute__, __getnewargs__, __getslice__, __gt__, __hash__, __le__, __len__, __lt__, __mod__, __mul__, __ne__, __rmod__, __rmul__, __sizeof__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, format, index, isalnum, isalpha, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Inherited from unicode (private): _formatter_field_name_split, _formatter_parser

Inherited from interface.Interface: supports

Inherited from util.EventSender: clearAllEvents, sender

Inherited from util.UIContainerBase: __enter__, __exit__, add, childByName, clearChildren, deleteChild, listChildren, removeChild, setActive

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __subclasshook__

    Interface
 
setChecks(self, checks)
Set the checks this layout should display
source code
 
checkLayouts(self)
Returns: list of checkLayouts representing our checks
source code
 
checks(self)
Returns: list of checks we are currently holding in our layout
source code

Inherited from util.iItemSet: setItems

    Eventhandlers
 
_checkLayoutHasCheck(self, checkLayout, check)
Returns: True if the given QACheckLayout manages the given check
source code
 
checkHandler(self, event, check, *args)
Called for the given event - it will find the UI element handling the call respective function on the UI instance
source code
 
runAllPressed(self, *args, **kwargs)
Called once the Run-All button is pressed
source code
    Properties

Inherited from layout.Layout: p_ca, p_childArray

Inherited from base.NamedUI: p_ex, p_exists

    Query Methods

Inherited from layout.Layout: children

Inherited from base.SizedControl: annotation, dimension, popupMenuArray

Inherited from base.NamedUI: childrenDeep, parent

Inherited from interface.iDagItem: basename, isPartOf, isRoot, isRootOf, parentDeep, root

    Edit Methods

Inherited from base.SizedControl: setAnnotation, setDimension, setFocus

    Overridden Methods
a new object with type S, a subtype of T
__new__(cls, *args, **kwargs)
Set some default arguments
source code
 
__init__(self, *args, **kwargs)
Initialize our basic interface involving a column layout to store the actual check widgets
source code

Inherited from base.NamedUI: __repr__, __setattr__

    Iterators

Inherited from interface.iDagItem: iterParents

    Name Generation

Inherited from interface.iDagItem: fullChildName

    SubClass Implementation
 
currentItemIds(self, name_to_child_map=None, **kwargs)
Returns: current check ids as defined by exsiting children.
source code
 
handleEvent(self, eventid, **kwargs)
Assure we have the proper layouts active
source code
 
createItem(self, checkid, name_to_child_map=None, name_to_check_map=None, **kwargs)
Create and return a layout displaying the given check instance
source code
 
updateItem(self, checkid, name_to_child_map=None, **kwargs)
Update the item identified by the given checkid so that it represents the current state of the application
source code
 
removeItem(self, checkid, name_to_child_map=None, **kwargs)
Delete the user interface portion representing the checkid
source code
Class Methods [hide private]

Inherited from util.EventSender: listEventNames

    Overridden Methods

Inherited from base.NamedUI (private): _exists

    Hierachy Handling

Inherited from base.NamedUI: activeParent

    Name Generation

Inherited from interface.iDagItem: addSep

Class Variables [hide private]

Inherited from layout.FormLayout: kSides

Inherited from layout.Layout: _properties_

Inherited from base.SizedControl: _events_, p_ann, p_annotation, p_dimension

Inherited from base.NamedUI (private): _is_menu

Inherited from base.BaseUI: __melcmd__

Inherited from interface.iDagItem: kOrder_BreadthFirst, kOrder_DepthFirst

Inherited from util.EventSenderUI: reraise_on_error, sender_as_argument

Inherited from util.iItemSet: eSetItemCBID

    Configuration
  run_all_button = True
  qaworkflowcls = QAWorkflow
  show_text_if_empty = True
  scrollable = True

Inherited from base.NamedUI (private): _sep

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, *args, **kwargs)

source code 
Set some default arguments
Parameters:
  • kwargs -
    • name:

      name of the user interface to wrap or the target name of a new elf element. Valid names for creation are short names ( without a | in it's path ), valid names for wrapping are short and preferably long names.

    • wrap_only:

      if True, default False, a wrap will be done even if the passed in name uses the short form ( for non-window elements ). If it exists, one cannot be sure whether more elements with the given name exist. If False, the system will create a new element of our type.

    • force_creation:

      if True, default False, a new item will be created even if an item with the given name uniquely exists. This might be necessary that you wish to create the given named item under the current parent, although an item with that name might already exist below another parent. This is required if you have a short name only

Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__init__(self, *args, **kwargs)
(Constructor)

source code 
Initialize our basic interface involving a column layout to store the actual check widgets
Overrides: object.__init__

setChecks(self, checks)

source code 
Set the checks this layout should display
Parameters:
  • checks - iterable of qa checks as retrieved by checks
Raises:
  • ValueErorr - if one check is from a different workflow and there is a run_all button

checkLayouts(self)

source code 
Returns:
list of checkLayouts representing our checks

checks(self)

source code 
Returns:
list of checks we are currently holding in our layout

currentItemIds(self, name_to_child_map=None, **kwargs)

source code 
Returns:
current check ids as defined by exsiting children.
Overrides: util.iItemSet.currentItemIds

Note: additionally fills in the name_to_child_map

handleEvent(self, eventid, **kwargs)

source code 
Assure we have the proper layouts active
Parameters:
  • eventid - eSetItemCBID identifying the event to handle
Overrides: util.iItemSet.handleEvent

createItem(self, checkid, name_to_child_map=None, name_to_check_map=None, **kwargs)

source code 
Create and return a layout displaying the given check instance
Parameters:
  • kwargs - will be passed to checkui class's initializer, allowing subclasses to easily adjust the paramter list
Returns:
created item or None to indicate error. On error, the item will not be updated anymore
Overrides: util.iItemSet.createItem

Note: its using self.checkuicls to create the instance

updateItem(self, checkid, name_to_child_map=None, **kwargs)

source code 
Update the item identified by the given checkid so that it represents the current state of the application
Overrides: util.iItemSet.updateItem

removeItem(self, checkid, name_to_child_map=None, **kwargs)

source code 
Delete the user interface portion representing the checkid
Overrides: util.iItemSet.removeItem

_checkLayoutHasCheck(self, checkLayout, check)

source code 
Returns:
True if the given QACheckLayout manages the given check

checkHandler(self, event, check, *args)

source code 
Called for the given event - it will find the UI element handling the call respective function on the UI instance

Note: find the check using predefined names as they server as unique-enough keys. This would possibly be faster, but might not make a difference after all

runAllPressed(self, *args, **kwargs)

source code 
Called once the Run-All button is pressed
Parameters:
  • kwargs - will be passed to runChecks method of workflow
Notes:
  • we assume all checks are from one workflow only as we do not sort them by workflow
  • currently we only run in query mode as sort of safety measure - check and fix on all might be too much and lead to unexpected results