Ignore:
Timestamp:
Jan 14, 2009 5:23:45 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
a19cd4d
Parents:
212417e
Message:

worling on slicer panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/plotting.py

    rab8f936 raa1b747  
    1717from sans.guicomm.events import EVT_NEW_PLOT 
    1818from sans.guicomm.events import StatusEvent  
     19from sans.guicomm.events import EVT_SLICER_PARS 
    1920 
    2021class Plugin: 
     
    5960        # Connect to plotting events 
    6061        self.parent.Bind(EVT_NEW_PLOT, self._on_plot_event) 
    61          
     62        self.parent.Bind(EVT_SLICER_PARS, self._on_slicer_event) 
    6263        # We have no initial panels for this plug-in 
    6364        return [] 
     
    8788    def _on_show_panel(self, event): 
    8889        print "_on_show_panel" 
    89      
     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         
    90102    def _on_plot_event(self, event): 
    91103        """ 
Note: See TracChangeset for help on using the changeset viewer.