コード例 #1
0
ファイル: browser.py プロジェクト: pdfernhout/openvirgle
    def attributesListClicked(self, event):
        print "attributesListClicked"
        print dir(event)
        print event.class

        selectedNode = self.pathList.selectedValue
        if selectedNode:
            attributeName = self.attributesList.selectedValue
            print "attributeName", attributeName
            if attributeName:
                r = Repository()
                selectedID = r.symbolIndexForString(selectedNode) 
                attributeID = r.symbolIndexForString(attributeName)
                attributeValueID = r.find(selectedID, attributeID)
                print "Result", attributeValueID
                if attributeValueID:
                    attributeValue = r.stringForSymbolIndex(attributeValueID)
                    print "attributeValue", attributeValue
                else:
                    attributeValue = "PROBLEM"
                self.currentEditor.text = attributeValue
        
                if event.clickCount == 2:
                    print "double click"
                    self.pathList.model.addElement(attributeValue)
コード例 #2
0
ファイル: browser.py プロジェクト: pdfernhout/openvirgle
 def pathListClicked(self, event):
     print "path changed"
     selectedNode = self.pathList.selectedValue
     if selectedNode:
         r = Repository()
         model = self.attributesList.model 
         model.clear()
         if selectedNode:
             selectedID = r.symbolIndexForString(selectedNode)
             attributes = r.collectAttributes(selectedID)
             print attributes
             
             for attribute in attributes:
                 attributeName = r.stringForSymbolIndex(attribute)
                 model.addElement(attributeName)