Changeset 7aa1685 in sasview for calculatorview
- Timestamp:
- Apr 24, 2013 12:16:12 PM (12 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:
- b07ffca
- Parents:
- 9159cb9
- Location:
- calculatorview/src/sans/perspectives/calculator
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/calculator.py
rae84427 r7aa1685 113 113 manager=self, data=[], 114 114 title="Data Editor") 115 self.put_icon(self.data_edit_frame) 116 self.data_edit_frame.Show(False) 115 #self.put_icon(self.data_edit_frame) 116 else: 117 self.data_edit_frame.Show(False) 117 118 self.data_edit_frame.Show(True) 118 119 … … 126 127 manager=self, 127 128 title="Data Operation") 128 self.put_icon(self.data_operator_frame) 129 self.data_operator_frame.Show(False) 129 #self.put_icon(self.data_operator_frame) 130 else: 131 self.data_operator_frame.Show(False) 130 132 self.data_operator_frame.panel.set_panel_on_focus(None) 131 133 self.data_operator_frame.Show(True) … … 137 139 if self.kiessig_frame == None: 138 140 frame = KiessigWindow(parent=self.parent, manager=self) 139 self.put_icon(frame)141 #self.put_icon(frame) 140 142 self.kiessig_frame = frame 141 self.kiessig_frame.Show(False) 143 else: 144 self.kiessig_frame.Show(False) 142 145 self.kiessig_frame.Show(True) 143 146 … … 147 150 """ 148 151 if self.sld_frame == None: 149 frame = SldWindow(base=self.parent, manager=self) 150 self.put_icon(frame) 152 frame = SldWindow(parent=self.parent, 153 base=self.parent, manager=self) 154 #self.put_icon(frame) 151 155 self.sld_frame = frame 152 self.sld_frame.Show(False) 156 else: 157 self.sld_frame.Show(False) 153 158 self.sld_frame.Show(True) 154 159 … … 158 163 """ 159 164 if self.cal_md_frame == None: 160 frame = DensityWindow(base=self.parent, manager=self) 161 self.put_icon(frame) 165 frame = DensityWindow(parent=self.parent, 166 base=self.parent, manager=self) 167 #self.put_icon(frame) 162 168 self.cal_md_frame = frame 163 self.cal_md_frame.Show(False) 169 else: 170 self.cal_md_frame.Show(False) 164 171 self.cal_md_frame.Show(True) 165 172 … … 170 177 if self.cal_slit_frame == None: 171 178 frame = SlitLengthCalculatorWindow(parent=self.parent, manager=self) 172 self.put_icon(frame)179 #self.put_icon(frame) 173 180 self.cal_slit_frame = frame 174 self.cal_slit_frame.Show(False) 181 else: 182 self.cal_slit_frame.Show(False) 175 183 self.cal_slit_frame.Show(True) 176 184 … … 183 191 self.put_icon(frame) 184 192 self.cal_res_frame = frame 185 self.cal_res_frame.Show(False) 193 else: 194 self.cal_res_frame.Show(False) 186 195 self.cal_res_frame.Show(True) 187 196 … … 192 201 if self.gen_frame == None: 193 202 frame = SasGenWindow(parent=self.parent, manager=self) 194 self.put_icon(frame)203 #self.put_icon(frame) 195 204 self.gen_frame = frame 196 self.gen_frame.Show(False) 205 else: 206 self.gen_frame.Show(False) 197 207 self.gen_frame.Show(True) 198 208 … … 225 235 self.put_icon(frame) 226 236 self.py_frame = frame 227 self.py_frame.Show(False) 237 else: 238 self.py_frame.Show(False) 228 239 self.py_frame.Show(True) 229 240 -
calculatorview/src/sans/perspectives/calculator/data_operator.py
rae84427 r7aa1685 934 934 self.draw() 935 935 936 class DataOperatorWindow(wx. Frame):936 class DataOperatorWindow(wx.MDIChildFrame): 937 937 def __init__(self, parent, manager, *args, **kwds): 938 938 kwds["size"] = (PANEL_WIDTH, PANEL_HEIGTH) 939 wx. Frame.__init__(self, parent, *args, **kwds)939 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 940 940 self.parent = parent 941 941 self.manager = manager 942 942 self.panel = DataOperPanel(parent=self) 943 943 wx.EVT_CLOSE(self, self.OnClose) 944 self.CenterOnParent() 944 #self.CenterOnParent() 945 self.SetPosition((0, 0)) 945 946 self.Show() 946 947 -
calculatorview/src/sans/perspectives/calculator/density_panel.py
rae84427 r7aa1685 371 371 return output.lstrip().rstrip() 372 372 373 class DensityWindow(wx. Frame):373 class DensityWindow(wx.MDIChildFrame): 374 374 """ 375 375 """ … … 381 381 kwds['title'] = title 382 382 kwds['size'] = size 383 wx. Frame.__init__(self, parent, *args, **kwds)383 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 384 384 """ 385 385 """ … … 387 387 self.panel = DensityPanel(self, base=base) 388 388 self.Bind(wx.EVT_CLOSE, self.on_close) 389 self.Centre() 389 #self.Centre() 390 self.SetPosition((0, 0)) 390 391 self.Show(True) 391 392 -
calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py
rae84427 r7aa1685 1791 1791 return flag 1792 1792 1793 class SasGenWindow(wx. Frame):1793 class SasGenWindow(wx.MDIChildFrame): 1794 1794 """ 1795 1795 GEN SAS main window … … 1800 1800 Init 1801 1801 """ 1802 if parent != None: 1803 # set max size depending up on client size 1804 wth, hgt = parent.get_client_size() 1805 if hgt < size[1]: 1806 size = (size[0], hgt) 1807 if wth < size[0]: 1808 size = (wth, size[1]) 1802 1809 kwds['size'] = size 1803 1810 kwds['title'] = title 1804 1805 wx.Frame.__init__(self, parent, *args, **kwds) 1811 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 1806 1812 self.parent = parent 1807 1813 self.base = manager … … 1822 1828 1823 1829 self.build_panels() 1824 self.Centre() 1830 #self.Centre() 1831 self.SetPosition((0, 0)) 1825 1832 self.Show(True) 1826 1833 … … 2004 2011 """ 2005 2012 """ 2013 from sans.guiframe.events import NewPlotEvent 2014 wx.PostEvent(self.parent, NewPlotEvent(plot=plot, title=title)) 2015 """ 2006 2016 frame = PlotFrame(self, -1, 'testView', self.scale2d) 2007 2017 add_icon(self.parent, frame) … … 2010 2020 frame.Show(True) 2011 2021 frame.SetFocus() 2012 2022 """ 2013 2023 def set_schedule_full_draw(self, panel=None, func='del'): 2014 2024 """ -
calculatorview/src/sans/perspectives/calculator/kiessig_calculator_panel.py
rae84427 r7aa1685 190 190 self.on_compute(event) 191 191 192 class KiessigWindow(wx. Frame):192 class KiessigWindow(wx.MDIChildFrame): 193 193 def __init__(self, parent=None, manager=None, 194 194 title="Kiessig Thickness Calculator", … … 196 196 kwds['title'] = title 197 197 kwds['size'] = size 198 wx. Frame.__init__(self, parent, *args, **kwds)198 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 199 199 self.parent = parent 200 200 self.manager = manager 201 201 self.panel = KiessigThicknessCalculatorPanel(parent=self) 202 202 self.Bind(wx.EVT_CLOSE, self.on_close) 203 self.Centre() 203 #self.Centre() 204 self.SetPosition((0, 0)) 204 205 self.Show(True) 205 206 -
calculatorview/src/sans/perspectives/calculator/resolution_calculator_panel.py
rae84427 r7aa1685 823 823 if self.image != None: 824 824 #_pylab_helpers.Gcf.set_active(self.fm) 825 _pylab_helpers.Gcf.figs = {} 825 826 # Clear the image before redraw 826 827 self.image.clf() … … 1389 1390 raise 1390 1391 1391 class ResolutionWindow(wx. Frame):1392 class ResolutionWindow(wx.MDIChildFrame): 1392 1393 """ 1393 1394 Resolution Window … … 1396 1397 title = "SANS Resolution Estimator", 1397 1398 size=(PANEL_WIDTH * 2, PANEL_HEIGHT), *args, **kwds): 1399 if parent != None: 1400 # set max size depending up on client size 1401 wth, hgt = parent.get_client_size() 1402 if hgt < size[1]: 1403 size = (size[0], hgt) 1404 if wth < size[0]: 1405 size = (wth, size[1]) 1398 1406 kwds['title'] = title 1399 1407 kwds['size'] = size 1400 wx. Frame.__init__(self, parent=None, *args, **kwds)1408 wx.MDIChildFrame.__init__(self, parent=parent, *args, **kwds) 1401 1409 self.parent = parent 1402 1410 self.manager = manager 1403 1411 self.panel = ResolutionCalculatorPanel(parent=self) 1404 1412 self.Bind(wx.EVT_CLOSE, self.OnClose) 1405 self.Centre() 1413 self.SetPosition((0, 0)) 1414 #self.Center() 1406 1415 self.Show(True) 1407 1416 -
calculatorview/src/sans/perspectives/calculator/sld_panel.py
rae84427 r7aa1685 437 437 438 438 439 class SldWindow(wx. Frame):439 class SldWindow(wx.MDIChildFrame): 440 440 """ 441 441 """ … … 447 447 kwds['title'] = title 448 448 kwds['size'] = size 449 wx. Frame.__init__(self, parent, *args, **kwds)449 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 450 450 """ 451 451 """ … … 455 455 self.panel = SldPanel(self, base=base) 456 456 self.Bind(wx.EVT_CLOSE, self.on_close) 457 self.Centre() 457 #self.Centre() 458 self.SetPosition((0, 0)) 458 459 self.Show(True) 459 460 -
calculatorview/src/sans/perspectives/calculator/slit_length_calculator_panel.py
rae84427 r7aa1685 251 251 252 252 253 class SlitLengthCalculatorWindow(wx. Frame):253 class SlitLengthCalculatorWindow(wx.MDIChildFrame): 254 254 """ 255 255 """ … … 260 260 kwds['size']= size 261 261 kwds['title']= title 262 wx. Frame.__init__(self, parent, *args, **kwds)262 wx.MDIChildFrame.__init__(self, parent, *args, **kwds) 263 263 self.parent = parent 264 264 self.manager = manager 265 265 self.panel = SlitLengthCalculatorPanel(parent=self) 266 266 self.Bind(wx.EVT_CLOSE, self.on_close) 267 self.Centre() 267 #self.Centre() 268 self.SetPosition((0, 0)) 268 269 self.Show(True) 269 270
Note: See TracChangeset
for help on using the changeset viewer.