Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Package sub_tab_widgets :: Module base_widgets :: Class SubTabProxyModel
[hide private]
[frames] | no frames]

Class SubTabProxyModel

PyQt4.QtGui.QSortFilterProxyModel --+
                                    |
                                   SubTabProxyModel

A proxy model that filters out rows related to entry ids that are no longer selected in the project table.

Instance Methods [hide private]
 
__init__(self, parent=None)
 
setSourceModel(self, model)
When setting the source model, adopt its COLUMN constants if we don't have one defined.
 
setDisplayedEids(self, eids)
Set the entry ids to display in the table.
bool
isAcceptableEid(self, eid)
Is the specified entry ID currently included in the Input tab table? i.e., Would this entry ID be acceptable to display in the sub-tab table?
 
filterAcceptsRow(self, source_row, source_parent=None)
Accept a row only if the entry id is in self._displayed_eids or if the entry id is blank
 
lessThan(self, left, right)
Compare two indices for sorting.
Class Variables [hide private]
type COLUMN = None
A class containing column constants for the table.
Method Details [hide private]

setSourceModel(self, model)

 

When setting the source model, adopt its COLUMN constants if we don't have one defined.

See Qt documentation for explanation of arguments.

setDisplayedEids(self, eids)

 

Set the entry ids to display in the table. This should correspond to the entry ids currently selected in the project table.

Parameters:
  • eids (list) - The entry ids to display

isAcceptableEid(self, eid)

 

Is the specified entry ID currently included in the Input tab table? i.e., Would this entry ID be acceptable to display in the sub-tab table?

Parameters:
  • eid (str) - The entry id
Returns: bool
True if the entry ID is acceptable. False otherwise.

filterAcceptsRow(self, source_row, source_parent=None)

 

Accept a row only if the entry id is in self._displayed_eids or if the entry id is blank

See Qt documentation for an explanation of the arguments and return value

lessThan(self, left, right)

 

Compare two indices for sorting. Assume that the ATOM column contains atom names. Assume that the ATOMS column contains either

  • a string of atom names separated by commas and white space
  • a list or tuple of atom names

Atom names are then sorted numerically. All other columns are sorted using Python's less than operator (which allows tuples to be sorted as expected).

See Qt documentation for an explanation of arguments and return value