Changeset 8460:cba70ec41a13 in orange


Ignore:
Timestamp:
07/26/11 08:59:38 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
b30162fc9b843681153472db45eee4659b871610
Message:

Toggle Antialiasing when the checkbox is clicked

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owplot.py

    r8459 r8460  
    9191    "setAxisLabels" : "set_axis_labels",  
    9292    "setTickLength" : "set_axis_tick_length", 
    93     "updateCurves" : "update_curves" 
     93    "updateCurves" : "update_curves", 
     94    "itemList" : "plot_items" 
    9495} 
    9596 
     
    124125         
    125126        # OWScatterPlot needs these: 
    126         self.alphaValue = 1 
    127         self.useAntialiasing = True 
     127        self.use_antialiasing = True 
    128128        self.point_width = 5 
    129129        self.showFilledSymbols = 1 
    130         self.alpha_value = 255 
     130        self.alpha_value = 1 
    131131         
    132132        self.palette = shared_palette() 
     
    191191    pointWidth = deprecated_attribute("pointWidth", "point_width") 
    192192    alphaValue = deprecated_attribute("alphaValue", "alpha_value") 
     193    useAntialiasing = deprecated_attribute("useAntialiasing", "use_antialiasing") 
    193194     
    194195    def __setattr__(self, name, value): 
     
    578579            self._transform_cache = {} 
    579580            self.set_clean() 
     581        self.update_antialiasing() 
    580582        self.update_layout() 
    581583        self.update_zoom() 
     
    10011003                c.set_auto_update(au) 
    10021004                c.update_properties() 
     1005                 
     1006    def update_antialiasing(self): 
     1007        self.setRenderHint(QPainter.Antialiasing, self.use_antialiasing) 
Note: See TracChangeset for help on using the changeset viewer.