Changeset 3:e3a120496d78 in orange


Ignore:
Timestamp:
03/21/03 11:34:31 (11 years ago)
Author:
Gregor <Gregor@…>
Branch:
default
Convert:
eaebfc32786e1b8d5bb89e1abaabc91ddddbc6aa
Message:

no message

Location:
orange/OrangeCanvas
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngCanvas.py

    r1 r3  
    3030        # if widget path not registered -> register 
    3131        self.widgetDir = sys.prefix + "/lib/site-packages/orange/orngWidgets/" 
    32         self.picsDir = sys.prefix + "/lib/site-packages/orange/orngWidgets/Pics/" 
     32        self.picsDir = sys.prefix + "/lib/site-packages/orange/orngWidgets/icons/" 
    3333        self.defaultPic = self.picsDir + "Unknown.png" 
    3434        self.canvasDir = sys.prefix + "/lib/site-packages/orange/orngCanvas/" 
  • orange/OrangeCanvas/orngCanvasItems.py

    r1 r3  
    294294        view.repaintContents(QRect(exX+34-self.captionWidth/2, exY+52+2, self.captionWidth, 13 )) 
    295295 
    296     def addLine(self, line, pos): 
    297         if self.mouseInsideLeftChannel(pos): 
    298             self.inLines.append(line) 
    299         elif self.mouseInsideRightChannel(pos): 
    300             self.outLines.append(line) 
    301         else: 
    302             print "unable to add line to a widget" 
     296    def addOutLine(self, line): 
     297        self.outLines.append(line) 
     298 
     299    def addInLine(self,line): 
     300        self.inLines.append(line) 
    303301 
    304302    def removeLine(self, line): 
  • orange/OrangeCanvas/orngRegistry.py

    r1 r3  
    122122if __name__=="__main__": 
    123123    parse = WidgetsToXML() 
    124     canvasDir = sys.prefix + "/lib/site-packages/orange/orngCanvas/" 
    125     widgetDir = sys.prefix + "/lib/site-packages/orange/orngWidgets/" 
     124    canvasDir = sys.prefix + "/lib/site-packages/orange/orangeCanvas/" 
     125    widgetDir = sys.prefix + "/lib/site-packages/orange/orangeWidgets/" 
    126126    parse.ParseDirectory(widgetDir, canvasDir) 
  • orange/OrangeCanvas/orngView.py

    r1 r3  
    329329 
    330330            # we must check if we have really coonected some output to input 
    331             if item!= None and item != self.tempWidget and  \ 
    332             ((self.tempWidget.mouseInsideLeftChannel(self.tempLineStartPos)  and item.mouseInsideRightChannel(ev.pos())) or  \ 
    333             (self.tempWidget.mouseInsideRightChannel(self.tempLineStartPos) and item.mouseInsideLeftChannel(ev.pos()))): 
     331            if item!= None and item != self.tempWidget: 
    334332                if self.tempWidget.mouseInsideLeftChannel(self.tempLineStartPos): 
    335333                    outWidget = item 
     
    355353 
    356354                        # we add the line to the input and output list of connected widgets                     
    357                         self.tempWidget.addLine(line, self.tempLineStartPos) 
    358                         item.addLine(line, ev.pos()) 
     355                         
     356                        if self.tempWidget.mouseInsideLeftChannel(self.moving_start): 
     357                            self.tempWidget.addInLine(line)  
     358                            item.addOutLine(line) 
     359                        else: 
     360                            self.tempWidget.addOutLine(line)     
     361                            item.addInLine(line) 
    359362                        inWidget.updateTooltip(self) 
    360363                        outWidget.updateTooltip(self) 
  • orange/OrangeCanvas/xmlParse.py

    r1 r3  
    122122if __name__=="__main__": 
    123123    parse = WidgetsToXML() 
    124     canvasDir = sys.prefix + "/lib/site-packages/orange/orngCanvas/" 
    125     widgetDir = sys.prefix + "/lib/site-packages/orange/orngWidgets/" 
     124    canvasDir = sys.prefix + "/lib/site-packages/orange/orangeCanvas/" 
     125    widgetDir = sys.prefix + "/lib/site-packages/orange/orangeWidgets/" 
    126126    parse.ParseDirectory(widgetDir, canvasDir) 
Note: See TracChangeset for help on using the changeset viewer.