Changeset 8a7a21b in sasview for guiframe/local_perspectives
- Timestamp:
- Jan 16, 2009 5:45:20 PM (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:
- ea20505
- Parents:
- 568e1a5
- Location:
- guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter2D.py
r240c805 r8a7a21b 216 216 217 217 id = wx.NewId() 218 slicerpop.Append(id, '&Box averaging') 219 wx.EVT_MENU(self, id, self.onBoxavg) 218 slicerpop.Append(id, '&Box averaging in Qx') 219 wx.EVT_MENU(self, id, self.onBoxavgX) 220 221 id = wx.NewId() 222 slicerpop.Append(id, '&Box averaging in Qy') 223 wx.EVT_MENU(self, id, self.onBoxavgY) 220 224 if self.slicer !=None: 221 225 id = wx.NewId() … … 386 390 self.onClearSlicer(event) 387 391 wx.PostEvent(self.parent, InternalEvent(slicer= BoxSum)) 388 from SlicerParameters import SlicerParameterPanel389 390 dialog = SlicerParameterPanel(self.parent, -1, "Slicer Parameters")391 392 if dialog.ShowModal() == wx.ID_OK:393 dialog.Destroy()394 395 def onBoxavg(self,event):396 from boxSlicer import BoxInteractor397 self.onClearSlicer(event)398 wx.PostEvent(self.parent, InternalEvent(slicer= BoxInteractor))399 392 400 393 from slicerpanel import SlicerPanel … … 403 396 from sans.guicomm.events import SlicerParameterEvent 404 397 wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel)) 405 406 398 399 def onBoxavgX(self,event): 400 from boxSlicer import BoxInteractorX 401 self.onClearSlicer(event) 402 wx.PostEvent(self.parent, InternalEvent(slicer= BoxInteractorX)) 403 404 from slicerpanel import SlicerPanel 405 new_panel = SlicerPanel(self.parent, -1, style=wx.RAISED_BORDER) 406 407 from sans.guicomm.events import SlicerParameterEvent 408 wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel)) 409 410 def onBoxavgY(self,event): 411 from boxSlicer import BoxInteractorY 412 self.onClearSlicer(event) 413 wx.PostEvent(self.parent, InternalEvent(slicer= BoxInteractorY)) 414 415 from slicerpanel import SlicerPanel 416 new_panel = SlicerPanel(self.parent, -1, style=wx.RAISED_BORDER) 417 418 from sans.guicomm.events import SlicerParameterEvent 419 wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel)) 420 407 421 def onClearSlicer(self, event): 408 422 """ -
guiframe/local_perspectives/plotting/plotting.py
raa1b747 r8a7a21b 17 17 from sans.guicomm.events import EVT_NEW_PLOT 18 18 from sans.guicomm.events import StatusEvent 19 from sans.guicomm.events import EVT_SLICER_PARS 19 20 20 21 21 class Plugin: … … 60 60 # Connect to plotting events 61 61 self.parent.Bind(EVT_NEW_PLOT, self._on_plot_event) 62 self.parent.Bind(EVT_SLICER_PARS, self._on_slicer_event)63 62 # We have no initial panels for this plug-in 64 63 return [] … … 88 87 def _on_show_panel(self, event): 89 88 print "_on_show_panel" 90 def _on_slicer_event(self, event): 91 print "slicer event ", event.panel 92 new_panel = event.panel 93 # Set group ID if available 94 event_id = self.parent.popup_panel(new_panel) 95 self.menu.Append(event_id, new_panel.window_caption, 96 "Show %s plot panel" % new_panel.window_caption) 97 # Set UID to allow us to reference the panel later 98 new_panel.uid = event_id 99 100 self.plot_panels.append(new_panel) 101 return 89 102 90 def _on_plot_event(self, event): 103 91 """
Note: See TracChangeset
for help on using the changeset viewer.