Changeset b500652 in sasview for calculatorview/perspectives/calculator
- Timestamp:
- Mar 30, 2010 4:44:30 PM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 328c328
- Parents:
- 378d2eb
- Location:
- calculatorview/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/calculator.py
r378d2eb rb500652 109 109 slit_length_help = "Provides computation related to Scattering Length density" 110 110 return [("SLD Calculator", sld_help, self.on_calculate_sld), 111 ("Slit Si de Calculator", slit_length_help,111 ("Slit Size Calculator", slit_length_help, 112 112 self.on_calculate_slit_size)] 113 113 -
calculatorview/perspectives/calculator/slit_length_calculator_panel.py
r378d2eb rb500652 22 22 if sys.platform.count("win32") > 0: 23 23 PANEL_WIDTH = 500 24 PANEL_HEIGHT = 19024 PANEL_HEIGHT = 200 25 25 FONT_VARIANT = 0 26 26 else: 27 27 PANEL_WIDTH = 530 28 PANEL_HEIGHT = 2 2028 PANEL_HEIGHT = 230 29 29 FONT_VARIANT = 1 30 30 … … 35 35 """ 36 36 ## Internal nickname for the window, used by the AUI manager 37 window_name = "Slit LengthCalculator"37 window_name = "Slit Size Calculator" 38 38 ## Name to appear on the window title bar 39 window_caption = "Slit LengthCalculator"39 window_caption = "Slit Size Calculator" 40 40 ## Flag to tell the AUI manager to put this panel in the center pane 41 41 CENTER_PANE = True … … 63 63 self.data_name_sizer = wx.BoxSizer(wx.HORIZONTAL) 64 64 self.slit_size_sizer = wx.BoxSizer(wx.HORIZONTAL) 65 self.hint_sizer = wx.BoxSizer(wx.HORIZONTAL) 65 66 self.button_sizer = wx.BoxSizer(wx.HORIZONTAL) 66 67 … … 84 85 Fill the sizer containing slit size information 85 86 """ 86 slit_size_txt = wx.StaticText(self, -1, ' Slit Size: ')87 slit_size_txt = wx.StaticText(self, -1, 'Full Slit Size: ') 87 88 self.slit_size_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 88 89 slit_size_hint = " Estimated slit size" … … 97 98 (self.slit_size_unit_tcl, 0, wx.LEFT, 10)]) 98 99 100 def _layout_hint(self): 101 """ 102 Fill the sizer containing hint 103 """ 104 hint_msg = "This calculation works only for SAXSess beam profile data." 105 self.hint_txt = wx.StaticText(self, -1, hint_msg) 106 self.hint_sizer.AddMany([(self.hint_txt, 0, wx.LEFT, 15)]) 107 99 108 def _layout_button(self): 100 109 """ … … 103 112 self.bt_close = wx.Button(self, wx.ID_CANCEL,'Close') 104 113 self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 105 self.bt_close.SetToolTipString(" Apply current changes to the source.")114 self.bt_close.SetToolTipString("Close this window.") 106 115 self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 390)]) 107 116 … … 113 122 self._layout_data_name() 114 123 self._layout_slit_size() 124 self._layout_hint() 115 125 self._layout_button() 116 126 self.boxsizer_source.AddMany([(self.data_name_sizer, 0, 117 127 wx.EXPAND|wx.TOP|wx.BOTTOM, 5), 118 128 (self.slit_size_sizer, 0, 129 wx.EXPAND|wx.TOP|wx.BOTTOM, 5), 130 (self.hint_sizer, 0, 119 131 wx.EXPAND|wx.TOP|wx.BOTTOM, 5)]) 120 132 self.main_sizer.AddMany([(self.boxsizer_source, 0, wx.ALL, 10), 121 133 (self.button_sizer, 0, 122 134 wx.EXPAND|wx.TOP|wx.BOTTOM, 5)]) 123 124 135 self.SetSizer(self.main_sizer) 125 136 self.SetAutoLayout(True) … … 203 214 if self.parent.parent is None: 204 215 return 205 msg = "Slit LengthCalculator: %s"%(sys.exc_value)216 msg = "Slit Size Calculator: %s"%(sys.exc_value) 206 217 wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop')) 207 218 return … … 215 226 216 227 class SlitLengthCalculatorWindow(wx.Frame): 217 def __init__(self, parent=None, id=1, title="Slit LengthCalculator"):228 def __init__(self, parent=None, id=1, title="Slit Size Calculator"): 218 229 wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT)) 219 230 self.parent = parent
Note: See TracChangeset
for help on using the changeset viewer.