Package schrodinger :: Package application :: Package bioluminate :: Module protein_report_widget :: Class ReportFrame
[hide private]
[frames] | no frames]

Class ReportFrame

PyQt4.QtGui.QFrame --+
                     |
                    ReportFrame

A QtGui.QFrame that contains a Protein Report

Instance Methods [hide private]
 
__init__(self, parent_layout=None, update_button=True, app_parent=None, load_proteins=True)
Create a ReportFrame object
list
getSelectedDataTitles(self, model)
Returns a list of selected data titles (the value in the first column)
 
selectionChangedCallback(self, selected=None, deselected=None)
Called when table selection is changed
DataModel
getDataModelClass(self)
Returns the proper data model class to use, allows easy subclassing of the Model in report subclasses
schrodinger.structure.Structure
getStructure(self, entry_id=None)
Return the structure to report on.
 
updateTables(self, entry_id=None)
Calculate new data for the requested structure and load the data into the table.
 
exportTables(self, filename, tables_to_write)
Export the specified tables to the <filename> file.
 
setChanged(self, selected_title)
Callback for when a new set of data is requested.
 
exportCurrentTable(self)
Export only the current table.
 
exportAllTables(self)
Export all tables.
 
openHelp(self)
Display the help topic
 
closePanel(self)
Hide the panel
 
workspaceChanged(self, changed)
Keep track of when something changes in the workspace that would invalidate the current data.
 
close(self)
Close the frame, and clean up anything that needs to happen upon closing
Method Details [hide private]

__init__(self, parent_layout=None, update_button=True, app_parent=None, load_proteins=True)
(Constructor)

 

Create a ReportFrame object

Parameters:
  • parent_layout (QLayout or None) - If given the ReportFrame will add itself to this layout
  • update_button (bool) - True if the report should have an update button, False if not.
  • app_parent (schrodinger.ui.qt.appframework.AppFramework widget) - if given will be used to supply GUI dialog boxes and busy cursors
  • load_proteins (bool) - If True, the panel will attempt to load proteins when created. If False (default), not attempt is made - the widgets are merely created.

getSelectedDataTitles(self, model)

 

Returns a list of selected data titles (the value in the first column)

Parameters:
  • model (DataModel) - The model the data comes from
Returns: list
list of data titles (the value in the first column) for each selected row

selectionChangedCallback(self, selected=None, deselected=None)

 

Called when table selection is changed

Parameters:
  • selected (QItemSelection) - Unused callback-required parameters
  • deselected (QItemSelection) - Unused callback-required parameters

getDataModelClass(self)

 

Returns the proper data model class to use, allows easy subclassing of the Model in report subclasses

Returns: DataModel
The CLASS used for the table data model in the report. Does not return a class instance, only the class itself.

getStructure(self, entry_id=None)

 

Return the structure to report on.

Parameters:
  • entry_id (str or None) - Entry ID of the structure to use, or None (default) if the workspace structure is to be used. If entry_id is given, the structure is taken from the project table row for that entry_id (which may be different from the current workspace structure). If entry_id is None, the workspace structure is used, but crystal structure properties are taken from the included project table row
Returns: schrodinger.structure.Structure
The structure requested

updateTables(self, entry_id=None)

 

Calculate new data for the requested structure and load the data into the table.

Parameters:
  • entry_id (str or None) - Entry ID of the structure to use, or None (default) if the workspace structure is to be used. If entry_id is given, the structure is taken from the project table row for that entry_id (which may be different from the current workspace structure). If entry_id is None, the workspace structure is used, but crystal structure properties are taken from the included project table row

exportTables(self, filename, tables_to_write)

 

Export the specified tables to the <filename> file.

Parameters:
  • filename (str) - the path to the output file
  • tables_to_write (str) - the name of the set of data to write out

setChanged(self, selected_title)

 

Callback for when a new set of data is requested. Changes the data displayed in the table. This also changes the underlying model the table uses.

Parameters:
  • selected_title (str) - The name of the set of data requested

workspaceChanged(self, changed)

 

Keep track of when something changes in the workspace that would invalidate the current data.

Parameters:
  • changed (str) - What changed in the workspace