Package gui :: Package analyses :: Module base :: Class Base_analysis
[hide private]
[frames] | no frames]

Class Base_analysis

source code


The base class for all frames.

Instance Methods [hide private]
 
__init__(self, parent, id=wx.ID_ANY, pos=None, size=None, style=None, name=None, gui=None)
Initialise the scrolled window.
source code
wx.lib.buttons.ThemedGenBitmapTextButton instance
add_button_open(self, box, parent, icon=paths.icon_16x16.open, text=" Change", fn=None, width=-1, height=-1)
Add a button for opening and changing files and directories.
source code
wx.lib.buttons.ThemedGenBitmapTextButton instance
add_execute_relax(self, box, method)
Create and add the relax execution GUI element to the given box.
source code
control object
add_spin_control(self, box, parent, text='', min=None, max=None, control=wx.SpinCtrl, width=-1, height=-1)
Add a text control field to the box.
source code
 
add_spin_systems(self, box, parent)
Add a special control for spin systems.
source code
wx.StaticText instance
add_static_text(self, box, parent, text='', width=-1, height=-1)
Add a text control field to the box.
source code
 
add_subtitle(self, box, text)
Create and add the subtitle.
source code
 
add_subsubtitle(self, box, text)
Create and add the subsubtitle.
source code
control object
add_text_control(self, box, parent, text='', control=wx.TextCtrl, width=-1, height=-1, editable=True)
Add a text control field to the box.
source code
 
add_title(self, box, text)
Create and add the frame title.
source code
wx.BoxSizer instance
build_left_box(self)
Construct the left hand box to pack into the automatic Rx analysis frame.
source code
 
build_main_box(self, box)
Construct the highest level box to pack into the automatic analysis frames.
source code
 
launch_spin_editor(self, event)
The spin editor GUI element.
source code
 
observer_register(self, remove=False)
Register and unregister methods with the observer objects.
source code
 
resize(self, event)
The spin editor GUI element.
source code
str
spin_count(self)
Count the number of loaded spins, returning a string formatted as 'xxx spins loaded'.
source code
 
update_spin_count(self)
Update the spin count.
source code

Inherited from wx.lib.scrolledpanel.ScrolledPanel: OnChildFocus, ScrollChildIntoView, SetupScrolling

Inherited from wx.lib.scrolledpanel.ScrolledPanel (private): _SetupAfter

Class Variables [hide private]
  border = 10
  size_graphic_panel = 200
  spacer_horizontal = 5
  width_text = 240
  width_button = 100
  width_main_separator = 40
Method Details [hide private]

__init__(self, parent, id=wx.ID_ANY, pos=None, size=None, style=None, name=None, gui=None)
(Constructor)

source code 

Initialise the scrolled window.

Parameters:
  • parent (wx object) - The parent wx element.
  • id (int) - The unique ID number.
  • pos (wx.Size object) - The position.
  • size (wx.Size object) - The size.
  • style (int) - The style.
  • name (unicode) - The name for the panel.
Overrides: wx.lib.scrolledpanel.ScrolledPanel.__init__

add_button_open(self, box, parent, icon=paths.icon_16x16.open, text=" Change", fn=None, width=-1, height=-1)

source code 

Add a button for opening and changing files and directories.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the control into.
  • parent (wx object) - The parent GUI element.
  • icon (str) - The path of the icon to use for the button.
  • text (str) - The text to display on the button.
  • fn (func) - The function or method to execute when clicking on the button.
  • width (int) - The minimum width of the control.
  • height (int) - The minimum height of the control.
Returns: wx.lib.buttons.ThemedGenBitmapTextButton instance
The button.

add_execute_relax(self, box, method)

source code 

Create and add the relax execution GUI element to the given box.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the relax execution GUI element into.
  • method (method) - The method to execute when the button is clicked.
Returns: wx.lib.buttons.ThemedGenBitmapTextButton instance
The button.

add_spin_control(self, box, parent, text='', min=None, max=None, control=wx.SpinCtrl, width=-1, height=-1)

source code 

Add a text control field to the box.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the control into.
  • parent (wx object) - The parent GUI element.
  • text (str) - The default text of the control.
  • min (int) - The minimum value allowed.
  • max (int) - The maximum value allowed.
  • control (wx.TextCtrl derived class) - The control class to use.
  • width (int) - The minimum width of the control.
  • height (int) - The minimum height of the control.
Returns: control object
The text control object.

add_spin_systems(self, box, parent)

source code 

Add a special control for spin systems.

Only one of these per analysis are allowed.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the control into.
  • parent (wx object) - The parent GUI element.

add_static_text(self, box, parent, text='', width=-1, height=-1)

source code 

Add a text control field to the box.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the control into.
  • parent (wx object) - The parent GUI element.
  • text (str) - The default text of the control.
  • width (int) - The minimum width of the control.
  • height (int) - The minimum height of the control.
Returns: wx.StaticText instance
The label.

add_subtitle(self, box, text)

source code 

Create and add the subtitle.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the subtitle into.
  • text (str) - The text of the subtitle.

add_subsubtitle(self, box, text)

source code 

Create and add the subsubtitle.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the text into.
  • text (str) - The text of the subsubtitle.

add_text_control(self, box, parent, text='', control=wx.TextCtrl, width=-1, height=-1, editable=True)

source code 

Add a text control field to the box.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the control into.
  • parent (wx object) - The parent GUI element.
  • text (str) - The default text of the control.
  • control (wx.TextCtrl derived class) - The control class to use.
  • width (int) - The minimum width of the control.
  • height (int) - The minimum height of the control.
  • editable (bool) - A flag specifying if the control is editable or not.
Returns: control object
The text control object.

add_title(self, box, text)

source code 

Create and add the frame title.

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the frame title into.
  • text (str) - The text of the title.

build_left_box(self)

source code 

Construct the left hand box to pack into the automatic Rx analysis frame.

Returns: wx.BoxSizer instance
The left hand box element containing the bitmap.

build_main_box(self, box)

source code 

Construct the highest level box to pack into the automatic analysis frames.

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

launch_spin_editor(self, event)

source code 

The spin editor GUI element.

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

observer_register(self, remove=False)

source code 

Register and unregister methods with the observer objects.

This is a dummy method.

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

resize(self, event)

source code 

The spin editor GUI element.

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

spin_count(self)

source code 

Count the number of loaded spins, returning a string formatted as 'xxx spins loaded'.

Returns: str
The number of loaded spins in the format 'xxx spins loaded'.