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]
EvtHandler
__init__(self, parent, id=-1, 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=u'/data/relax/relax/graphics/oxygen_icons/16x16/actions/docume..., 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_analysis(self, box, method)
Create and add the analysis execution GUI element to the given box.
source code
control object
add_spin_control(self, box, parent, text='', min=None, max=None, control=<class 'wx._controls.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_subsubtitle(self, box, text)
Create and add the subsubtitle.
source code
 
add_subtitle(self, box, text)
Create and add the subtitle.
source code
control object
add_text_control(self, box, parent, text='', control=<class 'wx._controls.TextCtrl'>, width=-1, height=-1, editable=True)
Add a text control field to the box.
source code
 
add_title(self, box, text, top_spacing=10, bottom_spacing=15)
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

Inherited from wx._windows.PyScrolledWindow: DoEraseBackground, DoGetBestSize, DoGetClientSize, DoGetPosition, DoGetSize, DoGetVirtualSize, DoMoveWindow, DoSetClientSize, DoSetSize, DoSetVirtualSize, GetDefaultAttributes, OnInternalIdle, SetBestSize, base_AcceptsFocus, base_AcceptsFocusFromKeyboard, base_AddChild, base_DoGetBestSize, base_DoGetClientSize, base_DoGetPosition, base_DoGetSize, base_DoGetVirtualSize, base_DoMoveWindow, base_DoSetClientSize, base_DoSetSize, base_DoSetVirtualSize, base_Enable, base_GetDefaultAttributes, base_GetMaxSize, base_InitDialog, base_OnInternalIdle, base_RemoveChild, base_ShouldInheritColours, base_TransferDataFromWindow, base_TransferDataToWindow, base_Validate

Inherited from wx._windows.PyScrolledWindow (private): _setCallbackInfo

Inherited from wx._windows.ScrolledWindow: Create, __repr__

Inherited from wx._windows.Panel: SetFocusIgnoringChildren

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AlwaysShowScrollbars, AssociateHandle, CacheBestSize, CanAcceptFocus, CanAcceptFocusFromKeyboard, CanApplyThemeBorder, CanBeOutsideClientArea, CanScroll, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMainWindowOfCompositeControl, GetMaxClientSize, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinClientSize, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetNextSibling, GetParent, GetPopupMenuSelectionFromUser, GetPosition, GetPositionTuple, GetPrevSibling, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HandleAsNavigationKey, HandleWindowEvent, HasCapture, HasExtraStyle, HasFlag, HasFocus, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HideWithEffect, HitTest, HitTestXY, InformFirstDirection, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsScrollbarAlwaysShown, IsShown, IsShownOnScreen, IsThisEnabled, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, NavigateIn, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PostSizeEvent, PostSizeEventToParent, ProcessWindowEvent, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendIdleEvents, SendSizeEvent, SendSizeEventToParent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCanFocus, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxClientSize, SetMaxSize, SetMinClientSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, ShowWithEffect, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, UnsetToolTip, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, DeletePendingEvents, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, IsUnlinked, ProcessEvent, ProcessEventLocally, ProcessPendingEvents, QueueEvent, SafelyProcessEvent, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind, Unlink

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from wx._windows.ScrollHelper: AdjustScrollbars, CalcScrollInc, CalcScrolledPosition, CalcUnscrolledPosition, DisableKeyboardScrolling, DoPrepareDC, EnableScrolling, GetScaleX, GetScaleY, GetScrollLines, GetScrollPageSize, GetScrollPixelsPerUnit, GetTargetRect, GetTargetWindow, GetViewStart, IsAutoScrolling, PrepareDC, Scroll, SendAutoScrollEvents, SetScale, SetScrollPageSize, SetScrollRate, SetScrollbars, SetTargetRect, SetTargetWindow, ShowScrollbars, StopAutoScrolling

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wx._windows.ScrolledWindow: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, ReleaseControlId, UnreserveControlId

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

Inherited from wx._windows.PyScrolledWindow: thisown

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxClientSize, MaxHeight, MaxSize, MaxWidth, MinClientSize, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, ToolTipString, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from wx._windows.ScrollHelper: ScaleX, ScaleY, TargetWindow, ViewStart

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, id=-1, 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.
Returns: EvtHandler
Overrides: object.__init__

add_button_open(self, box, parent, icon=u'/data/relax/relax/graphics/oxygen_icons/16x16/actions/docume..., 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_analysis(self, box, method)

source code 

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

Parameters:
  • box (wx.BoxSizer instance) - The box element to pack the analysis 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=<class 'wx._controls.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_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_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_text_control(self, box, parent, text='', control=<class 'wx._controls.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, top_spacing=10, bottom_spacing=15)

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'.