Package schrodinger :: Package application :: Package jaguar :: Package gui :: Package tabs :: Package input_sub_tabs :: Module base_sub_tab :: Class BaseSubTab
[hide private]
[frames] | no frames]

Class BaseSubTab

PyQt4.QtGui.QWidget --+
                      |
                     BaseSubTab

A base-class for all Input tab sub-tabs. This class is not intended to be instantiated directly and should be subclassed. Subclasses must redefine NAME, UI_MODULE, TABLE_MODEL_CLASS, saveSettings, and loadSettings. Subclasses must include a schrodinger.application.jaguar.gui.tabs.tabs. sub_tab_widgets.base_widgets.SubTabTableView (or a subclass) instance accessible as self.ui.table_view. Subclasses will also likely need to redefine setup, activate, and deactivate.

Nested Classes [hide private]
type TABLE_MODEL_CLASS
The class of the table model.
type PROXY_MODEL_CLASS
The class of the proxy model.
Instance Methods [hide private]
 
__init__(self, parent=None)
 
setup(self)
Sub-tab-specific initialization.
str or NoneType
validate(self)
Make sure that the sub-tab settings will allow a job to be run successfully.
 
saveSettings(self, jag_input, eid)
Save sub-tab settings for the specified entry into the given Jaguar handle.
 
loadSettings(self, jag_input, eid, title, struc)
Restore sub-tab settings from the Jaguar handle.
 
activate(self)
Activate the sub-tab, e.g., check the picking check box.
 
deactivate(self)
Deactivate the sub-tab, e.g., stop picking and/or uncheck the picking check box
 
setActive(self, activate)
Activate or deactivate the sub-tab
 
setDisplayedEids(self, eids)
Set the entry ids to display in the table.
 
updateEntryTitles(self, eids_to_titles)
Update the entry titles in case they have changed in the project table
 
emitCountChanged(self)
Emit the countChanged signal with the appropriate row count
 
reset(self)
 
emitAddMarker(self, atoms, settings)
Pass along the addMarker signal received from the table model after adding the sub-tab name.
 
emitRemoveMarker(self, atoms)
Pass along the removeMarker signal received from the table model after adding the sub-tab name to the signal.
 
emitSetMarkerHighlighting(self, atoms, highlight)
Pass along the setMarkerHighlighting signal received from the table view after adding the sub-tab name to the signal.
 
warning(self, msg)
Display a warning dialog with the specified message
Class Variables [hide private]
str NAME = ""
The name of the tab.
module UI_MODULE = None
A module containing a Ui_Form for the sub tab
Instance Variables [hide private]
PyQt4.QtCore.pyqtSignal countChanged = QtCore.pyqtSignal(QtGui.QWidget, int)
A signal emitted when the number of rows in the table has changed.
PyQt4.QtCore.pyqtSignal addMarker = QtCore.pyqtSignal(list, dict, str)
A signal emitted when a workspace marker should be added.
PyQt4.QtCore.pyqtSignal removeMarker = QtCore.pyqtSignal(list, str)
A signal emitted when a workspace marker should be removed.
PyQt4.QtCore.pyqtSignal setMarkerHighlighting = QtCore.pyqtSignal(list, bool, str)
A signal emitted when the highlighting of a workspace marker should be changed.
Method Details [hide private]

setup(self)

 

Sub-tab-specific initialization. This function may be redefined in subclasses.

validate(self)

 

Make sure that the sub-tab settings will allow a job to be run successfully.

Returns: str or NoneType
If the validation passes, returns None. If the validation fails, returns a string that describes the error.

saveSettings(self, jag_input, eid)

 

Save sub-tab settings for the specified entry into the given Jaguar handle. This function should be redefined in subclasses.

Parameters:

loadSettings(self, jag_input, eid, title, struc)

 

Restore sub-tab settings from the Jaguar handle. This function should be redefined in subclasses. Note that existing settings for the given entry id should be cleared before the new settings are loaded.

Parameters:

setActive(self, activate)

 

Activate or deactivate the sub-tab

Parameters:
  • activate (bool) - Whether to activate (True) or de-activate (False) the sub-tab

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

updateEntryTitles(self, eids_to_titles)

 

Update the entry titles in case they have changed in the project table

Parameters:
  • eids_to_titles (dict) - A dictionary of {entry id: title}

emitAddMarker(self, atoms, settings)

 

Pass along the addMarker signal received from the table model after adding the sub-tab name.

Parameters:
  • atoms (list) - A list of atoms to add the marker for
  • settings (dict) - The marker settings

emitRemoveMarker(self, atoms)

 

Pass along the removeMarker signal received from the table model after adding the sub-tab name to the signal.

Parameters:
  • atoms (list) - A list of atoms to remove the marker for

emitSetMarkerHighlighting(self, atoms, highlight)

 

Pass along the setMarkerHighlighting signal received from the table view after adding the sub-tab name to the signal.

Parameters:
  • atoms (list) - A list of atoms to change the highlighting for
  • highlight (bool) - Whether to highlight (True) or unhighlight (False) the specified marker

warning(self, msg)

 

Display a warning dialog with the specified message

Parameters:
  • msg (str) - The message to include in the warning dialog

Class Variable Details [hide private]

NAME

The name of the tab. This name will be shown in the tab bar.
Type:
str
Value:
""

Instance Variable Details [hide private]

countChanged

A signal emitted when the number of rows in the table has changed. The input tab uses this to update the row count in the tab name. The signal is emitted with
  • The sub tab instance (BaseSubTab
  • The row count (int)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(QtGui.QWidget, int)

addMarker

A signal emitted when a workspace marker should be added. Emitted with:
  • The list of atoms to add the marker for (list)
  • The marker settings (dict)
  • The name of the sub-tab (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, dict, str)

removeMarker

A signal emitted when a workspace marker should be removed. Emitted with:
  • The list of atoms to remove the marker for (list)
  • The name of the sub-tab (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, str)

setMarkerHighlighting

A signal emitted when the highlighting of a workspace marker should be changed. Emitted with:
  • The list of atoms to change the highlighting for (list)
  • Whether the marker should be highlighted (True) or unhighlighted (False) (bool)
  • The name of the sub-tab (str)
Type:
PyQt4.QtCore.pyqtSignal
Value:
QtCore.pyqtSignal(list, bool, str)