Ejemplo n.º 1
0
 def finduser_nc(self , historyFile , ver , wip ='' , subject = '' ):
     if QFileInfo(historyFile).isFile():
         nc = NoteContainer()
         nc.importSAX(str(historyFile))                        
         nc = nc.getNotes(True) 
     else :
         return False
     temp= [ x.author for x in nc if x.version == int(ver) and x.wipversion == int(wip) and x.subject.strip()==subject ]
     return '.'+temp[0] if temp != [] else ''
Ejemplo n.º 2
0
 def getEventNotes(self, tab, level1, level2, level3, offset=0, archive=0):
     historyFile = self.getFileName(tab, level1, level2, level3, "historyFile", offset, archive)
  
     #outString = ""
     nc = []
     if QFileInfo(historyFile).isFile():
         nc = NoteContainer()
         nc.importSAX(str(historyFile))
         #outString = n.readXML()            
         nc = nc.getNotes(True)
     return nc
Ejemplo n.º 3
0
    def getComment_nc(self , historyFile , ver , wip ='' , subject = '' ):
        if QFileInfo(historyFile).isFile():
            nc = NoteContainer()
            nc.importSAX(str(historyFile))                        
            nc = nc.getNotes(True) 
        else :
            return False
        temp= [ x.comment for x in nc if x.version == int(ver) and x.wipversion == int(wip) and x.subject.strip()==subject ]
        
#        for  x in nc:
#            if x.version ==2 and x.wipversion == 1 and x.subject.strip()==subject:
#             print unicode(x.comment)
        temp2 = ''
        for n in temp:
            temp2 += n
            
        return unicode(temp2) if temp2 != '' else ''