Ignore:
Timestamp:
Dec 15, 2008 7:07:21 PM (16 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:
cd84dca
Parents:
d250f7d
Message:

working on slicer parameter panel

File:
1 edited

Legend:

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

    rb98db8c re8c96f5  
    6464         
    6565         
    66     def get_radius(self): 
     66    def get_angle(self): 
    6767        return self.theta 
    6868         
    69     def update(self,r1=None, r2=None, theta_right=None, theta_left=None): 
     69    def update(self,r1=None, r2=None, theta=None): 
    7070        """ 
    7171        Draw the new roughness on the graph. 
     
    7575        if r2!=None: 
    7676            self.r2=r2 
    77         """ 
    78         self.theta_left=theta_left 
    79         self.theta_right=theta_right 
    80         if r1 !=None: 
    81             self.r1=r1 
    82         if r2!=None: 
    83             self.r2=r2 
    84         if theta_right!=None: 
    85             if theta_right < self.theta: 
    86                 self.move_stop=True 
    87             else: 
    88                 self.move_stop=False 
    89         if theta_left !=None: 
    90             if theta_left > self.theta: 
    91                 self.move_stop=True 
    92             else: 
    93                 self.move_stop=False 
    94         if theta_left ==None and theta_right==None: 
    95             self.move_stop=True 
    96         """ 
    97         #print "in the edge theta_right theta_left",theta_right,theta_left,self.theta 
     77        if theta !=None: 
     78            self.theta= theta 
     79        
     80        print "in the edge r1, r2",self.r1,self.r2,math.degrees(self.theta) 
    9881        x1= self.r1*math.cos(self.theta) 
    9982        y1= self.r1*math.sin(self.theta) 
     
    10992        can restore on Esc. 
    11093        """ 
    111         self.save_theta= self.theta 
     94        self.save_theta= math.atan2(ev.y,ev.x) 
     95        #self.save_theta= self.theta 
    11296        self.base.freeze_axes() 
    11397    
     
    126110        Process move to a new position, making sure that the move is allowed. 
    127111        """ 
    128         #print "on move theta left , theta right",self.theta_left,self.theta_right 
    129         theta= math.atan2(y,x) 
    130         """print "on move theta left , theta right",self.theta_left,self.theta_right,theta 
    131             if self.theta_left !=None: 
    132                 if self.theta_left >= theta: 
    133                     print "went hier" 
    134                         self.move_stop= True 
    135                 if self.theta_right !=None: 
    136                     if self.theta_right <= theta: 
    137                         self.move_stop= True 
    138             
    139             self.move_stop= True 
    140             if self.move_stop: 
    141          """ 
     112         
    142113        self.theta= math.atan2(y,x) 
    143114        self.has_move= True 
     
    145116        self.base.base.update() 
    146117         
    147     def set_cursor(self, x, y): 
    148         self.move(x, y, None) 
     118    def set_cursor(self,r_min, r_max, theta): 
     119        self.theta= theta 
     120        self.r1= r_min 
     121        self.r2=r_max 
    149122        self.update() 
    150123         
     
    154127        params["radius1"] = self.r1 
    155128        params["radius2"] = self.r2 
     129        params["theta"] = self.theta 
    156130        return params 
    157131     
    158132    def set_params(self, params): 
     133        print "when here set curcor arc" 
    159134 
    160135        x1 = params["radius1"]  
    161136        x2 = params["radius2"]  
    162         self.set_cursor(x, self._inner_mouse_y) 
     137        theta= params["theta"] 
     138        self.set_cursor(x1, x2, theta) 
    163139         
    164140     
Note: See TracChangeset for help on using the changeset viewer.