Changeset 8860:1eb8e6ae7a11 in orange


Ignore:
Timestamp:
08/31/11 12:27:55 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
be0fca7be663f9f2f4d7a7fba5a66984e7d80777
Message:

Added mark on hover.

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

Legend:

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

    r8853 r8860  
    366366        self.networkCurve.update_properties() 
    367367        self.drawComponentKeywords() 
    368         self.networkCanvas.replot() 
     368        self.replot() 
    369369         
    370370    def set_hidden_nodes(self, nodes): 
     
    414414        self.networkCurve.clear_node_marks() 
    415415        self.networkCurve.set_node_marks(dict((i, True) for i in toMark)) 
     416     
     417    def mark_on_focus_changed(self, node): 
     418        self.networkCurve.clear_node_marks() 
     419         
     420        if node is not None: 
     421            toMark = set(self.get_neighbors_upto(node.index(), self.mark_neighbors)) 
     422            self.networkCurve.set_node_marks(dict((i, True) for i in toMark)) 
    416423         
    417424    def drawComponentKeywords(self): 
  • orange/OrangeWidgets/Visualize Qt/OWNxExplorerQt.py

    r8853 r8860  
    913913         
    914914        QObject.disconnect(self.networkCanvas, SIGNAL('selection_changed()'), self.networkCanvas.mark_on_selection_changed) 
     915        QObject.disconnect(self.networkCanvas, SIGNAL('point_hovered(Point*)'), self.networkCanvas.mark_on_focus_changed) 
    915916         
    916917        if self.graph is None: 
     
    933934                #print "mark on focus" 
    934935                self.networkCanvas.mark_neighbors = self.markDistance 
     936                QObject.connect(self.networkCanvas, SIGNAL('point_hovered(Point*)'), self.networkCanvas.mark_on_focus_changed) 
    935937            elif hubs == 3: 
    936938                #print "mark selected" 
Note: See TracChangeset for help on using the changeset viewer.