Changeset d5419f7f in sasview
- Timestamp:
- Mar 29, 2015 11:05:43 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:
- a3f125f0
- Parents:
- 60dca65c
- Location:
- src/sas/perspectives/calculator
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/calculator/data_operator.py
r49ab5d7 rd5419f7f 1 1 """ 2 GUI for the data operation 2 GUI for the data operations panel (sum and multiply) 3 3 """ 4 4 import wx … … 17 17 #Control panel width 18 18 if sys.platform.count("win32") > 0: 19 PANEL_TOP = 0 19 20 PANEL_WIDTH = 790 20 21 PANEL_HEIGTH = 370 … … 23 24 ON_MAC = False 24 25 else: 26 PANEL_TOP = 60 25 27 _BOX_WIDTH = 230 26 28 PANEL_WIDTH = 900 … … 963 965 self.panel = DataOperPanel(parent=self) 964 966 wx.EVT_CLOSE(self, self.OnClose) 965 self.SetPosition(( 25, 10))967 self.SetPosition((wx.LEFT, PANEL_TOP)) 966 968 self.Show() 967 969 -
src/sas/perspectives/calculator/density_panel.py
r49ab5d7 rd5419f7f 18 18 #Density panel size 19 19 if sys.platform.count("win32") > 0: 20 PANEL_TOP = 0 20 21 _STATICBOX_WIDTH = 410 21 22 _BOX_WIDTH = 200 … … 23 24 FONT_VARIANT = 0 24 25 else: 26 PANEL_TOP = 60 25 27 _STATICBOX_WIDTH = 430 26 28 _BOX_WIDTH = 200 … … 49 51 # Object that receive status event 50 52 self.base = base 53 self.parent = parent 51 54 # chemeical formula, string 52 55 self.compound = '' … … 211 214 self.Bind(wx.EVT_BUTTON, self.on_help, id=id) 212 215 213 sizer_button.Add((150, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 216 self.button_close = wx.Button(self, wx.ID_CANCEL, 'Close') 217 self.button_close.Bind(wx.EVT_BUTTON, self.on_close) 218 self.button_close.SetToolTipString("Close this window.") 219 220 sizer_button.Add((100, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 214 221 sizer_button.Add(self.button_calculate, 0, 215 222 wx.RIGHT | wx.ADJUST_MINSIZE, 20) 216 223 sizer_button.Add(self.button_help, 0, 224 wx.RIGHT | wx.ADJUST_MINSIZE, 20) 225 sizer_button.Add(self.button_close, 0, 217 226 wx.RIGHT | wx.ADJUST_MINSIZE, 20) 218 227 sizer3.Add(sizer_button) … … 379 388 _TreeLocation, "Density/Volume Calculator Help") 380 389 390 def on_close(self, event): 391 """ 392 close the window containing this panel 393 """ 394 self.parent.Close() 395 381 396 def clear_outputs(self): 382 397 """ … … 415 430 self.panel = DensityPanel(self, base=base) 416 431 self.Bind(wx.EVT_CLOSE, self.on_close) 417 self.SetPosition(( 25, 10))432 self.SetPosition((wx.LEFT, PANEL_TOP)) 418 433 self.Show(True) 419 434 -
src/sas/perspectives/calculator/gen_scatter_panel.py
r60dca65c rd5419f7f 47 47 FONT_VARIANT = 0 48 48 else: 49 PANEL_TOP = 4049 PANEL_TOP = 60 50 50 PANEL_WIDTH = 620 51 51 PANEL_HEIGHT = 370 … … 379 379 self.orient_combo = self._fill_orient_combo() 380 380 self.orient_combo.Show(False) 381 381 382 self.bt_compute = wx.Button(self, wx.NewId(), 'Compute') 382 383 self.bt_compute.Bind(wx.EVT_BUTTON, self.on_compute) 383 384 self.bt_compute.SetToolTipString("Compute 2D Scattering Pattern.") 385 384 386 self.bt_help = wx.Button(self, wx.NewId(), 'HELP') 385 387 self.bt_help.Bind(wx.EVT_BUTTON, self.on_help) 386 388 self.bt_help.SetToolTipString("Help on Scatter Calculator") 389 390 self.bt_close = wx.Button(self, wx.ID_CANCEL, 'Close') 391 self.bt_close.Bind(wx.EVT_BUTTON, self.on_panel_close) 392 self.bt_close.SetToolTipString("Close this window") 393 387 394 self.button_sizer.AddMany([(self.time_text , 0, wx.LEFT, 20), 388 395 (self.orient_combo , 0, wx.LEFT, 20), 389 396 (self.bt_compute, 0, wx.LEFT, 20), 390 (self.bt_help, 0, wx.LEFT, 5)]) 397 (self.bt_help, 0, wx.LEFT, 20), 398 (self.bt_close, 0, wx.LEFT, 5)]) 391 399 392 400 def estimate_ctime(self): … … 1212 1220 def on_panel_close(self, event): 1213 1221 """ 1214 On Close SLDpanel1215 """ 1216 #Not implemented1222 close the window containing this panel 1223 """ 1224 self.parent.Close() 1217 1225 1218 1226 class OmfPanel(ScrolledPanel, PanelBase): -
src/sas/perspectives/calculator/kiessig_calculator_panel.py
r26d2d88 rd5419f7f 22 22 #Slit length panel size 23 23 if sys.platform.count("win32") > 0: 24 PANEL_TOP = 0 24 25 PANEL_WIDTH = 500 25 26 PANEL_HEIGHT = 230 26 27 FONT_VARIANT = 0 27 28 else: 29 PANEL_TOP = 60 28 30 PANEL_WIDTH = 560 29 31 PANEL_HEIGHT = 230 … … 228 230 self.panel = KiessigThicknessCalculatorPanel(parent=self) 229 231 self.Bind(wx.EVT_CLOSE, self.on_close) 230 self.SetPosition(( 25, 10))232 self.SetPosition((wx.LEFT, PANEL_TOP)) 231 233 self.Show(True) 232 234 -
src/sas/perspectives/calculator/resolution_calculator_panel.py
raf6b53c rd5419f7f 39 39 #Slit length panel size 40 40 if sys.platform.count("win32") > 0: 41 PANEL_TOP = 0 41 42 PANEL_WIDTH = 525 42 43 PANEL_HEIGHT = 653 … … 44 45 IS_WIN = True 45 46 else: 47 PANEL_TOP = 60 46 48 PANEL_WIDTH = 540 47 49 PANEL_HEIGHT = 662 … … 1335 1337 self.panel = ResolutionCalculatorPanel(parent=self) 1336 1338 self.Bind(wx.EVT_CLOSE, self.OnClose) 1337 self.SetPosition(( 25, 10))1339 self.SetPosition((wx.LEFT, PANEL_TOP)) 1338 1340 self.Show(True) 1339 1341 -
src/sas/perspectives/calculator/sld_panel.py
r49ab5d7 rd5419f7f 30 30 #SLD panel size 31 31 if sys.platform.count("win32") > 0: 32 PANEL_TOP = 0 32 33 _STATICBOX_WIDTH = 350 33 34 PANEL_SIZE = 400 34 35 FONT_VARIANT = 0 35 36 else: 37 PANEL_TOP = 60 36 38 _STATICBOX_WIDTH = 380 37 39 PANEL_SIZE = 410 … … 59 61 self.base = base 60 62 self.wavelength = WAVELENGTH 63 self.parent = parent 61 64 #layout attribute 62 65 self.compound_ctl = None … … 290 293 self.Bind(wx.EVT_BUTTON, self.on_help, id=id) 291 294 295 self.button_close = wx.Button(self, wx.ID_CANCEL, 'Close') 296 self.button_close.Bind(wx.EVT_BUTTON, self.on_close) 297 self.button_close.SetToolTipString("Close this window.") 298 292 299 sizer_button.Add((150, 20), 1, wx.EXPAND | wx.ADJUST_MINSIZE, 0) 293 300 sizer_button.Add(self.button_calculate, 0, wx.RIGHT | wx.ADJUST_MINSIZE, 20) 294 301 sizer_button.Add(self.button_help, 0, wx.RIGHT | wx.ADJUST_MINSIZE, 20) 302 sizer_button.Add(self.button_close, 0, wx.RIGHT | wx.ADJUST_MINSIZE, 20) 295 303 sizer3.Add(sizer_button) 296 304 #---------layout---------------- … … 320 328 _doc_viewer = DocumentationWindow(self, -1, \ 321 329 _TreeLocation, "General Scattering Calculator Help") 330 331 def on_close(self, event): 332 """ 333 close the window containing this panel 334 """ 335 self.parent.Close() 322 336 323 337 def calculate_xray_sld(self, element): … … 482 496 self.panel = SldPanel(self, base=base) 483 497 self.Bind(wx.EVT_CLOSE, self.on_close) 484 self.SetPosition(( 20, 10))498 self.SetPosition((wx.LEFT, PANEL_TOP)) 485 499 self.Show(True) 486 500 -
src/sas/perspectives/calculator/slit_length_calculator_panel.py
r49ab5d7 rd5419f7f 25 25 #Slit length panel size 26 26 if sys.platform.count("win32") > 0: 27 PANEL_TOP = 0 27 28 PANEL_WIDTH = 500 28 29 PANEL_HEIGHT = 210 29 30 FONT_VARIANT = 0 30 31 else: 32 PANEL_TOP = 60 31 33 PANEL_WIDTH = 530 32 34 PANEL_HEIGHT = 210 … … 293 295 self.panel = SlitLengthCalculatorPanel(parent=self) 294 296 self.Bind(wx.EVT_CLOSE, self.on_close) 295 self.SetPosition(( 25, 10))297 self.SetPosition((wx.LEFT, PANEL_TOP)) 296 298 self.Show(True) 297 299
Note: See TracChangeset
for help on using the changeset viewer.