HexEdit/HexEditWidget.py

changeset 4659
2863d05e83c6
parent 4658
d760763dcc4a
child 4663
e2625053a0e2
equal deleted inserted replaced
4658:d760763dcc4a 4659:2863d05e83c6
747 self.__modified = modified 747 self.__modified = modified
748 self.dataChanged.emit(modified) 748 self.dataChanged.emit(modified)
749 749
750 if not modified and setCleanState: 750 if not modified and setCleanState:
751 self.__undoStack.setClean() 751 self.__undoStack.setClean()
752
753 def selectionToHexString(self):
754 """
755 Public method to get a hexadecimal representation of the selection.
756
757 @return hexadecimal representation of the selection
758 @rtype str
759 """
760 byteArray = self.__chunks.data(self.getSelectionBegin(),
761 self.__getSelectionLength())
762 return self.__toHex(byteArray).decode(encoding="ascii")
752 763
753 def selectionToReadableString(self): 764 def selectionToReadableString(self):
754 """ 765 """
755 Public method to get a formatted representation of the selection. 766 Public method to get a formatted representation of the selection.
756 767

eric ide

mercurial