Exemple #1
0
 def searchValue(self, value):
   ''' value is what type ? '''
   resultGroup = QtGui.QGraphicsItemGroup() #self.graphicsView.GetScene().createItemGroup(items)     
   log.debug('parsing %s mapping for value %s'%(self.mapping_name, value))
   found = 0 
   for res in self.mapping.search(value):
     found +=1
     resultGroup.addToGroup(widgets.Word(offset,value,scene = self.scene, color = QtCore.Qt.yellow) )
   resultGroup.show()
   self.scene.addItem(resultGroup)
   return resultGroup
Exemple #2
0
 def searchPointers(self):
   self.pointers = QtGui.QGraphicsItemGroup(scene=self.scene) 
   log.info('search %s mapping for pointer'%(self.mapping_name))
   found = 0 
   start = self.mapping.start
   searcher = pointerfinder.PointerSearcher(self.mapping)
   for vaddr in searcher:
     word = self.mapping.readWord(vaddr) #searcher should return [(offset, value)]
     offset = vaddr - start
     self.pointers.addToGroup(widgets.Word(offset, word, scene = self.scene, color = QtCore.Qt.red) )
   # fill the scene
   self.scene.addItem(self.pointers)
   self.pointers.hide()
   self.pointers.setZValue(10) # zValue has to be  > 0
   #self.pointers.setFlag(QtGui.QGraphicsItem.ItemIsSelectable, False)
   return