Changeset 4006:c5ef485e57d6 in orange


Ignore:
Timestamp:
07/19/07 16:01:54 (7 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
c442a4d793328c72cdeb791f68f7d1810123f7b9
Message:
  • added wheel zoom and scroll
File:
1 edited

Legend:

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

    r3774 r4006  
    225225             
    226226        self.graph.tooltipNeighbours = self.hubs == 2 and self.markDistance or 0 
     227        self.graph.markWithRed = False 
    227228 
    228229        if not self.visualize or not self.visualize.graph: 
     
    238239            txt = self.markSearchString 
    239240            labelText = self.graph.labelText 
     241            self.graph.markWithRed = self.graph.nVertices > 200 
    240242            self.graph.setMarkedNodes([i for i, values in enumerate(vgraph.items) if txt in " ".join([str(values[ndx]) for ndx in labelText])]) 
    241243            return 
     
    460462         
    461463    def keyPressEvent(self, e): 
    462         if e.text() == "f": 
    463             self.graph.freezeNeighbours = not self.graph.freezeNeighbours 
    464         else: 
    465             OWWidget.keyPressEvent(self, e) 
     464        if e.key() == Qt.Key_Control: 
     465            self.graph.controlPressed = True 
     466            print "cp" 
     467        elif e.key() == Qt.Key_Alt: 
     468            self.graph.altPressed = True 
     469        QWidget.keyPressEvent(self, e) 
     470         
     471    def keyReleaseEvent(self, e): 
     472        if e.key() == Qt.Key_Control: 
     473            self.graph.controlPressed = False 
     474        elif e.key() == Qt.Key_Alt: 
     475            self.graph.altPressed = False 
     476        QWidget.keyReleaseEvent(self, e) 
     477         
     478 
     479#    def keyPressEvent(self, e): 
     480#        if e.text() == "f": 
     481#            self.graph.freezeNeighbours = not self.graph.freezeNeighbours 
     482#        else: 
     483#            OWWidget.keyPressEvent(self, e) 
     484 
    466485 
    467486    def markedToSelection(self): 
Note: See TracChangeset for help on using the changeset viewer.