Changeset 4318af7f in sasview
- Timestamp:
- Jul 9, 2008 10:37:54 AM (16 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:
- 7a2feab
- Parents:
- 8800ff6
- Location:
- prview
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/inversion_panel.py
r357b79b r4318af7f 297 297 298 298 def _do_layout(self): 299 #panel = wx.Panel(self, -1) 300 vbox = wx.BoxSizer(wx.VERTICAL) 301 #vbox.SetMinSize((1000,50)) 299 vbox = wx.GridBagSizer(0,0) 300 iy_vb = 0 302 301 303 302 # ----- I(q) data ----- … … 338 337 pars_sizer.Add(self.bck_chk, (iy,0), (1,2), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 339 338 boxsizer1.Add(pars_sizer, 0, wx.EXPAND) 340 vbox.Add(boxsizer1 )339 vbox.Add(boxsizer1, (iy_vb,0), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 341 340 342 341 # ----- Add slit parameters ----- … … 348 347 sizer_slit = wx.GridBagSizer(5,5) 349 348 350 label_sheight = wx.StaticText(self, -1, "Height", size=( 35,20))351 label_swidth = wx.StaticText(self, -1, "Width", size=( 35,20))349 label_sheight = wx.StaticText(self, -1, "Height", size=(40,20)) 350 label_swidth = wx.StaticText(self, -1, "Width", size=(40,20)) 352 351 #label_sunits1 = wx.StaticText(self, -1, "[A^(-1)]") 353 label_sunits2 = wx.StaticText(self, -1, "[A^(-1)]", size=( 40,20))352 label_sunits2 = wx.StaticText(self, -1, "[A^(-1)]", size=(55,20)) 354 353 self.sheight_ctl = wx.TextCtrl(self, -1, size=(60,20)) 355 354 self.swidth_ctl = wx.TextCtrl(self, -1, size=(60,20)) … … 368 367 369 368 sboxsizer.Add(sizer_slit, wx.TOP, 15) 370 vbox.Add(sboxsizer) 369 iy_vb += 1 370 vbox.Add(sboxsizer, (iy_vb,0), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 371 371 372 372 … … 378 378 sizer_q = wx.GridBagSizer(5,5) 379 379 380 label_qmin = wx.StaticText(self, -1, "Q min", size=( 35,20))381 label_qmax = wx.StaticText(self, -1, "Q max", size=( 35,20))380 label_qmin = wx.StaticText(self, -1, "Q min", size=(40,20)) 381 label_qmax = wx.StaticText(self, -1, "Q max", size=(40,20)) 382 382 #label_qunits1 = wx.StaticText(self, -1, "[A^(-1)]") 383 label_qunits2 = wx.StaticText(self, -1, "[A^(-1)]", size=( 40,20))383 label_qunits2 = wx.StaticText(self, -1, "[A^(-1)]", size=(55,20)) 384 384 self.qmin_ctl = wx.TextCtrl(self, -1, size=(60,20)) 385 385 self.qmax_ctl = wx.TextCtrl(self, -1, size=(60,20)) … … 397 397 sizer_q.Add(label_qunits2, (iy,4), (1,1), wx.LEFT|wx.EXPAND, 5) 398 398 qboxsizer.Add(sizer_q, wx.TOP, 15) 399 vbox.Add(qboxsizer) 399 400 iy_vb += 1 401 vbox.Add(qboxsizer, (iy_vb,0), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 400 402 401 403 … … 472 474 boxsizer2.Add(sizer_params, 0) 473 475 474 vbox.Add(boxsizer2) 476 iy_vb += 1 477 vbox.Add(boxsizer2, (iy_vb,0), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 475 478 476 479 … … 565 568 566 569 ressizer.Add(sizer_res, 0) 567 vbox.Add(ressizer) 570 iy_vb += 1 571 vbox.Add(ressizer, (iy_vb,0), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 0) 568 572 569 573 # ----- Buttons ----- 570 574 static_line = wx.StaticLine(self, -1) 571 vbox.Add(static_line, 0, wx.EXPAND|wx.TOP, 10) 575 iy_vb += 1 576 vbox.Add(static_line, (iy_vb,0), (1,1), wx.EXPAND|wx.TOP, 10) 572 577 573 578 id = wx.NewId() … … 587 592 sizer_button.Add(button_OK, 0, wx.LEFT|wx.ADJUST_MINSIZE, 10) 588 593 #sizer_button.Add(button_Cancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10) 589 vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 594 iy_vb += 1 595 vbox.Add(sizer_button, (iy_vb,0), (1,1), wx.EXPAND|wx.BOTTOM|wx.TOP, 10) 590 596 591 597 -
prview/perspectives/pr/pr_thread.py
r357b79b r4318af7f 1 1 import sys, time 2 2 from calcthread import CalcThread 3 from sans.pr.invertor import Invertor4 import numpy5 from config import printEVT6 3 7 4 class CalcPr(CalcThread): … … 28 25 self.starttime = 0 29 26 30 def isquit(self):31 try:32 CalcThread.isquit(self)33 except KeyboardInterrupt:34 printEVT("P(r) calc interrupted")35 raise KeyboardInterrupt36 37 27 def compute(self): 38 import time 28 """ 29 Perform P(r) inversion 30 """ 39 31 try: 40 32 self.starttime = time.time() … … 46 38 except KeyboardInterrupt: 47 39 # Thread was interrupted, just proceed 48 p rintEVT("P(r) calc interrupted")40 pass 49 41 except: 50 42 if not self.error_func==None: … … 84 76 except KeyboardInterrupt: 85 77 # Thread was interrupted, just proceed 86 p rintEVT("Alpha estimator thread interrupted")78 pass 87 79 except: 88 80 if not self.error_func==None: … … 119 111 Calculates the estimate 120 112 """ 121 import time122 113 try: 123 114 t_0 = time.time() … … 129 120 except KeyboardInterrupt: 130 121 # Thread was interrupted, just proceed 131 p rintEVT("Number of terms thread interrupted")122 pass 132 123 except: 133 124 if not self.error_func==None: -
prview/sansview.py
r2a92852 r4318af7f 6 6 import local_config 7 7 from perspectives.pr.pr import NewPrFileEvent 8 9 # OS-dependent preferred height 10 #TODO: refactor this 11 _DEFAULT_HEIGHT=650 12 import sys 13 if sys.platform.count("darwin")>0: 14 _DEFAULT_HEIGHT=720 8 15 9 16 class PrFrame(gui_manager.ViewerFrame): … … 15 22 #from gui_manager import ViewerFrame 16 23 self.frame = PrFrame(None, -1, local_config.__appname__, 17 window_height= 650, window_width=750)24 window_height=_DEFAULT_HEIGHT, window_width=750) 18 25 self.frame.Show(True) 19 26 20 27 if hasattr(self.frame, 'special'): 21 print "Special?", self.frame.special.__class__.__name__22 28 self.frame.special.SetCurrent() 23 29 self.SetTopWindow(self.frame)
Note: See TracChangeset
for help on using the changeset viewer.