Package gui :: Package components :: Module spectrum :: Class Spectra_list
[hide private]
[frames] | no frames]

Class Spectra_list

source code

The GUI element for listing loaded spectral data.

Instance Methods [hide private]
 
__init__(self, gui=None, parent=None, box=None, id=None, fn_add=None, buttons=True)
Build the spectral list GUI element.
source code
 
Enable(self, enable=True)
Enable or disable the element.
source code
 
add_buttons(self, sizer)
Add the buttons for peak list manipulation.
source code
 
build_element(self)
Build the spectra listing GUI element.
source code
 
build_element_safe(self)
Build the spectra listing GUI element in a thread safe wx.CallAfter call.
source code
 
data_delete(self, event)
Launch the spectrum.delete user function.
source code
 
delete(self)
Unregister the class.
source code
 
init_element(self, sizer)
Initialise the GUI element for the spectra listing.
source code
 
observer_register(self, remove=False)
Register and unregister methods with the observer objects.
source code
 
on_right_click(self, event)
Pop up menu for the right click.
source code
 
resize(self, event)
Catch the resize to allow the element to be resized.
source code
bool
noe_spectrum_type(self, index)
Add the NOE spectral type info to the element.
source code
bool
relax_times(self, index)
Add the relaxation delay time info to the element.
source code
bool
replicates(self, index)
Add the replicated spectra info to the element.
source code
 
size_cols(self)
Set the column sizes.
source code
Method Details [hide private]

__init__(self, gui=None, parent=None, box=None, id=None, fn_add=None, buttons=True)
(Constructor)

source code 

Build the spectral list GUI element.

Parameters:
  • gui (wx.Frame instance) - The main GUI object.
  • parent (wx object) - The parent GUI element that this is to be attached to (the panel object).
  • data (class instance) - The data storage container.
  • box (wx.BoxSizer instance) - The vertical box sizer to pack this GUI component into.
  • id (str) - A unique identification string. This is used to register the update method with the GUI user function observer object.
  • fn_add (func) - The function to execute when clicking on the 'Add' button.
  • buttons (bool) - A flag which if True will display the buttons at the top.

Enable(self, enable=True)

source code 

Enable or disable the element.

Parameters:
  • enable (bool) - The flag specifying if the element should be enabled or disabled.

add_buttons(self, sizer)

source code 

Add the buttons for peak list manipulation.

Parameters:
  • sizer (wx.BoxSizer instance) - The sizer element to pack the buttons into.

data_delete(self, event)

source code 

Launch the spectrum.delete user function.

Parameters:
  • event (wx event) - The wx event.

init_element(self, sizer)

source code 

Initialise the GUI element for the spectra listing.

Parameters:
  • sizer (wx.BoxSizer instance) - The sizer element to pack the element into.

observer_register(self, remove=False)

source code 

Register and unregister methods with the observer objects.

Parameters:
  • remove (False) - If set to True, then the methods will be unregistered.

on_right_click(self, event)

source code 

Pop up menu for the right click.

Parameters:
  • event (wx event) - The wx event.

resize(self, event)

source code 

Catch the resize to allow the element to be resized.

Parameters:
  • event (wx event) - The wx event.

noe_spectrum_type(self, index)

source code 

Add the NOE spectral type info to the element.

Parameters:
  • index (int) - The column index for the data.
Returns: bool
True if a spectrum type exists, False otherwise.

relax_times(self, index)

source code 

Add the relaxation delay time info to the element.

Parameters:
  • index (int) - The column index for the data.
Returns: bool
True if relaxation times exist, False otherwise.

replicates(self, index)

source code 

Add the replicated spectra info to the element.

Parameters:
  • index (int) - The column index for the data.
Returns: bool
True if relaxation times exist, False otherwise.