Package schrodinger :: Module antibody_db_manage_gui :: Class EditableProxyModel
[hide private]
[frames] | no frames]

Class EditableProxyModel

         object --+                        
                  |                        
  sip.simplewrapper --+                    
                      |                    
            sip.wrapper --+                
                          |                
       PyQt4.QtCore.QObject --+            
                              |            
PyQt4.QtCore.QAbstractItemModel --+        
                                  |        
    PyQt4.QtGui.QAbstractProxyModel --+    
                                      |    
      PyQt4.QtGui.QSortFilterProxyModel --+
                                          |
                                         EditableProxyModel

A proxy model that allows editing and custom filtering

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Create an EditableProxyModel index.
 
setVisibleColumns(self, columns)
Set the columns that should be displayed in the table
str
headerName(self, column)
Get the header name for the given column
 
setFilteredColumns(self, columns)
Set the columns that the filter should act on.
 
_determineSearchColumns(self)
Determine which columns the filter should act on - uses the columns set by setFilteredColumns if available, otherwise the set of visible columns is used.
bool
filterAcceptsColumn(self, column, index)
Modified from the parent class to use the set of visible columns set by setVisibleColumns.
bool
filterAcceptsRow(self, row, index)
Determine if a row should be displayed in the view or not

Inherited from PyQt4.QtGui.QSortFilterProxyModel: buddy, canFetchMore, clear, columnCount, data, dropMimeData, dynamicSortFilter, fetchMore, filterCaseSensitivity, filterChanged, filterKeyColumn, filterRegExp, filterRole, flags, hasChildren, headerData, index, insertColumns, insertRows, invalidate, invalidateFilter, isSortLocaleAware, lessThan, mapFromSource, mapSelectionFromSource, mapSelectionToSource, mapToSource, match, mimeData, mimeTypes, parent, removeColumns, removeRows, rowCount, setData, setDynamicSortFilter, setFilterCaseSensitivity, setFilterFixedString, setFilterKeyColumn, setFilterRegExp, setFilterRole, setFilterWildcard, setHeaderData, setSortCaseSensitivity, setSortLocaleAware, setSortRole, setSourceModel, sort, sortCaseSensitivity, sortColumn, sortOrder, sortRole, span, supportedDropActions

Inherited from PyQt4.QtGui.QAbstractProxyModel: itemData, revert, sourceModel, submit

Inherited from PyQt4.QtCore.QAbstractItemModel: beginInsertColumns, beginInsertRows, beginMoveColumns, beginMoveRows, beginRemoveColumns, beginRemoveRows, beginResetModel, changePersistentIndex, changePersistentIndexList, columnsAboutToBeInserted, columnsAboutToBeMoved, columnsAboutToBeRemoved, columnsInserted, columnsMoved, columnsRemoved, createIndex, dataChanged, decodeData, encodeData, endInsertColumns, endInsertRows, endMoveColumns, endMoveRows, endRemoveColumns, endRemoveRows, endResetModel, hasIndex, headerDataChanged, insertColumn, insertRow, layoutAboutToBeChanged, layoutChanged, modelAboutToBeReset, modelReset, persistentIndexList, removeColumn, removeRow, reset, roleNames, rowsAboutToBeInserted, rowsAboutToBeMoved, rowsAboutToBeRemoved, rowsInserted, rowsMoved, rowsRemoved, setItemData, setRoleNames, setSupportedDragActions, sibling, supportedDragActions

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, 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]
  filtered_columns
The user-defined set of columns that the filter acts on
  visible_columns
The set of columns that should be displayed
  search_columns
The set of columns that the filter acts on
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

 

Create an EditableProxyModel index. See QtGui.QSortFilterProxyModel for argument documentation.

Overrides: object.__init__

setVisibleColumns(self, columns)

 

Set the columns that should be displayed in the table

Parameters:
  • columns (list of str or 'all') - The header names of columns to display. Use 'all' to display all columns except those marked in the model as 'never show'.

headerName(self, column)

 

Get the header name for the given column

Parameters:
  • column (int) - The column to get the header for
Returns: str
The header name (string displayed in the header) for column

setFilteredColumns(self, columns)

 

Set the columns that the filter should act on. If this is not set, then the set of visible columns setVisibleColumns will be used.

Parameters:
  • columns (list of str) - The header names of columns to display

filterAcceptsColumn(self, column, index)

 

Modified from the parent class to use the set of visible columns set by setVisibleColumns. Used to determin if the View should display a column or not.

Parameters:
  • column (int) - The column number in question
  • index (QModelIndex) - Not used
Returns: bool
True if the column should be displayed, False if not.
Overrides: PyQt4.QtGui.QSortFilterProxyModel.filterAcceptsColumn

filterAcceptsRow(self, row, index)

 

Determine if a row should be displayed in the view or not

Parameters:
  • row (int) - The row in question
  • index (QModelIndex) - Not used
Returns: bool
True if the row matches the filter, False if not.
Overrides: PyQt4.QtGui.QSortFilterProxyModel.filterAcceptsRow