Changeset 3849:ba50f4888929 in orange


Ignore:
Timestamp:
05/13/08 16:02:53 (6 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
4aa97df1b8feaeafc2120a2d925a9c190e99f53a
Message:
 
Location:
orange/OrangeWidgets/Prototypes
Files:
2 edited

Legend:

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

    r3846 r3849  
    120120        self.listTab.layout().addStretch(1) 
    121121        self.graphTab.layout().addStretch(1) 
     122         
    122123         
    123124        #self.connect(self.graphButton, SIGNAL("clicked()"), self.graph.saveToFile) 
     
    291292        (pipePngOut, pipePngIn) = os.popen2("dot interaction.dot -Tpng", "b") 
    292293        (pipePlainOut, pipePlainIn) = os.popen2("dot interaction.dot -Tismap", "t") 
    293          
    294         textPng = pipePngIn.read() 
     294        textPng = "" 
     295        #textPng = pipePngIn.read() 
    295296        textPlainList = pipePlainIn.readlines() 
    296297        pipePngIn.close() 
     
    302303        # if the output from the pipe was empty, then the software isn't installed correctly 
    303304        if len(textPng) == 0: 
    304             self.error(0, "This widget needs 'graphviz' software package. You can freely download it from the web.") 
     305            pass 
     306            #self.error(0, "This widget needs 'graphviz' software package. You can freely download it from the web.") 
    305307         
    306308         # create a picture 
    307309        pixmap = QPixmap() 
    308         pixmap.loadFromData(textPng) 
    309         canvasPixmap = QCanvasPixmap(pixmap, QPoint(0,0)) 
    310         width = canvasPixmap.width() 
    311         height = canvasPixmap.height() 
    312          
    313         self.canvasR.setTiles(pixmap, 1, 1, width, height) 
    314         self.canvasR.resize(width, height) 
     310        #pixmap.loadFromData(textPng) 
     311        canvasPixmap = self.canvasR.addPixmap(pixmap) 
     312        width = canvasPixmap.pixmap().width() 
     313        height = canvasPixmap.pixmap().height() 
    315314 
    316315        # hide all rects 
     
    498497         
    499498        # resizing of the left canvas to update width 
    500         self.canvasL.resize(maxWidth + 10, self.mainArea.size().height() - 52) 
    501         self.canvasM.resize(maxWidth + 10, self.mainArea.size().height() - 52) 
    502         self.updateCanvas() 
     499        #self.canvasL.resize(maxWidth + 10, self.mainArea.size().height() - 52) 
     500        #self.canvasM.resize(maxWidth + 10, self.mainArea.size().height() - 52) 
     501        #self.updateCanvas() 
    503502 
    504503 
     
    557556    ################################################# 
    558557    def _showAttribute(self, name): 
    559         self.shownAttribsLB.insertItem(name)    # add to shown 
     558        self.shownAttribsLB.addItem(name)    # add to shown 
    560559 
    561560        count = self.hiddenAttribsLB.count() 
    562561        for i in range(count-1, -1, -1):        # remove from hidden 
    563562            if str(self.hiddenAttribsLB.item(i).text()) == name: 
    564                 self.hiddenAttribsLB.removeItem(i) 
     563                self.hiddenAttribsLB.takeItem(i) 
    565564 
    566565    def _hideAttribute(self, name): 
    567         self.hiddenAttribsLB.insertItem(name)    # add to hidden 
     566        self.hiddenAttribsLB.addItem(name)    # add to hidden 
    568567 
    569568        count = self.shownAttribsLB.count() 
    570569        for i in range(count-1, -1, -1):        # remove from shown 
    571570            if str(self.shownAttribsLB.item(i).text()) == name: 
    572                 self.shownAttribsLB.removeItem(i) 
     571                self.shownAttribsLB.takeItem(i) 
    573572 
    574573    ########## 
  • orange/OrangeWidgets/Prototypes/OWNetworkCanvas.py

    r3847 r3849  
    465465              toMark = set(self.getNeighboursUpTo(ndx, self.tooltipNeighbours)) 
    466466              self.networkCurve.setMarkedVertices(toMark) 
     467              self.drawLabels() 
     468              self.drawWeights() 
    467469              self.replot() 
    468470          else: 
    469471              self.networkCurve.unMark() 
     472              self.drawLabels() 
    470473              self.replot() 
    471474               
Note: See TracChangeset for help on using the changeset viewer.