Changeset 8f02f7f in sasview for src/sas/sasgui/perspectives/fitting
- Timestamp:
- Dec 5, 2016 2:57:20 AM (8 years ago)
- Children:
- 71ac835
- Parents:
- 075c460
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
r6b59bb3 r8f02f7f 45 45 from sas.sasgui.guiframe.gui_manager import MDIFrame 46 46 from sas.sasgui.guiframe.documentation_window import DocumentationWindow 47 from sas.sasgui.perspectives.fitting.gpu_options import GpuOptions 47 48 48 49 from . import models … … 810 811 Make the Fit Results panel visible. 811 812 """ 812 import sas.sasgui.perspectives.fitting.gpu_options as GpuOptions 813 dialog = GpuOptions.GpuOptions(None, -1, "") 813 dialog = GpuOptions(None, wx.ID_ANY, "") 814 814 dialog.Show() 815 815 -
src/sas/sasgui/perspectives/fitting/gpu_options.py
r075c460 r8f02f7f 1 1 ''' 2 Module provides dialog for setting SAS_OPENCL variable, which defines 3 device choice for OpenCL calculation 4 2 5 Created on Nov 29, 2016 3 6 … … 7 10 import os 8 11 import warnings 9 10 12 import wx 11 import wx.richtext12 import wx.lib.hyperlink13 13 14 14 from sas.sasgui.guiframe.documentation_window import DocumentationWindow … … 16 16 class GpuOptions(wx.Dialog): 17 17 """ 18 " Acknowledgement" Dialog Box18 "OpenCL options" Dialog Box 19 19 20 Shows the current method for acknowledging SasView in21 scholarly publications.20 Provides dialog for setting SAS_OPENCL variable, which defines 21 device choice for OpenCL calculation 22 22 23 23 """ … … 42 42 else: 43 43 self.option_button[clopt] = "None" 44 self.Bind(wx.EVT_CHECKBOX, self.on_ radio, id=button.GetId())44 self.Bind(wx.EVT_CHECKBOX, self.on_check, id=button.GetId()) 45 45 self.buttons.append(button) 46 46 boxsizer.Add(button, 0, 0) … … 61 61 help_btn.SetToolTipString("Help on the GPU options") 62 62 63 self.Bind(wx.EVT_BUTTON, self.on_ accept, accept_btn)63 self.Bind(wx.EVT_BUTTON, self.on_OK, accept_btn) 64 64 self.Bind(wx.EVT_BUTTON, self.on_help, help_btn) 65 self.Bind(wx.EVT_CLOSE, self.on_close)66 65 67 66 btn_sizer = wx.BoxSizer(wx.HORIZONTAL) … … 93 92 return clinfo 94 93 95 def on_radio_default(self, event): 96 event.GetEventObject().SetValue(not event.GetEventObject().GetValue()) 97 98 def on_radio(self, event): 94 def on_check(self, event): 99 95 """ 100 96 Action triggered when button is selected … … 102 98 :return: 103 99 """ 104 import sasmodels105 100 selected_button = event.GetEventObject() 106 101 for btn in self.buttons: … … 108 103 btn.SetValue(0) 109 104 os.environ["SAS_OPENCL"] = self.option_button[selected_button.Name] 105 106 def on_OK(self, event): 107 """ 108 Close window on accpetance 109 """ 110 import sasmodels 110 111 sasmodels.kernelcl.ENV = None 111 112 #Need to reload sasmodels.core module to account SAS_OPENCL = "None" 112 113 reload(sasmodels.core) 113 114 def on_accept(self, event):115 """116 Close window on accpetance117 """118 114 event.Skip() 119 115 … … 126 122 DocumentationWindow(self, -1, 127 123 TreeLocation, anchor, "OpenCL Options Help") 128 129 def on_close(self, event):130 """131 Close window132 """133 event.Skip()
Note: See TracChangeset
for help on using the changeset viewer.