Changeset 49ab5d7 in sasview for src/sas/perspectives/calculator/sld_panel.py
- Timestamp:
- Mar 4, 2015 3:28:39 PM (10 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:
- 2f732b0
- Parents:
- 76aed53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/sld_panel.py
r33f551f r49ab5d7 12 12 from sas.guiframe.utils import format_number 13 13 from sas.guiframe.utils import check_float 14 from sas.guiframe.events import StatusEvent 14 from sas.guiframe.events import StatusEvent 15 15 16 16 # the calculator default value for wavelength is 6 … … 20 20 from periodictable.xsf import xray_sld_from_atoms 21 21 from periodictable.nsf import neutron_scattering 22 from sas.perspectives.calculator import calculator_widgets as widget 22 from sas.perspectives.calculator import calculator_widgets as widget 23 23 from sas.guiframe.documentation_window import DocumentationWindow 24 24 25 25 WAVELENGTH = 6.0 26 26 _BOX_WIDTH = 76 … … 37 37 PANEL_SIZE = 410 38 38 FONT_VARIANT = 1 39 39 40 40 class SldPanel(wx.Panel, PanelBase): 41 41 """ … … 48 48 ## Flag to tell the AUI manager to put this panel in the center pane 49 49 CENTER_PANE = True 50 50 51 51 def __init__(self, parent, base=None, *args, **kwds): 52 52 """ … … 79 79 self.SetAutoLayout(True) 80 80 self.Layout() 81 81 82 82 def _do_layout(self): 83 83 """ … … 99 99 boxsizer1 = wx.StaticBoxSizer(inputbox, wx.VERTICAL) 100 100 boxsizer1.SetMinSize((_STATICBOX_WIDTH, -1)) 101 101 102 102 compound_txt = wx.StaticText(self, -1, 'Compound ') 103 self.compound_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH *2, -1))103 self.compound_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH * 2, -1)) 104 104 density_txt = wx.StaticText(self, -1, 'Density ') 105 105 self.density_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1)) … … 112 112 ix = 0 113 113 sizer_input.Add(compound_txt, (iy, ix), (1, 1), 114 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)114 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 115 115 ix += 1 116 116 sizer_input.Add(self.compound_ctl, (iy, ix), (1, 1), 117 wx.EXPAND |wx.ADJUST_MINSIZE, 0)117 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 118 118 iy += 1 119 119 ix = 0 120 120 sizer_input.Add(density_txt, (iy, ix), (1, 1), 121 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)121 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 122 122 ix += 1 123 123 sizer_input.Add(self.density_ctl, (iy, ix), (1, 1), 124 wx.EXPAND |wx.ADJUST_MINSIZE, 0)125 ix += 1126 sizer_input.Add(unit_density_txt, (iy, ix), (1, 1),127 wx.EXPAND |wx.ADJUST_MINSIZE, 0)124 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 125 ix += 1 126 sizer_input.Add(unit_density_txt, (iy, ix), (1, 1), 127 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 128 128 iy += 1 129 129 ix = 0 130 130 sizer_input.Add(wavelength_txt, (iy, ix), (1, 1), 131 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)131 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 132 132 ix += 1 133 133 sizer_input.Add(self.wavelength_ctl, (iy, ix), (1, 1), 134 wx.EXPAND |wx.ADJUST_MINSIZE, 0)134 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 135 135 ix += 1 136 136 sizer_input.Add(unit_a_txt, (iy, ix), (1, 1), 137 wx.EXPAND |wx.ADJUST_MINSIZE, 0)137 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 138 138 boxsizer1.Add(sizer_input) 139 139 sizer1.Add(boxsizer1, 0, wx.EXPAND | wx.ALL, 10) … … 142 142 boxsizer2 = wx.StaticBoxSizer(outputbox, wx.VERTICAL) 143 143 boxsizer2.SetMinSize((_STATICBOX_WIDTH, -1)) 144 144 145 145 i_complex = '- i' 146 146 neutron_sld_txt = wx.StaticText(self, -1, 'Neutron SLD') … … 149 149 self.neutron_sld_real_ctl.SetEditable(False) 150 150 self.neutron_sld_real_ctl.SetToolTipString("Neutron SLD real.") 151 self.neutron_sld_im_ctl = wx.TextCtrl(self, -1, 151 self.neutron_sld_im_ctl = wx.TextCtrl(self, -1, 152 152 size=(_BOX_WIDTH, -1)) 153 153 self.neutron_sld_im_ctl.SetEditable(False) 154 154 self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary.") 155 155 neutron_sld_units_txt = wx.StaticText(self, -1, unit_sld) 156 156 157 157 cu_ka_sld_txt = wx.StaticText(self, -1, 'Cu Ka SLD') 158 158 self.cu_ka_sld_real_ctl = wx.TextCtrl(self, -1, … … 160 160 self.cu_ka_sld_real_ctl.SetEditable(False) 161 161 self.cu_ka_sld_real_ctl.SetToolTipString("Cu Ka SLD real.") 162 self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1, 162 self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1, 163 163 size=(_BOX_WIDTH, -1)) 164 164 self.cu_ka_sld_im_ctl.SetEditable(False) 165 165 self.cu_ka_sld_im_ctl.SetToolTipString("Cu Ka SLD imaginary.") 166 166 cu_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld) 167 167 168 168 mo_ka_sld_txt = wx.StaticText(self, -1, 'Mo Ka SLD') 169 169 self.mo_ka_sld_real_ctl = wx.TextCtrl(self, -1, … … 176 176 self.mo_ka_sld_im_ctl.SetToolTipString("Mo Ka SLD imaginary.") 177 177 mo_ka_sld_units_txt = wx.StaticText(self, -1, unit_sld) 178 178 179 179 neutron_inc_txt = wx.StaticText(self, -1, 'Neutron Inc. Xs') 180 180 self.neutron_inc_ctl = wx.TextCtrl(self, -1, … … 182 182 self.neutron_inc_ctl.SetEditable(False) 183 183 self.neutron_inc_ctl.SetToolTipString("Neutron Inc. Xs") 184 neutron_inc_units_txt = wx.StaticText(self, -1, 185 186 neutron_abs_txt = wx.StaticText(self, -1, 'Neutron Abs. Xs') 187 self.neutron_abs_ctl = wx.TextCtrl(self, -1, 184 neutron_inc_units_txt = wx.StaticText(self, -1, unit_cm1) 185 186 neutron_abs_txt = wx.StaticText(self, -1, 'Neutron Abs. Xs') 187 self.neutron_abs_ctl = wx.TextCtrl(self, -1, 188 188 size=(_BOX_WIDTH, -1)) 189 189 self.neutron_abs_ctl.SetEditable(False) 190 190 self.neutron_abs_ctl.SetToolTipString("Neutron Abs. Xs") 191 neutron_abs_units_txt = wx.StaticText(self, -1, 192 191 neutron_abs_units_txt = wx.StaticText(self, -1, unit_cm1) 192 193 193 neutron_length_txt = wx.StaticText(self, -1, 'Neutron 1/e length') 194 194 self.neutron_length_ctl = wx.TextCtrl(self, -1, … … 196 196 self.neutron_length_ctl.SetEditable(False) 197 197 self.neutron_length_ctl.SetToolTipString("Neutron 1/e length") 198 neutron_length_units_txt = wx.StaticText(self, -1, 199 198 neutron_length_units_txt = wx.StaticText(self, -1, unit_cm) 199 200 200 iy = 0 201 201 ix = 0 202 202 sizer_output.Add(neutron_sld_txt, (iy, ix), (1, 1), 203 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)203 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 204 204 ix += 1 205 205 sizer_output.Add(self.neutron_sld_real_ctl, (iy, ix), (1, 1), 206 wx.EXPAND |wx.ADJUST_MINSIZE, 0)206 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 207 207 ix += 1 208 208 sizer_output.Add(wx.StaticText(self, -1, i_complex), 209 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)209 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 210 210 ix += 1 211 211 sizer_output.Add(self.neutron_sld_im_ctl, 212 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)212 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 213 213 ix += 1 214 214 sizer_output.Add(neutron_sld_units_txt, 215 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)215 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 216 216 iy += 1 217 217 ix = 0 218 218 sizer_output.Add(cu_ka_sld_txt, (iy, ix), (1, 1), 219 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)219 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 220 220 ix += 1 221 221 sizer_output.Add(self.cu_ka_sld_real_ctl, (iy, ix), (1, 1), 222 wx.EXPAND |wx.ADJUST_MINSIZE, 0)222 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 223 223 ix += 1 224 224 sizer_output.Add(wx.StaticText(self, -1, i_complex), 225 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)225 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 226 226 ix += 1 227 227 sizer_output.Add(self.cu_ka_sld_im_ctl, 228 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)228 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 229 229 ix += 1 230 230 sizer_output.Add(cu_ka_sld_units_txt, 231 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)232 iy += 1 233 ix = 0 234 sizer_output.Add(mo_ka_sld_txt, (iy, ix), (1, 1),235 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)236 ix += 1 237 sizer_output.Add(self.mo_ka_sld_real_ctl, (iy, ix), (1, 1),238 wx.EXPAND |wx.ADJUST_MINSIZE, 0)231 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 232 iy += 1 233 ix = 0 234 sizer_output.Add(mo_ka_sld_txt, (iy, ix), (1, 1), 235 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 236 ix += 1 237 sizer_output.Add(self.mo_ka_sld_real_ctl, (iy, ix), (1, 1), 238 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 239 239 ix += 1 240 240 sizer_output.Add(wx.StaticText(self, -1, i_complex), 241 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)241 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 242 242 ix += 1 243 243 sizer_output.Add(self.mo_ka_sld_im_ctl, 244 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)244 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 245 245 ix += 1 246 246 sizer_output.Add(mo_ka_sld_units_txt, 247 (iy, ix), (1, 1), wx.EXPAND |wx.ADJUST_MINSIZE, 0)247 (iy, ix), (1, 1), wx.EXPAND | wx.ADJUST_MINSIZE, 0) 248 248 iy += 1 249 249 ix = 0 250 250 sizer_output.Add(neutron_inc_txt, (iy, ix), (1, 1), 251 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)251 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 252 252 ix += 1 253 253 sizer_output.Add(self.neutron_inc_ctl, (iy, ix), (1, 1), 254 wx.EXPAND |wx.ADJUST_MINSIZE, 0)254 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 255 255 ix += 2 256 sizer_output.Add(neutron_inc_units_txt, (iy, ix), (1, 1),257 wx.EXPAND |wx.ADJUST_MINSIZE, 0)256 sizer_output.Add(neutron_inc_units_txt, (iy, ix), (1, 1), 257 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 258 258 iy += 1 259 259 ix = 0 260 260 sizer_output.Add(neutron_abs_txt, (iy, ix), (1, 1), 261 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)261 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 262 262 ix += 1 263 263 sizer_output.Add(self.neutron_abs_ctl, (iy, ix), (1, 1), 264 wx.EXPAND |wx.ADJUST_MINSIZE, 0)264 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 265 265 ix += 2 266 266 sizer_output.Add(neutron_abs_units_txt, (iy, ix), (1, 1), 267 wx.EXPAND |wx.ADJUST_MINSIZE, 0)267 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 268 268 iy += 1 269 269 ix = 0 270 270 sizer_output.Add(neutron_length_txt, (iy, ix), (1, 1), 271 wx.LEFT |wx.EXPAND|wx.ADJUST_MINSIZE, 15)271 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 272 272 ix += 1 273 273 sizer_output.Add(self.neutron_length_ctl, (iy, ix), (1, 1), 274 wx.EXPAND |wx.ADJUST_MINSIZE, 0)274 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 275 275 ix += 2 276 276 sizer_output.Add(neutron_length_units_txt, (iy, ix), (1, 1), 277 wx.EXPAND |wx.ADJUST_MINSIZE, 0)277 wx.EXPAND | wx.ADJUST_MINSIZE, 0) 278 278 boxsizer2.Add(sizer_output) 279 sizer2.Add(boxsizer2, 0, wx.EXPAND |wx.ALL, 10)279 sizer2.Add(boxsizer2, 0, wx.EXPAND | wx.ALL, 10) 280 280 #-----Button sizer------------ 281 281 282 282 id = wx.NewId() 283 283 self.button_calculate = wx.Button(self, id, "Calculate") 284 284 self.button_calculate.SetToolTipString("Calculate SLD.") 285 self.Bind(wx.EVT_BUTTON, self.calculateSld, id=id) 286 285 self.Bind(wx.EVT_BUTTON, self.calculateSld, id=id) 286 287 287 id = wx.NewId() 288 288 self.button_help = wx.Button(self, id, "HELP") 289 289 self.button_help.SetToolTipString("help on SLD calculator.") 290 self.Bind(wx.EVT_BUTTON, self.on_help, id=id) 291 292 sizer_button.Add((150, 20), 1, wx.EXPAND |wx.ADJUST_MINSIZE, 0)293 sizer_button.Add(self.button_calculate, 0, wx.RIGHT |wx.ADJUST_MINSIZE, 20)294 sizer_button.Add(self.button_help, 0, wx.RIGHT |wx.ADJUST_MINSIZE, 20)290 self.Bind(wx.EVT_BUTTON, self.on_help, id=id) 291 292 sizer_button.Add((150, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 293 sizer_button.Add(self.button_calculate, 0, wx.RIGHT | wx.ADJUST_MINSIZE, 20) 294 sizer_button.Add(self.button_help, 0, wx.RIGHT | wx.ADJUST_MINSIZE, 20) 295 295 sizer3.Add(sizer_button) 296 296 #---------layout---------------- 297 vbox 297 vbox = wx.BoxSizer(wx.VERTICAL) 298 298 vbox.Add(sizer1) 299 299 vbox.Add(sizer2) 300 300 vbox.Add(sizer3) 301 vbox.Fit(self) 301 vbox.Fit(self) 302 302 self.SetSizer(vbox) 303 304 def on_help(self, event): 303 304 def on_help(self, event): 305 305 """ 306 306 Bring up the SLD Documentation whenever 307 the HELP button is clicked. 308 307 the HELP button is clicked. 308 309 309 Calls DocumentationWindow with the path of the location within the 310 documentation tree (after /doc/ ....". Note that when using old 311 versions of Wx (before 2.9) and thus not the release version of 312 installers, the help comes up at the top level of the file as 310 documentation tree (after /doc/ ....". Note that when using old 311 versions of Wx (before 2.9) and thus not the release version of 312 installers, the help comes up at the top level of the file as 313 313 webbrowser does not pass anything past the # to the browser when it is 314 314 running "file:///...." 315 315 316 316 :param evt: Triggers on clicking the help button 317 317 """ 318 318 319 319 _TreeLocation = "user/perspectives/calculator/sld_calculator_help.html" 320 320 _doc_viewer = DocumentationWindow(self, -1, \ 321 _TreeLocation, "General Scattering Calculator Help")321 _TreeLocation, "General Scattering Calculator Help") 322 322 323 323 def calculate_xray_sld(self, element): 324 324 """ 325 325 Get an element and compute the corresponding SLD for a given formula 326 326 327 327 :param element: elements a string of existing atom 328 328 329 329 """ 330 330 myformula = formula(str(element)) 331 331 if len(myformula.atoms) != 1: 332 return 333 element = myformula.atoms.keys()[0] 332 return 333 element = myformula.atoms.keys()[0] 334 334 energy = xray_energy(element.K_alpha) 335 335 336 336 self.sld_formula = formula(str(self.compound), density=self.density) 337 337 atom = self.sld_formula.atoms 338 return xray_sld_from_atoms(atom, density=self.density, energy= 339 338 return xray_sld_from_atoms(atom, density=self.density, energy=energy) 339 340 340 def check_inputs(self): 341 341 """Check validity user inputs""" … … 347 347 flag = False 348 348 msg += "Error for Density value :expect float" 349 349 350 350 self.wavelength = self.wavelength_ctl.GetValue() 351 351 if str(self.wavelength).lstrip().rstrip() == "": … … 361 361 flag = False 362 362 msg += "Error for wavelength value :expect float" 363 363 364 364 self.compound = self.compound_ctl.GetValue().lstrip().rstrip() 365 365 if self.compound != "": … … 379 379 msg += "Enter a formula" 380 380 return flag, msg 381 381 382 382 def calculate_sld_helper(self, element, density, molecule_formula): 383 383 """ 384 384 Get an element and compute the corresponding SLD for a given formula 385 385 386 386 :param element: elements a string of existing atom 387 387 388 388 """ 389 389 element_formula = formula(str(element)) 390 390 if len(element_formula.atoms) != 1: 391 return 392 element = element_formula.atoms.keys()[0] 391 return 392 element = element_formula.atoms.keys()[0] 393 393 energy = xray_energy(element.K_alpha) 394 394 atom = molecule_formula.atoms … … 408 408 wx.PostEvent(self.base, StatusEvent(status=msg)) 409 409 if not flag: 410 return 410 return 411 411 #get ready to compute 412 412 self.sld_formula = formula(self.compound, … … 414 414 (sld_real, sld_im, _), (_, absorp, incoh), \ 415 415 length = neutron_scattering(compound=self.compound, 416 density=self.density, 417 wavelength=self.wavelength) 416 density=self.density, 417 wavelength=self.wavelength) 418 418 cu_real, cu_im = self.calculate_sld_helper(element="Cu", 419 419 density=self.density, 420 420 molecule_formula=self.sld_formula) 421 mo_real, mo_im = self.calculate_sld_helper(element="Mo", 421 mo_real, mo_im = self.calculate_sld_helper(element="Mo", 422 422 density=self.density, 423 423 molecule_formula=self.sld_formula) … … 428 428 self.neutron_sld_im_ctl.SetValue(val) 429 429 # Compute the Cu SLD 430 self.cu_ka_sld_real_ctl.SetValue(format_number(cu_real * _SCALE))431 val = format_number(math.fabs(cu_im )* _SCALE)430 self.cu_ka_sld_real_ctl.SetValue(format_number(cu_real * _SCALE)) 431 val = format_number(math.fabs(cu_im) * _SCALE) 432 432 self.cu_ka_sld_im_ctl.SetValue(val) 433 433 # Compute the Mo SLD 434 self.mo_ka_sld_real_ctl.SetValue(format_number(mo_real * _SCALE))435 val = format_number(math.fabs(mo_im) * _SCALE)434 self.mo_ka_sld_real_ctl.SetValue(format_number(mo_real * _SCALE)) 435 val = format_number(math.fabs(mo_im) * _SCALE) 436 436 self.mo_ka_sld_im_ctl.SetValue(val) 437 437 # set incoherence and absorption … … 444 444 except: 445 445 if self.base is not None: 446 msg = "SLD Calculator: %s" %(sys.exc_value)446 msg = "SLD Calculator: %s" % (sys.exc_value) 447 447 wx.PostEvent(self.base, StatusEvent(status=msg)) 448 448 if event is not None: 449 449 event.Skip() 450 450 451 451 def clear_outputs(self): 452 452 """ … … 462 462 self.neutron_inc_ctl.SetValue("") 463 463 self.neutron_length_ctl.SetValue("") 464 465 464 465 466 466 class SldWindow(widget.CHILD_FRAME): 467 467 """ 468 468 """ 469 469 def __init__(self, parent=None, title="SLD Calculator", 470 base=None, manager=None, 470 base=None, manager=None, 471 471 size=(PANEL_SIZE, PANEL_SIZE), *args, **kwds): 472 472 """ … … 484 484 self.SetPosition((20, 10)) 485 485 self.Show(True) 486 486 487 487 def on_close(self, event): 488 488 """ … … 492 492 self.manager.sld_frame = None 493 493 self.Destroy() 494 495 494 495 496 496 class ViewApp(wx.App): 497 497 """ … … 501 501 """ 502 502 widget.CHILD_FRAME = wx.Frame 503 frame = SldWindow(None, title='SLD Calculator') 503 frame = SldWindow(None, title='SLD Calculator') 504 504 frame.Show(True) 505 505 self.SetTopWindow(frame) 506 506 return True 507 508 509 if __name__ == "__main__": 507 508 509 if __name__ == "__main__": 510 510 app = ViewApp(0) 511 app.MainLoop() 511 app.MainLoop()
Note: See TracChangeset
for help on using the changeset viewer.