Package gui :: Package components :: Module grid :: Class Grid_base
[hide private]
[frames] | no frames]

Class Grid_base

source code

The peak list selection class.

Instance Methods [hide private]
 
__init__(self, gui=None, parent=None, subparent=None, data=None, label=None, width=688, height=300, box=None)
Build the peak list reading GUI element.
source code
 
resize(self, event)
Catch the resize to allow the grid to be resized.
source code
 
add_buttons(self, sizer)
Add the buttons for peak list manipulation.
source code
 
add_grid(self, sizer)
Add the grid for the peak list files and delay times.
source code
 
change_delay_down(self, event)
Handle changes to the delay time.
source code
 
change_delay_up(self, event)
Handle updates to the delay time.
source code
 
event_left_dclick(self, event)
Handle the left mouse double click.
source code
 
event_key_down(self, event)
Control what happens when a key is pressed.
source code
 
event_key_up(self, event)
Control what happens when a key is released.
source code
list of tuples
get_all_coordinates(self, top_left, bottom_right)
Convert the cell range into a coordinate list.
source code
list of tuples of int
get_selection(self)
Determine which cells are selected.
source code
 
load_delay(self, event, vc=False)
The variable delay list loading GUI element.
source code
 
load_peaklist(self, event)
Function to load peak lists to data grid.
source code
 
sync_ds(self, upload=False)
Synchronise the rx analysis frame and the relax data store, both ways.
source code
 
update_grid(self)
Update the grid, changing the relaxation delay times as needed.
source code
Class Variables [hide private]
  col_label_width = 40
  col1_width = 160
  col2_width = 140
Method Details [hide private]

__init__(self, gui=None, parent=None, subparent=None, data=None, label=None, width=688, height=300, box=None)
(Constructor)

source code 

Build the peak list reading 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).
  • subparent (wx object) - The subparent GUI element that this is to be attached to (the analysis object).
  • data (class instance) - The data storage container.
  • label (str) - The type of analysis.
  • width (int) - The initial width of the GUI element.
  • height (int) - The initial height of the GUI element.
  • box (wx.BoxSizer instance) - The vertical box sizer to pack this GUI component into.

resize(self, event)

source code 

Catch the resize to allow the grid to be resized.

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

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.

add_grid(self, sizer)

source code 

Add the grid for the peak list files and delay times.

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

change_delay_down(self, event)

source code 

Handle changes to the delay time.

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

change_delay_up(self, event)

source code 

Handle updates to the delay time.

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

event_left_dclick(self, event)

source code 

Handle the left mouse double click.

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

event_key_down(self, event)

source code 

Control what happens when a key is pressed.

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

event_key_up(self, event)

source code 

Control what happens when a key is released.

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

get_all_coordinates(self, top_left, bottom_right)

source code 

Convert the cell range into a coordinate list.

Parameters:
  • top_left (list or tuple) - The top left hand coordinate.
  • bottom_right (list or tuple) - The bottom right hand coordinate.
Returns: list of tuples
The list of tuples of coordinates of all cells.

get_selection(self)

source code 

Determine which cells are selected.

There are three possibilities for cell selections in a wx.grid. These are:

  • Single cell selection (this is not highlighted).
  • Multiple cells are selected.
  • Column selection.
  • Row selection.
Returns: list of tuples of int
An array of the cell selection coordinates.

load_delay(self, event, vc=False)

source code 

The variable delay list loading GUI element.

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

load_peaklist(self, event)

source code 

Function to load peak lists to data grid.

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

sync_ds(self, upload=False)

source code 

Synchronise the rx analysis frame and the relax data store, both ways.

This method allows the frame information to be uploaded into the relax data store, or for the information in the relax data store to be downloaded by the frame.

Parameters:
  • upload (bool) - A flag which if True will cause the frame to send data to the relax data store. If False, data will be downloaded from the relax data store to update the frame.