Changeset 8243:11b1f666c542 in orange


Ignore:
Timestamp:
08/20/11 17:51:05 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
e7876f83fd70a41b1c784139cc9d9fc1deceed16
Message:

Use the zoom_select_toolbar in OWLinProj with properly connected (old-style) signals.

Location:
orange/OrangeWidgets/Visualize Qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Visualize Qt/OWLinProjQt.py

    r8210 r8243  
    136136##        self.connect(self.clusterDlg.resultList, SIGNAL("selectionChanged()"),self.showSelectedCluster) 
    137137 
    138         self.zoomSelectToolbar = OWToolbars.ZoomSelectToolbar(self, self.GeneralTab, self.graph, self.autoSendSelection) 
    139         self.graph.autoSendSelectionCallback = self.selectionChanged 
    140         self.connect(self.zoomSelectToolbar.buttonSendSelections, SIGNAL("clicked()"), self.sendSelections) 
     138        g = self.graph.gui 
     139 
     140        # zooming / selection 
     141        self.zoomSelectToolbar = g.zoom_select_toolbar(self.GeneralTab, buttons = g.default_zoom_select_buttons + [g.Spacing, g.ShufflePoints]) 
     142        self.connect(self.zoomSelectToolbar.buttons[g.SendSelection], SIGNAL("clicked()"), self.sendSelections) 
    141143 
    142144        # #################################### 
     
    204206        p.setColor(OWPalette.Canvas, dlg.getColor("Canvas")) 
    205207        self.graph.set_palette(p) 
    206  
    207         apply([self.zoomSelectToolbar.actionZooming, self.zoomSelectToolbar.actionRectangleSelection, self.zoomSelectToolbar.actionPolygonSelection][self.toolbarSelection], []) 
    208208 
    209209        self.cbShowAllAttributes()      # update list boxes based on the check box value 
     
    333333 
    334334    def selectionChanged(self): 
    335         self.zoomSelectToolbar.buttonSendSelections.setEnabled(not self.autoSendSelection) 
     335        self.zoomSelectToolbar.buttons[OWPlotGUI.SendSelection].setEnabled(not self.autoSendSelection) 
    336336        if self.autoSendSelection: 
    337337            self.sendSelections() 
  • orange/OrangeWidgets/Visualize Qt/OWScatterPlotQt.py

    r8228 r8243  
    104104        # zooming / selection 
    105105        self.zoomSelectToolbar = g.zoom_select_toolbar(self.GeneralTab, buttons = g.default_zoom_select_buttons + [g.Spacing, g.ShufflePoints]) 
    106         self.zoomSelectToolbar.buttons[g.SendSelection].clicked.connect(self.sendSelections) 
     106        self.connect(self.zoomSelectToolbar.buttons[g.SendSelection], SIGNAL("clicked()"), self.sendSelections) 
    107107 
    108108        # #################################### 
Note: See TracChangeset for help on using the changeset viewer.