Package schrodinger :: Package application :: Package bioluminate :: Module bwidgets :: Class RowActionItem
[hide private]
[frames] | no frames]

Class RowActionItem

PyQt4.QtGui.QWidget --+
                      |
                     RowActionItem

Custom widget to be used in a table cell. It will create a widget that contains multiple small push buttons with icons. This will end up looking like just a small icon in the cell. Multipe actions can be added to a single cell

Instance Methods [hide private]
 
__init__(self, row)
 
addActionItem(self, icon, tooltip, callback)
Add an action to the cell widget.
 
paintEvent(self, *args, **kwargs)
Override the paintEvent to create the layout for the cell.
Instance Variables [hide private]
  _action_items
A private variable that stores the list of actions for the cell
Method Details [hide private]

__init__(self, row)
(Constructor)

 
Parameters:
  • row (mixed) - The row associated with the cell. This can be anything (i.e. integer index, row object, etc.) and is used to track the row.

addActionItem(self, icon, tooltip, callback)

 

Add an action to the cell widget.

Parameters:
  • icon (QtGui.QIcon) - the icon for the action
  • callback (callable) - The callback for the action