Ignore:
Timestamp:
Mar 5, 2009 11:46:57 AM (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:
07a93a1
Parents:
6c0568b
Message:

class and method commented

File:
1 edited

Legend:

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

    rd468daa r12aa9b5  
    2424    def __init__(self, parent,id=-1,type=None,base=None, params={}, *args, **kwargs): 
    2525        wx.Panel.__init__(self, parent,id, *args, **kwargs) 
    26         #print "panel created", base 
     26        ##  Initialization of the class      
    2727        self.base= base 
    2828        self.params = params 
     
    3939        else: 
    4040            self.set_slicer( type, params) 
    41         # Bindings 
    42         #self.parent.Bind(EVT_SLICER, self.onEVT_SLICER) 
     41        ## Bindings 
    4342        self.parent.Bind(EVT_SLICER, self.onEVT_SLICER) 
    4443        self.parent.Bind(EVT_SLICER_PARS, self.onParamChange) 
     44 
    4545 
    4646    def onEVT_SLICER(self, event): 
     
    4848            Process EVT_SLICER events 
    4949            When the slicer changes, update the panel 
    50              
    5150            @param event: EVT_SLICER event 
    5251        """ 
    53         #print "went here panel" 
    5452        event.Skip() 
    5553        if event.obj_class==None: 
    56             self.set_slicer(None, None) 
    57              
     54            self.set_slicer(None, None)  
    5855        else: 
    59             #print "when here not empty event",event.type, event.params 
    6056            self.set_slicer(event.type, event.params) 
     57         
    6158         
    6259    def set_slicer(self, type, params): 
     
    6663        self.bck.Clear(True)   
    6764        self.type = type   
    68         #print "in set slicer", type, params 
    6965        if type==None: 
    7066            title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT) 
    7167            self.bck.Add(title, (0,0), (1,2), flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border=15) 
    72  
    7368        else: 
    7469            title = wx.StaticText(self, -1, "Slicer Parameters", style=wx.ALIGN_LEFT) 
     
    7772            n = 1 
    7873            self.parameters = [] 
    79             #params = slicer.get_params() 
    8074            keys = params.keys() 
    8175            keys.sort() 
     
    8983                    ctl.SetToolTipString("Modify the value of %s to change the 2D slicer" % item) 
    9084                    ctl.SetValue(str(format_number(params[item]))) 
    91                     #ctl.Disable() 
     85 
    9286                    self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter) 
    9387                    ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter) 
     
    9690            for item in keys: 
    9791                if  item.lower() in ["errors", "count"]: 
    98                     #print "went here" 
    9992                    n += 1 
    10093                    text = wx.StaticText(self, -1, item+": ", style=wx.ALIGN_LEFT) 
     
    10497                    self.bck.Add(ctl, (n-1,1), flag=wx.TOP|wx.BOTTOM, border = 0) 
    10598                 
    106  
    10799        self.bck.Layout() 
    108100        self.bck.Fit(self) 
    109101        self.parent.GetSizer().Layout() 
     102         
     103         
    110104    def onParamChange(self, evt): 
    111         #print "parameters changed" 
     105        """ 
     106            Receive and event and reset the text field contained in self.parameters 
     107             
     108        """ 
    112109        evt.Skip() 
    113         #if evt.type == "UPDATE": 
    114110        for item in self.parameters:               
    115111            if item[0] in evt.params: 
     
    137133        if has_error==False: 
    138134            # Post parameter event 
    139             #print "post new param" 
     135            ## base is guiframe is this case 
    140136            event = SlicerParameterEvent(type=self.type, params=params) 
    141137            wx.PostEvent(self.base, event) 
    142             #print "panel slicer: self base ", self.base 
     138             
    143139         
Note: See TracChangeset for help on using the changeset viewer.