Changeset d3fac18 in sasview for invariantview/perspectives
- Timestamp:
- Mar 24, 2010 5:35:22 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:
- a0a4486
- Parents:
- 518d35d
- Location:
- invariantview/perspectives/invariant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_details.py
r518d35d rd3fac18 27 27 28 28 29 class InvariantDetailsPanel(wx. ScrolledWindow):29 class InvariantDetailsPanel(wx.Dialog): 30 30 """ 31 31 This panel describes proportion of invariants 32 32 """ 33 def __init__(self, parent , qstar_container=None):34 wx.ScrolledWindow.__init__(self, parent,35 style=wx.FULL_REPAINT_ON_RESIZE)33 def __init__(self, parent=None, id=-1, qstar_container=None, title="", 34 size=(PANEL_WIDTH +100, 450)): 35 wx.Dialog.__init__(self, parent, id=id, title=title, size=size) 36 36 37 37 #Font size … … 200 200 (self.button_sizer, 0, wx.ALL, 10)]) 201 201 self.SetSizer(self.main_sizer) 202 self.SetScrollbars(20,20,25,65) 203 self.SetAutoLayout(True) 202 204 203 205 204 def set_values(self): … … 275 274 """ 276 275 self.Close() 277 self.parent.Close() 278 276 279 277 def on_paint(self, event): 280 278 """ … … 343 341 gc.PopState() 344 342 345 class InvariantDetailsWindow(wx.Frame): 343 class InvariantDetailsWindow(wx.Dialog): 344 def __init__(self, parent, qstar_container=None, *args, **kwds): 345 kwds["size"]= (PANEL_WIDTH +100, 450) 346 wx.Dialog.__init__(self, parent, *args, **kwds) 347 self.container = qstar_container 348 if self.container is None: 349 from invariant_panel import InvariantContainer 350 self.container = InvariantContainer() 351 self.container.qstar_total = 1 352 self.container.qstar = 0.75 353 self.container.qstar_low = 0.60 354 self.container.qstar_high = 0.0049 355 self.panel = InvariantDetailsPanel(parent=self, 356 qstar_container=self.container) 357 self.Centre() 358 self.ShowModal() 359 self.Destroy() 360 361 class InvariantDetailsTest(wx.Frame): 346 362 def __init__(self, parent, qstar_container=None, *args, **kwds): 347 363 kwds["size"]= (PANEL_WIDTH +100, 450) … … 355 371 self.container.qstar_low = 0.60 356 372 self.container.qstar_high = 0.0049 373 357 374 self.panel = InvariantDetailsPanel(parent=self, 358 375 qstar_container=self.container) 359 376 self.panel.ShowModal() 377 self.panel.Destroy() 360 378 self.Show() 361 379 362 380 if __name__ =="__main__": 363 381 app = wx.App() 364 window = InvariantDetailsWindow(parent=None, title="Source Editor") 382 from invariant_panel import InvariantContainer 383 container = InvariantContainer() 384 container.qstar_total = 1 385 container.qstar = 0.75 386 container.qstar_low = 0.60 387 container.qstar_high = 0.0049 388 window = InvariantDetailsTest(parent=None, id=-1,qstar_container=container, 389 title="Source Editor") 390 window.Show() 365 391 app.MainLoop() -
invariantview/perspectives/invariant/invariant_panel.py
r518d35d rd3fac18 10 10 from sans.guiframe.utils import format_number, check_float 11 11 from sans.guicomm.events import NewPlotEvent, StatusEvent 12 from invariant_details import InvariantDetails Window12 from invariant_details import InvariantDetailsPanel 13 13 from invariant_widgets import OutputTextCtrl, InvTextCtrl 14 14 # The minimum q-value to be used when extrapolating … … 329 329 open another panel for more details on invariant calculation 330 330 """ 331 panel = InvariantDetailsWindow(parent=self.parent, 332 qstar_container=self.inv_container) 331 #panel = InvariantDetailsWindow(parent=self.parent, 332 # qstar_container=self.inv_container) 333 panel = InvariantDetailsPanel(parent=self, 334 qstar_container=self.inv_container) 335 panel.ShowModal() 336 panel.Destroy() 333 337 334 338 def compute_invariant(self, event):
Note: See TracChangeset
for help on using the changeset viewer.