From kde-devel Sat Jun 21 22:41:51 2003 From: Russell Miller Date: Sat, 21 Jun 2003 22:41:51 +0000 To: kde-devel Subject: Re: Hex editor widget X-MARC-Message: https://marc.info/?l=kde-devel&m=105623567914278 Very nice. That looks like it will fit the bill nicely. What is more valuable to me is API documentation. I'll be willing to write that if you can tell me where to find the code once the API is stable. The code being well-commented will be even more helpful in that effort. You know what might be an interesting feature - to be able to color the hex numbers differently depending on whether they're control characters, ASCII characters, etc. Maybe tint it red for ASCII characters. That shouldn't alter its usefulness for binary files/variables, and should make it much easier to keep track of where a string starts or ends. blue = ascii green = control red = null ('\0') blach = everything else --Russell On Sat, Jun 21, 2003 at 11:17:17AM +0200, Friedrich W. H. Kossebau wrote: > Am Samstag, 21. Juni 2003 00:40 schrieb Reinhold Kainhofer: > > Is there any widget for KDE to edit arbitrary data in hexadecimal mode? > > Very soon, I hope :) > I needed one myself, found none suiting my needs, and so I am in the middle of > writing one. Viewing is implemented (see attached screenshot, here as KPart > in Konqueror), editing is in the works. I try to offer at least all the > features found in the widget of KHexEdit, and more (hey, one can even zoom > already ;) > > The API will be close to QTextEditor, not at least because both are subclassed > from QScrollView (mainly QTextEditor serves as my template for an editor, I > hope the Trolls know best how to use Qt ;) > > > I only found the class CHexViewWidget in kdeutils/khexedit, but > > unfortunately CHexBuffer only seems to work with data coming from files, > > but not with data that already exists in memory in the form of a unsigned > > char* (and has never been in a file). > > This has been prepared. There is an abstraction layer to the data buffer to be > displayed/edited so by subclassing that layer one can wok on whatever data he > likes :) The widget itself knows nothing about loading and the like, all it > does is displaying (and editing if not readonly) the data delivered by the > data layer. > > I hope that in two or three weeks (huh, never speek about a time frame when > coding) the main work is done. Then I will offer this widget for integration > in KDE. If you would like to have a look I can send you the actual code (no > editing possible ATM!). > > Any special needs you have for this widget? Or wishes? Or ideas? Tell me! I > might integrate them ;) > > Friedrich > > PS: Next will be a hex diff editor. It is already more or less prepared in the > framework. > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<