Package schrodinger :: Package application :: Package bioluminate :: Module protein_structure_quality :: Class DataModelWithChart
[hide private]
[frames] | no frames]

Class DataModelWithChart

         object --+                            
                  |                            
  sip.simplewrapper --+                        
                      |                        
            sip.wrapper --+                    
                          |                    
       PyQt4.QtCore.QObject --+                
                              |                
PyQt4.QtCore.QAbstractItemModel --+            
                                  |            
   PyQt4.QtCore.QAbstractTableModel --+        
                                      |        
          Qt.QtCore.QAbstractTableModel --+    
                                          |    
            protein_report_widget.DataModel --+
                                              |
                                             DataModelWithChart

A subclass of DataModel that calls a sort callback when sorting

Instance Methods [hide private]
 
__init__(self, master)
Create a DataModel instance
 
restrictByChains(self, chains)
Restricts the data in the model to the specified chains
 
setData(self, *args)
Sets the internal data list to the specified list.
str
headerData(self, section, orientation, role)
Returns the string that should be displayed in the specified header cell.
 
sort(self, *args)
Sort the table (see parent class for argument definition).

Inherited from protein_report_widget.DataModel: columnCount, data, rowCount

Inherited from Qt.QtCore.QAbstractTableModel: reset, setRoleNames, setSupportedDragActions

Inherited from PyQt4.QtCore.QAbstractTableModel: dropMimeData, hasChildren, index, parent

Inherited from PyQt4.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, buddy, canFetchMore, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, fetchMore, flags, hasIndex, headerDataChanged, insertColumn, insertColumns, insertRow, insertRows, itemData, layoutAboutToBeChanged, layoutChanged, match, mimeData, mimeTypes, modelAboutToBeReset, modelReset, persistentIndexList, removeColumn, removeColumns, removeRow, removeRows, resetInternalData, revert, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, setHeaderData, setItemData, sibling, span, submit, supportedDragActions, supportedDropActions

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Instance Variables [hide private]
  data_column
The column that the data to plot is in
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, master)
(Constructor)

 

Create a DataModel instance

Overrides: object.__init__
(inherited documentation)

restrictByChains(self, chains)

 

Restricts the data in the model to the specified chains

Parameters:
  • chains (list of str) - list of chain names (or 'all') to display

setData(self, *args)

 

Sets the internal data list to the specified list. NOTE: Will use the actual list passed to it (without making a copy)

Overrides the parent class method to store the a copy of the data in self.all_data, since the _data property can be mutated by the restrictByChains method.

Parameters:
  • data_list (list) - the list of data for the model. Uses the actual list, not a copy
  • headers (list of str) - The column headers
Overrides: PyQt4.QtCore.QAbstractItemModel.setData

headerData(self, section, orientation, role)

 

Returns the string that should be displayed in the specified header cell. Used by the View.

Parameters:
  • section (int) - the row or column index requested
  • orientation (Qt.Orientation (Qt.Horizontal or Qt.Vertical)) - Whether this is for the horizontal or vertical header
  • role (Qt.ItemDataRole) - The data role to return - Qt.DisplayRole to return the text of the header.
Returns: str
the str representation for the requested header item
Overrides: PyQt4.QtCore.QAbstractItemModel.headerData

sort(self, *args)

 

Sort the table (see parent class for argument definition). In addition to sorting, the attribute self.sortCallback() will be called if it exists (with no arguments). This attribute must be set manually by the user.

Parameters:
  • Ncol - The column index to sort
  • order - The order in which to sort the column
Overrides: PyQt4.QtCore.QAbstractItemModel.sort