Changeset 8403:e0a5e91789fb in orange


Ignore:
Timestamp:
07/20/11 21:11:58 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
8359230808e8083db9deb4034b8646df2ac93d75
Message:

owscatterplot3d: wired selections gui

Location:
orange/OrangeWidgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Prototypes/OWScatterPlot3D.py

    r8401 r8403  
    119119        self.connect(self.zoom_select_toolbar.buttonSelectPoly, SIGNAL('clicked()'), self.change_selection_type) 
    120120        self.connect(self.zoom_select_toolbar.buttonZoom, SIGNAL('clicked()'), self.change_selection_type) 
     121        self.connect(self.zoom_select_toolbar.buttonRemoveLastSelection, SIGNAL('clicked()'), self.plot.remove_last_selection) 
     122        self.connect(self.zoom_select_toolbar.buttonRemoveAllSelections, SIGNAL('clicked()'), self.plot.remove_all_selections) 
    121123        self.toolbarSelection = None 
    122124 
  • orange/OrangeWidgets/owplot3d.py

    r8402 r8403  
    290290        self.current_vertex[0] += dx 
    291291        self.current_vertex[1] += dy 
    292         self.polygon = QPolygon([QPoint(x, y) for (x, y) in self.vertices]) 
     292        self.polygon.translate(dx, dy) 
    293293 
    294294    def draw(self): 
     
    362362        self.additional_scale = [0, 0, 0] 
    363363        self.scale_x_axis = True 
    364         self.scale_factor = 30. 
     364        self.scale_factor = 100. 
    365365        self.initial_scale = numpy.array([1., 1., 1.]) 
    366366        self.initial_center = numpy.array([0, 0, 0]) 
     
    11021102            self.updateGL() 
    11031103 
     1104    def remove_last_selection(self): 
     1105        if len(self.selections) > 0: 
     1106            self.selections.pop() 
     1107            self.updateGL() 
     1108 
     1109    def remove_all_selections(self): 
     1110        self.selections = [] 
     1111        self.updateGL() 
     1112 
    11041113    def clear(self): 
    11051114        self.commands = [] 
Note: See TracChangeset for help on using the changeset viewer.