Package schrodinger :: Package application :: Package jaguar :: Package gui :: Module utils :: Class ProjTableLikeView
[hide private]
[frames] | no frames]

Class ProjTableLikeView

PyQt4.QtGui.QTableView --+
                         |
                        ProjTableLikeView

A table view that mimics the selecting and editing behaviors of the Project Table

Instance Methods [hide private]
 
__init__(self, parent=None)
int
selectionCommand(self, index, event=None)
Don't update the current selection when using the keyboard to navigate or when clicking on a selected editable item.
 
commitDataToSelected(self, editor, index, delegate)
Commit data to all selected cells in the column that is currently being edited.
 
setItemDelegateForColumn(self, column, delegate, connect_selected=False)
Set the delegate for the specified column.
Method Details [hide private]

selectionCommand(self, index, event=None)

 

Don't update the current selection when using the keyboard to navigate or when clicking on a selected editable item.

Parameters:
  • index (PyQt4.QtCore.QModelIndex) - The newly selected index
  • event (PyQt4.QtCore.QEvent) - The event that triggered the index change
Returns: int
A flag describing how the selection should be updated

commitDataToSelected(self, editor, index, delegate)

 

Commit data to all selected cells in the column that is currently being edited.

Parameters:
  • editor (PyQt4.QtGui.QWidget) - The editor being used to enter data
  • index (PyQt4.QtCore.QModelIndex) - The index being edited
  • delegate (PyQt4.QtGui.QAbstractItemDelegate) - The delegate used to create the editor

setItemDelegateForColumn(self, column, delegate, connect_selected=False)

 

Set the delegate for the specified column. Note that this function adds the optional connect_selected argument not present in the QTableView function.

Parameters:
  • column (int) - The column to set the delegate for
  • delegate (PyQt4.QtGui.QAbstractItemDelegate) - The delegate to set
  • connect_selected (bool) - If True, the delegate's commitDataToSelected signal will be connected