Documentation/Source/eric6.HexEdit.HexEditWidget.html

changeset 4666
bc52ef526e11
child 4669
d37bfc9ca3b9
equal deleted inserted replaced
4665:30d4972ab403 4666:bc52ef526e11
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.HexEdit.HexEditWidget</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.HexEdit.HexEditWidget</h1>
23 <p>
24 Module implementing an editor for binary data.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>is_Py2</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#HexEditWidget">HexEditWidget</a></td>
34 <td>Class implementing an editor for binary data.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="HexEditWidget" ID="HexEditWidget"></a>
43 <h2>HexEditWidget</h2>
44 <p>
45 Class implementing an editor for binary data.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>canRedoChanged(bool)</dt>
49 <dd>
50 emitted after the redo status has changed
51 </dd><dt>canUndoChanged(bool)</dt>
52 <dd>
53 emitted after the undo status has changed
54 </dd><dt>currentAddressChanged(address)</dt>
55 <dd>
56 emitted to indicate the new
57 cursor position
58 </dd><dt>currentSizeChanged(size)</dt>
59 <dd>
60 emitted to indicate the new size of
61 the data
62 </dd><dt>dataChanged(modified)</dt>
63 <dd>
64 emitted to indicate a change of the data
65 </dd><dt>overwriteModeChanged(state)</dt>
66 <dd>
67 emitted to indicate a change of
68 the overwrite mode
69 </dd><dt>readOnlyChanged(state)</dt>
70 <dd>
71 emitted to indicate a change of the
72 read only state
73 </dd><dt>selectionAvailable(bool)</dt>
74 <dd>
75 emitted to signal a change of the
76 selection
77 </dd>
78 </dl>
79 <h3>Derived from</h3>
80 QAbstractScrollArea
81 <h3>Class Attributes</h3>
82 <table>
83 <tr><td>BYTES_PER_LINE</td></tr><tr><td>HEXCHARS_PER_LINE</td></tr>
84 </table>
85 <h3>Class Methods</h3>
86 <table>
87 <tr><td>None</td></tr>
88 </table>
89 <h3>Methods</h3>
90 <table>
91 <tr>
92 <td><a href="#HexEditWidget.__init__">HexEditWidget</a></td>
93 <td>Constructor</td>
94 </tr><tr>
95 <td><a href="#HexEditWidget.__adjust">__adjust</a></td>
96 <td>Private slot to recalculate pixel positions.</td>
97 </tr><tr>
98 <td><a href="#HexEditWidget.__canRedoChanged">__canRedoChanged</a></td>
99 <td>Private slot handling changes of the Redo state.</td>
100 </tr><tr>
101 <td><a href="#HexEditWidget.__canUndoChanged">__canUndoChanged</a></td>
102 <td>Private slot handling changes of the Undo state.</td>
103 </tr><tr>
104 <td><a href="#HexEditWidget.__dataChangedPrivate">__dataChangedPrivate</a></td>
105 <td>Private slot to handle data changes.</td>
106 </tr><tr>
107 <td><a href="#HexEditWidget.__fromHex">__fromHex</a></td>
108 <td>Private method to convert data of a Python bytearray from hex.</td>
109 </tr><tr>
110 <td><a href="#HexEditWidget.__getSelectionLength">__getSelectionLength</a></td>
111 <td>Private method to get the length of the selection.</td>
112 </tr><tr>
113 <td><a href="#HexEditWidget.__initialize">__initialize</a></td>
114 <td>Private method to do some initialization.</td>
115 </tr><tr>
116 <td><a href="#HexEditWidget.__readBuffers">__readBuffers</a></td>
117 <td>Private method to read the buffers.</td>
118 </tr><tr>
119 <td><a href="#HexEditWidget.__refresh">__refresh</a></td>
120 <td>Private slot to refresh the display.</td>
121 </tr><tr>
122 <td><a href="#HexEditWidget.__resetSelection">__resetSelection</a></td>
123 <td>Private method to reset the selection.</td>
124 </tr><tr>
125 <td><a href="#HexEditWidget.__setData">__setData</a></td>
126 <td>Private method to set the data to show.</td>
127 </tr><tr>
128 <td><a href="#HexEditWidget.__setSelection">__setSelection</a></td>
129 <td>Private method to set the selection.</td>
130 </tr><tr>
131 <td><a href="#HexEditWidget.__toHex">__toHex</a></td>
132 <td>Private method to convert the data of a Python bytearray to hex.</td>
133 </tr><tr>
134 <td><a href="#HexEditWidget.__toReadable">__toReadable</a></td>
135 <td>Private method to convert some data into a readable format.</td>
136 </tr><tr>
137 <td><a href="#HexEditWidget.__updateCursor">__updateCursor</a></td>
138 <td>Private slot to update the blinking cursor.</td>
139 </tr><tr>
140 <td><a href="#HexEditWidget.addressArea">addressArea</a></td>
141 <td>Public method to get the address area visibility.</td>
142 </tr><tr>
143 <td><a href="#HexEditWidget.addressAreaColors">addressAreaColors</a></td>
144 <td>Public method to get the address area colors.</td>
145 </tr><tr>
146 <td><a href="#HexEditWidget.addressOffset">addressOffset</a></td>
147 <td>Public method to get the address offset.</td>
148 </tr><tr>
149 <td><a href="#HexEditWidget.addressWidth">addressWidth</a></td>
150 <td>Public method to get the minimum width of the address area in characters.</td>
151 </tr><tr>
152 <td><a href="#HexEditWidget.asciiArea">asciiArea</a></td>
153 <td>Public method to get the visibility of the ASCII area.</td>
154 </tr><tr>
155 <td><a href="#HexEditWidget.copy">copy</a></td>
156 <td>Public method to copy the selected bytes to the clipboard.</td>
157 </tr><tr>
158 <td><a href="#HexEditWidget.cursorPosition">cursorPosition</a></td>
159 <td>Public method to get the cursor position.</td>
160 </tr><tr>
161 <td><a href="#HexEditWidget.cursorPositionFromPoint">cursorPositionFromPoint</a></td>
162 <td>Public method to calculate a cursor position from a graphics position.</td>
163 </tr><tr>
164 <td><a href="#HexEditWidget.cut">cut</a></td>
165 <td>Public method to cut the selected bytes and move them to the clipboard.</td>
166 </tr><tr>
167 <td><a href="#HexEditWidget.data">data</a></td>
168 <td>Public method to get the binary data.</td>
169 </tr><tr>
170 <td><a href="#HexEditWidget.dataAt">dataAt</a></td>
171 <td>Public method to get data from a given position.</td>
172 </tr><tr>
173 <td><a href="#HexEditWidget.deleteByte">deleteByte</a></td>
174 <td>Public method to delete the current byte.</td>
175 </tr><tr>
176 <td><a href="#HexEditWidget.deleteByteBack">deleteByteBack</a></td>
177 <td>Public method to delete the previous byte.</td>
178 </tr><tr>
179 <td><a href="#HexEditWidget.deselectAll">deselectAll</a></td>
180 <td>Public method to deselect all data.</td>
181 </tr><tr>
182 <td><a href="#HexEditWidget.editorCommand">editorCommand</a></td>
183 <td>Public method to execute an editor command sent by the eric view manager.</td>
184 </tr><tr>
185 <td><a href="#HexEditWidget.ensureVisible">ensureVisible</a></td>
186 <td>Public method to ensure, that the cursor is visible.</td>
187 </tr><tr>
188 <td><a href="#HexEditWidget.font">font</a></td>
189 <td>Public method to get the font used to show the data.</td>
190 </tr><tr>
191 <td><a href="#HexEditWidget.getSelectionBegin">getSelectionBegin</a></td>
192 <td>Public method to get the start of the selection.</td>
193 </tr><tr>
194 <td><a href="#HexEditWidget.getSelectionEnd">getSelectionEnd</a></td>
195 <td>Public method to get the end of the selection.</td>
196 </tr><tr>
197 <td><a href="#HexEditWidget.hasSelection">hasSelection</a></td>
198 <td>Public method to test for a selection.</td>
199 </tr><tr>
200 <td><a href="#HexEditWidget.highlightColors">highlightColors</a></td>
201 <td>Public method to get the highlight colors.</td>
202 </tr><tr>
203 <td><a href="#HexEditWidget.highlighting">highlighting</a></td>
204 <td>Public method to get the highlighting state.</td>
205 </tr><tr>
206 <td><a href="#HexEditWidget.indexOf">indexOf</a></td>
207 <td>Public method to find the first occurrence of a byte array in our data.</td>
208 </tr><tr>
209 <td><a href="#HexEditWidget.insert">insert</a></td>
210 <td>Public method to insert a byte.</td>
211 </tr><tr>
212 <td><a href="#HexEditWidget.insertByteArray">insertByteArray</a></td>
213 <td>Public method to insert bytes.</td>
214 </tr><tr>
215 <td><a href="#HexEditWidget.isModified">isModified</a></td>
216 <td>Public method to check for any modification.</td>
217 </tr><tr>
218 <td><a href="#HexEditWidget.isReadOnly">isReadOnly</a></td>
219 <td>Public method to test the read only state.</td>
220 </tr><tr>
221 <td><a href="#HexEditWidget.keyPressEvent">keyPressEvent</a></td>
222 <td>Protected method to handle key press events.</td>
223 </tr><tr>
224 <td><a href="#HexEditWidget.lastIndexOf">lastIndexOf</a></td>
225 <td>Public method to find the last occurrence of a byte array in our data.</td>
226 </tr><tr>
227 <td><a href="#HexEditWidget.mouseMoveEvent">mouseMoveEvent</a></td>
228 <td>Protected method to handle mouse moves.</td>
229 </tr><tr>
230 <td><a href="#HexEditWidget.mousePressEvent">mousePressEvent</a></td>
231 <td>Protected method to handle mouse button presses.</td>
232 </tr><tr>
233 <td><a href="#HexEditWidget.moveCursorToEndOfDocument">moveCursorToEndOfDocument</a></td>
234 <td>Public method to move the cursor to the end of the data.</td>
235 </tr><tr>
236 <td><a href="#HexEditWidget.moveCursorToEndOfLine">moveCursorToEndOfLine</a></td>
237 <td>Public method to move the cursor to the end of the current line.</td>
238 </tr><tr>
239 <td><a href="#HexEditWidget.moveCursorToNextChar">moveCursorToNextChar</a></td>
240 <td>Public method to move the cursor to the next byte.</td>
241 </tr><tr>
242 <td><a href="#HexEditWidget.moveCursorToNextLine">moveCursorToNextLine</a></td>
243 <td>Public method to move the cursor to the next line.</td>
244 </tr><tr>
245 <td><a href="#HexEditWidget.moveCursorToNextPage">moveCursorToNextPage</a></td>
246 <td>Public method to move the cursor to the next page.</td>
247 </tr><tr>
248 <td><a href="#HexEditWidget.moveCursorToPreviousChar">moveCursorToPreviousChar</a></td>
249 <td>Public method to move the cursor to the previous byte.</td>
250 </tr><tr>
251 <td><a href="#HexEditWidget.moveCursorToPreviousLine">moveCursorToPreviousLine</a></td>
252 <td>Public method to move the cursor to the previous line.</td>
253 </tr><tr>
254 <td><a href="#HexEditWidget.moveCursorToPreviousPage">moveCursorToPreviousPage</a></td>
255 <td>Public method to move the cursor to the previous page.</td>
256 </tr><tr>
257 <td><a href="#HexEditWidget.moveCursorToStartOfDocument">moveCursorToStartOfDocument</a></td>
258 <td>Public method to move the cursor to the start of the data.</td>
259 </tr><tr>
260 <td><a href="#HexEditWidget.moveCursorToStartOfLine">moveCursorToStartOfLine</a></td>
261 <td>Public method to move the cursor to the beginning of the current line.</td>
262 </tr><tr>
263 <td><a href="#HexEditWidget.overwriteMode">overwriteMode</a></td>
264 <td>Public method to get the overwrite mode.</td>
265 </tr><tr>
266 <td><a href="#HexEditWidget.paintEvent">paintEvent</a></td>
267 <td>Protected method to handle paint events.</td>
268 </tr><tr>
269 <td><a href="#HexEditWidget.paste">paste</a></td>
270 <td>Public method to paste bytes from the clipboard.</td>
271 </tr><tr>
272 <td><a href="#HexEditWidget.redo">redo</a></td>
273 <td>Public slot to redo the last operation.</td>
274 </tr><tr>
275 <td><a href="#HexEditWidget.remove">remove</a></td>
276 <td>Public method to remove bytes.</td>
277 </tr><tr>
278 <td><a href="#HexEditWidget.replace">replace</a></td>
279 <td>Public method to replace a byte.</td>
280 </tr><tr>
281 <td><a href="#HexEditWidget.replaceByteArray">replaceByteArray</a></td>
282 <td>Public method to replace bytes.</td>
283 </tr><tr>
284 <td><a href="#HexEditWidget.resizeEvent">resizeEvent</a></td>
285 <td>Protected method to handle resize events.</td>
286 </tr><tr>
287 <td><a href="#HexEditWidget.revertToUnmodified">revertToUnmodified</a></td>
288 <td>Public slot to revert all changes.</td>
289 </tr><tr>
290 <td><a href="#HexEditWidget.selectAll">selectAll</a></td>
291 <td>Public method to select all data.</td>
292 </tr><tr>
293 <td><a href="#HexEditWidget.selectEndOfDocument">selectEndOfDocument</a></td>
294 <td>Public method to extend the selection to the end of the data.</td>
295 </tr><tr>
296 <td><a href="#HexEditWidget.selectNextChar">selectNextChar</a></td>
297 <td>Public method to extend the selection by one byte right.</td>
298 </tr><tr>
299 <td><a href="#HexEditWidget.selectNextLine">selectNextLine</a></td>
300 <td>Public method to extend the selection one line down.</td>
301 </tr><tr>
302 <td><a href="#HexEditWidget.selectNextPage">selectNextPage</a></td>
303 <td>Public method to extend the selection one page down.</td>
304 </tr><tr>
305 <td><a href="#HexEditWidget.selectPreviousChar">selectPreviousChar</a></td>
306 <td>Public method to extend the selection by one byte left.</td>
307 </tr><tr>
308 <td><a href="#HexEditWidget.selectPreviousLine">selectPreviousLine</a></td>
309 <td>Public method to extend the selection one line up.</td>
310 </tr><tr>
311 <td><a href="#HexEditWidget.selectPreviousPage">selectPreviousPage</a></td>
312 <td>Public method to extend the selection one page up.</td>
313 </tr><tr>
314 <td><a href="#HexEditWidget.selectStartOfDocument">selectStartOfDocument</a></td>
315 <td>Public method to extend the selection to the start of the data.</td>
316 </tr><tr>
317 <td><a href="#HexEditWidget.selectToEndOfLine">selectToEndOfLine</a></td>
318 <td>Public method to extend the selection to the end of line.</td>
319 </tr><tr>
320 <td><a href="#HexEditWidget.selectToStartOfLine">selectToStartOfLine</a></td>
321 <td>Public method to extend the selection to the start of line.</td>
322 </tr><tr>
323 <td><a href="#HexEditWidget.selectionColors">selectionColors</a></td>
324 <td>Public method to get the selection colors.</td>
325 </tr><tr>
326 <td><a href="#HexEditWidget.selectionToHexString">selectionToHexString</a></td>
327 <td>Public method to get a hexadecimal representation of the selection.</td>
328 </tr><tr>
329 <td><a href="#HexEditWidget.selectionToReadableString">selectionToReadableString</a></td>
330 <td>Public method to get a formatted representation of the selection.</td>
331 </tr><tr>
332 <td><a href="#HexEditWidget.setAddressArea">setAddressArea</a></td>
333 <td>Public method to set the address area visibility.</td>
334 </tr><tr>
335 <td><a href="#HexEditWidget.setAddressAreaColors">setAddressAreaColors</a></td>
336 <td>Public method to set the address area colors.</td>
337 </tr><tr>
338 <td><a href="#HexEditWidget.setAddressOffset">setAddressOffset</a></td>
339 <td>Public method to set the address offset.</td>
340 </tr><tr>
341 <td><a href="#HexEditWidget.setAddressWidth">setAddressWidth</a></td>
342 <td>Public method to set the width of the address area.</td>
343 </tr><tr>
344 <td><a href="#HexEditWidget.setAsciiArea">setAsciiArea</a></td>
345 <td>Public method to set the visibility of the ASCII area.</td>
346 </tr><tr>
347 <td><a href="#HexEditWidget.setCursorPosition">setCursorPosition</a></td>
348 <td>Public method to set the cursor position.</td>
349 </tr><tr>
350 <td><a href="#HexEditWidget.setData">setData</a></td>
351 <td>Public method to set the data to show.</td>
352 </tr><tr>
353 <td><a href="#HexEditWidget.setFont">setFont</a></td>
354 <td>Public method to set the font used to show the data.</td>
355 </tr><tr>
356 <td><a href="#HexEditWidget.setHighlightColors">setHighlightColors</a></td>
357 <td>Public method to set the highlight colors.</td>
358 </tr><tr>
359 <td><a href="#HexEditWidget.setHighlighting">setHighlighting</a></td>
360 <td>Public method to set the highlighting state.</td>
361 </tr><tr>
362 <td><a href="#HexEditWidget.setModified">setModified</a></td>
363 <td>Public slot to set the modified flag.</td>
364 </tr><tr>
365 <td><a href="#HexEditWidget.setOverwriteMode">setOverwriteMode</a></td>
366 <td>Public method to set the overwrite mode.</td>
367 </tr><tr>
368 <td><a href="#HexEditWidget.setReadOnly">setReadOnly</a></td>
369 <td>Public method to set the read only state.</td>
370 </tr><tr>
371 <td><a href="#HexEditWidget.setSelectionColors">setSelectionColors</a></td>
372 <td>Public method to set the selection colors.</td>
373 </tr><tr>
374 <td><a href="#HexEditWidget.toReadableString">toReadableString</a></td>
375 <td>Public method to get a formatted representation of our data.</td>
376 </tr><tr>
377 <td><a href="#HexEditWidget.undo">undo</a></td>
378 <td>Public slot to undo the last operation.</td>
379 </tr><tr>
380 <td><a href="#HexEditWidget.undoStack">undoStack</a></td>
381 <td>Public method to get a reference to the undo stack.</td>
382 </tr><tr>
383 <td><a href="#HexEditWidget.write">write</a></td>
384 <td>Public method to write data from a given position to a device.</td>
385 </tr>
386 </table>
387 <h3>Static Methods</h3>
388 <table>
389 <tr><td>None</td></tr>
390 </table>
391 <a NAME="HexEditWidget.__init__" ID="HexEditWidget.__init__"></a>
392 <h4>HexEditWidget (Constructor)</h4>
393 <b>HexEditWidget</b>(<i>parent=None, embedded=False</i>)
394 <p>
395 Constructor
396 </p><dl>
397 <dt><i>parent</i> (QWidget)</dt>
398 <dd>
399 refernce to the parent widget
400 </dd><dt><i>embedded</i> (bool)</dt>
401 <dd>
402 flag indicating an eric embedded hex editor
403 </dd>
404 </dl><a NAME="HexEditWidget.__adjust" ID="HexEditWidget.__adjust"></a>
405 <h4>HexEditWidget.__adjust</h4>
406 <b>__adjust</b>(<i></i>)
407 <p>
408 Private slot to recalculate pixel positions.
409 </p><a NAME="HexEditWidget.__canRedoChanged" ID="HexEditWidget.__canRedoChanged"></a>
410 <h4>HexEditWidget.__canRedoChanged</h4>
411 <b>__canRedoChanged</b>(<i></i>)
412 <p>
413 Private slot handling changes of the Redo state.
414 </p><a NAME="HexEditWidget.__canUndoChanged" ID="HexEditWidget.__canUndoChanged"></a>
415 <h4>HexEditWidget.__canUndoChanged</h4>
416 <b>__canUndoChanged</b>(<i></i>)
417 <p>
418 Private slot handling changes of the Undo state.
419 </p><a NAME="HexEditWidget.__dataChangedPrivate" ID="HexEditWidget.__dataChangedPrivate"></a>
420 <h4>HexEditWidget.__dataChangedPrivate</h4>
421 <b>__dataChangedPrivate</b>(<i>idx=0</i>)
422 <p>
423 Private slot to handle data changes.
424 </p><dl>
425 <dt><i>idx</i> (int)</dt>
426 <dd>
427 index
428 </dd>
429 </dl><a NAME="HexEditWidget.__fromHex" ID="HexEditWidget.__fromHex"></a>
430 <h4>HexEditWidget.__fromHex</h4>
431 <b>__fromHex</b>(<i>byteArray</i>)
432 <p>
433 Private method to convert data of a Python bytearray from hex.
434 </p><dl>
435 <dt><i>byteArray</i> (bytearray)</dt>
436 <dd>
437 byte array to be converted
438 </dd>
439 </dl><dl>
440 <dt>Returns:</dt>
441 <dd>
442 converted data
443 </dd>
444 </dl><dl>
445 <dt>Return Type:</dt>
446 <dd>
447 bytearray
448 </dd>
449 </dl><a NAME="HexEditWidget.__getSelectionLength" ID="HexEditWidget.__getSelectionLength"></a>
450 <h4>HexEditWidget.__getSelectionLength</h4>
451 <b>__getSelectionLength</b>(<i></i>)
452 <p>
453 Private method to get the length of the selection.
454 </p><dl>
455 <dt>Returns:</dt>
456 <dd>
457 selection length
458 </dd>
459 </dl><dl>
460 <dt>Return Type:</dt>
461 <dd>
462 int
463 </dd>
464 </dl><a NAME="HexEditWidget.__initialize" ID="HexEditWidget.__initialize"></a>
465 <h4>HexEditWidget.__initialize</h4>
466 <b>__initialize</b>(<i></i>)
467 <p>
468 Private method to do some initialization.
469 </p><a NAME="HexEditWidget.__readBuffers" ID="HexEditWidget.__readBuffers"></a>
470 <h4>HexEditWidget.__readBuffers</h4>
471 <b>__readBuffers</b>(<i></i>)
472 <p>
473 Private method to read the buffers.
474 </p><a NAME="HexEditWidget.__refresh" ID="HexEditWidget.__refresh"></a>
475 <h4>HexEditWidget.__refresh</h4>
476 <b>__refresh</b>(<i></i>)
477 <p>
478 Private slot to refresh the display.
479 </p><a NAME="HexEditWidget.__resetSelection" ID="HexEditWidget.__resetSelection"></a>
480 <h4>HexEditWidget.__resetSelection</h4>
481 <b>__resetSelection</b>(<i>pos=None</i>)
482 <p>
483 Private method to reset the selection.
484 </p><dl>
485 <dt><i>pos</i> (int or None)</dt>
486 <dd>
487 position to set selection start and end to
488 (if this is None, selection end is set to selection start)
489 </dd>
490 </dl><a NAME="HexEditWidget.__setData" ID="HexEditWidget.__setData"></a>
491 <h4>HexEditWidget.__setData</h4>
492 <b>__setData</b>(<i>ioDevice</i>)
493 <p>
494 Private method to set the data to show.
495 </p><dl>
496 <dt><i>ioDevice</i> (QIODevice)</dt>
497 <dd>
498 device containing the data
499 </dd>
500 </dl><dl>
501 <dt>Returns:</dt>
502 <dd>
503 flag indicating success
504 </dd>
505 </dl><dl>
506 <dt>Return Type:</dt>
507 <dd>
508 bool
509 </dd>
510 </dl><a NAME="HexEditWidget.__setSelection" ID="HexEditWidget.__setSelection"></a>
511 <h4>HexEditWidget.__setSelection</h4>
512 <b>__setSelection</b>(<i>pos</i>)
513 <p>
514 Private method to set the selection.
515 </p><dl>
516 <dt><i>pos</i> (int)</dt>
517 <dd>
518 position
519 </dd>
520 </dl><a NAME="HexEditWidget.__toHex" ID="HexEditWidget.__toHex"></a>
521 <h4>HexEditWidget.__toHex</h4>
522 <b>__toHex</b>(<i>byteArray</i>)
523 <p>
524 Private method to convert the data of a Python bytearray to hex.
525 </p><dl>
526 <dt><i>byteArray</i> (bytearray)</dt>
527 <dd>
528 byte array to be converted
529 </dd>
530 </dl><dl>
531 <dt>Returns:</dt>
532 <dd>
533 converted data
534 </dd>
535 </dl><dl>
536 <dt>Return Type:</dt>
537 <dd>
538 bytearray
539 </dd>
540 </dl><a NAME="HexEditWidget.__toReadable" ID="HexEditWidget.__toReadable"></a>
541 <h4>HexEditWidget.__toReadable</h4>
542 <b>__toReadable</b>(<i>byteArray</i>)
543 <p>
544 Private method to convert some data into a readable format.
545 </p><dl>
546 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
547 <dd>
548 data to be converted
549 </dd>
550 </dl><dl>
551 <dt>Returns:</dt>
552 <dd>
553 readable data
554 </dd>
555 </dl><dl>
556 <dt>Return Type:</dt>
557 <dd>
558 str
559 </dd>
560 </dl><a NAME="HexEditWidget.__updateCursor" ID="HexEditWidget.__updateCursor"></a>
561 <h4>HexEditWidget.__updateCursor</h4>
562 <b>__updateCursor</b>(<i></i>)
563 <p>
564 Private slot to update the blinking cursor.
565 </p><a NAME="HexEditWidget.addressArea" ID="HexEditWidget.addressArea"></a>
566 <h4>HexEditWidget.addressArea</h4>
567 <b>addressArea</b>(<i></i>)
568 <p>
569 Public method to get the address area visibility.
570 </p><dl>
571 <dt>Returns:</dt>
572 <dd>
573 flag indicating the address area visibility
574 </dd>
575 </dl><dl>
576 <dt>Return Type:</dt>
577 <dd>
578 bool
579 </dd>
580 </dl><a NAME="HexEditWidget.addressAreaColors" ID="HexEditWidget.addressAreaColors"></a>
581 <h4>HexEditWidget.addressAreaColors</h4>
582 <b>addressAreaColors</b>(<i></i>)
583 <p>
584 Public method to get the address area colors.
585 </p><dl>
586 <dt>Returns:</dt>
587 <dd>
588 address area foreground and background colors
589 </dd>
590 </dl><dl>
591 <dt>Return Type:</dt>
592 <dd>
593 tuple of 2 QColor
594 </dd>
595 </dl><a NAME="HexEditWidget.addressOffset" ID="HexEditWidget.addressOffset"></a>
596 <h4>HexEditWidget.addressOffset</h4>
597 <b>addressOffset</b>(<i></i>)
598 <p>
599 Public method to get the address offset.
600 </p><dl>
601 <dt>Returns:</dt>
602 <dd>
603 address offset
604 </dd>
605 </dl><dl>
606 <dt>Return Type:</dt>
607 <dd>
608 int
609 </dd>
610 </dl><a NAME="HexEditWidget.addressWidth" ID="HexEditWidget.addressWidth"></a>
611 <h4>HexEditWidget.addressWidth</h4>
612 <b>addressWidth</b>(<i></i>)
613 <p>
614 Public method to get the minimum width of the address area in
615 characters.
616 </p><dl>
617 <dt>Returns:</dt>
618 <dd>
619 minimum width of the address area
620 </dd>
621 </dl><dl>
622 <dt>Return Type:</dt>
623 <dd>
624 int
625 </dd>
626 </dl><a NAME="HexEditWidget.asciiArea" ID="HexEditWidget.asciiArea"></a>
627 <h4>HexEditWidget.asciiArea</h4>
628 <b>asciiArea</b>(<i></i>)
629 <p>
630 Public method to get the visibility of the ASCII area.
631 </p><dl>
632 <dt>Returns:</dt>
633 <dd>
634 visibility of the ASCII area
635 </dd>
636 </dl><dl>
637 <dt>Return Type:</dt>
638 <dd>
639 bool
640 </dd>
641 </dl><a NAME="HexEditWidget.copy" ID="HexEditWidget.copy"></a>
642 <h4>HexEditWidget.copy</h4>
643 <b>copy</b>(<i></i>)
644 <p>
645 Public method to copy the selected bytes to the clipboard.
646 </p><a NAME="HexEditWidget.cursorPosition" ID="HexEditWidget.cursorPosition"></a>
647 <h4>HexEditWidget.cursorPosition</h4>
648 <b>cursorPosition</b>(<i></i>)
649 <p>
650 Public method to get the cursor position.
651 </p><dl>
652 <dt>Returns:</dt>
653 <dd>
654 cursor position
655 </dd>
656 </dl><dl>
657 <dt>Return Type:</dt>
658 <dd>
659 int
660 </dd>
661 </dl><a NAME="HexEditWidget.cursorPositionFromPoint" ID="HexEditWidget.cursorPositionFromPoint"></a>
662 <h4>HexEditWidget.cursorPositionFromPoint</h4>
663 <b>cursorPositionFromPoint</b>(<i>point</i>)
664 <p>
665 Public method to calculate a cursor position from a graphics position.
666 </p><dl>
667 <dt><i>point</i> (QPoint)</dt>
668 <dd>
669 graphics position
670 </dd>
671 </dl><dl>
672 <dt>Returns:</dt>
673 <dd>
674 cursor position
675 </dd>
676 </dl><dl>
677 <dt>Return Type:</dt>
678 <dd>
679 int
680 </dd>
681 </dl><a NAME="HexEditWidget.cut" ID="HexEditWidget.cut"></a>
682 <h4>HexEditWidget.cut</h4>
683 <b>cut</b>(<i></i>)
684 <p>
685 Public method to cut the selected bytes and move them to the clipboard.
686 </p><a NAME="HexEditWidget.data" ID="HexEditWidget.data"></a>
687 <h4>HexEditWidget.data</h4>
688 <b>data</b>(<i></i>)
689 <p>
690 Public method to get the binary data.
691 </p><dl>
692 <dt>Returns:</dt>
693 <dd>
694 binary data
695 </dd>
696 </dl><dl>
697 <dt>Return Type:</dt>
698 <dd>
699 bytearray
700 </dd>
701 </dl><a NAME="HexEditWidget.dataAt" ID="HexEditWidget.dataAt"></a>
702 <h4>HexEditWidget.dataAt</h4>
703 <b>dataAt</b>(<i>pos, count=-1</i>)
704 <p>
705 Public method to get data from a given position.
706 </p><dl>
707 <dt><i>pos</i> (int)</dt>
708 <dd>
709 position to get data from
710 </dd><dt><i>count</i> (int)</dt>
711 <dd>
712 amount of bytes to get
713 </dd>
714 </dl><dl>
715 <dt>Returns:</dt>
716 <dd>
717 requested data
718 </dd>
719 </dl><dl>
720 <dt>Return Type:</dt>
721 <dd>
722 bytearray
723 </dd>
724 </dl><a NAME="HexEditWidget.deleteByte" ID="HexEditWidget.deleteByte"></a>
725 <h4>HexEditWidget.deleteByte</h4>
726 <b>deleteByte</b>(<i></i>)
727 <p>
728 Public method to delete the current byte.
729 </p><a NAME="HexEditWidget.deleteByteBack" ID="HexEditWidget.deleteByteBack"></a>
730 <h4>HexEditWidget.deleteByteBack</h4>
731 <b>deleteByteBack</b>(<i></i>)
732 <p>
733 Public method to delete the previous byte.
734 </p><a NAME="HexEditWidget.deselectAll" ID="HexEditWidget.deselectAll"></a>
735 <h4>HexEditWidget.deselectAll</h4>
736 <b>deselectAll</b>(<i></i>)
737 <p>
738 Public method to deselect all data.
739 </p><a NAME="HexEditWidget.editorCommand" ID="HexEditWidget.editorCommand"></a>
740 <h4>HexEditWidget.editorCommand</h4>
741 <b>editorCommand</b>(<i>cmd</i>)
742 <p>
743 Public method to execute an editor command sent by the eric
744 view manager.
745 </p><dl>
746 <dt><i>cmd</i> (int)</dt>
747 <dd>
748 QScintilla command
749 </dd>
750 </dl><a NAME="HexEditWidget.ensureVisible" ID="HexEditWidget.ensureVisible"></a>
751 <h4>HexEditWidget.ensureVisible</h4>
752 <b>ensureVisible</b>(<i></i>)
753 <p>
754 Public method to ensure, that the cursor is visible.
755 </p><a NAME="HexEditWidget.font" ID="HexEditWidget.font"></a>
756 <h4>HexEditWidget.font</h4>
757 <b>font</b>(<i></i>)
758 <p>
759 Public method to get the font used to show the data.
760 </p><dl>
761 <dt>Returns:</dt>
762 <dd>
763 font used to show the data
764 </dd>
765 </dl><dl>
766 <dt>Return Type:</dt>
767 <dd>
768 QFont
769 </dd>
770 </dl><a NAME="HexEditWidget.getSelectionBegin" ID="HexEditWidget.getSelectionBegin"></a>
771 <h4>HexEditWidget.getSelectionBegin</h4>
772 <b>getSelectionBegin</b>(<i></i>)
773 <p>
774 Public method to get the start of the selection.
775 </p><dl>
776 <dt>Returns:</dt>
777 <dd>
778 selection start
779 </dd>
780 </dl><dl>
781 <dt>Return Type:</dt>
782 <dd>
783 int
784 </dd>
785 </dl><a NAME="HexEditWidget.getSelectionEnd" ID="HexEditWidget.getSelectionEnd"></a>
786 <h4>HexEditWidget.getSelectionEnd</h4>
787 <b>getSelectionEnd</b>(<i></i>)
788 <p>
789 Public method to get the end of the selection.
790 </p><dl>
791 <dt>Returns:</dt>
792 <dd>
793 selection end
794 </dd>
795 </dl><dl>
796 <dt>Return Type:</dt>
797 <dd>
798 int
799 </dd>
800 </dl><a NAME="HexEditWidget.hasSelection" ID="HexEditWidget.hasSelection"></a>
801 <h4>HexEditWidget.hasSelection</h4>
802 <b>hasSelection</b>(<i></i>)
803 <p>
804 Public method to test for a selection.
805 </p><dl>
806 <dt>Returns:</dt>
807 <dd>
808 flag indicating the presence of a selection
809 </dd>
810 </dl><dl>
811 <dt>Return Type:</dt>
812 <dd>
813 bool
814 </dd>
815 </dl><a NAME="HexEditWidget.highlightColors" ID="HexEditWidget.highlightColors"></a>
816 <h4>HexEditWidget.highlightColors</h4>
817 <b>highlightColors</b>(<i></i>)
818 <p>
819 Public method to get the highlight colors.
820 </p><dl>
821 <dt>Returns:</dt>
822 <dd>
823 highlight foreground and background colors
824 </dd>
825 </dl><dl>
826 <dt>Return Type:</dt>
827 <dd>
828 tuple of 2 QColor
829 </dd>
830 </dl><a NAME="HexEditWidget.highlighting" ID="HexEditWidget.highlighting"></a>
831 <h4>HexEditWidget.highlighting</h4>
832 <b>highlighting</b>(<i></i>)
833 <p>
834 Public method to get the highlighting state.
835 </p><dl>
836 <dt>Returns:</dt>
837 <dd>
838 highlighting state
839 </dd>
840 </dl><dl>
841 <dt>Return Type:</dt>
842 <dd>
843 bool
844 </dd>
845 </dl><a NAME="HexEditWidget.indexOf" ID="HexEditWidget.indexOf"></a>
846 <h4>HexEditWidget.indexOf</h4>
847 <b>indexOf</b>(<i>byteArray, start</i>)
848 <p>
849 Public method to find the first occurrence of a byte array in our data.
850 </p><dl>
851 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
852 <dd>
853 data to search for
854 </dd><dt><i>start</i> (int)</dt>
855 <dd>
856 start position of the search
857 </dd>
858 </dl><dl>
859 <dt>Returns:</dt>
860 <dd>
861 position of match (or -1 if not found)
862 </dd>
863 </dl><dl>
864 <dt>Return Type:</dt>
865 <dd>
866 int
867 </dd>
868 </dl><a NAME="HexEditWidget.insert" ID="HexEditWidget.insert"></a>
869 <h4>HexEditWidget.insert</h4>
870 <b>insert</b>(<i>pos, ch</i>)
871 <p>
872 Public method to insert a byte.
873 </p><dl>
874 <dt><i>pos</i> (int)</dt>
875 <dd>
876 position to insert the byte at
877 </dd><dt><i>ch</i> (int in the range 0x00 to 0xff)</dt>
878 <dd>
879 byte to insert
880 </dd>
881 </dl><a NAME="HexEditWidget.insertByteArray" ID="HexEditWidget.insertByteArray"></a>
882 <h4>HexEditWidget.insertByteArray</h4>
883 <b>insertByteArray</b>(<i>pos, byteArray</i>)
884 <p>
885 Public method to insert bytes.
886 </p><dl>
887 <dt><i>pos</i> (int)</dt>
888 <dd>
889 position to insert the bytes at
890 </dd><dt><i>byteArray</i> (bytearray or QByteArray)</dt>
891 <dd>
892 bytes to be insert
893 </dd>
894 </dl><a NAME="HexEditWidget.isModified" ID="HexEditWidget.isModified"></a>
895 <h4>HexEditWidget.isModified</h4>
896 <b>isModified</b>(<i></i>)
897 <p>
898 Public method to check for any modification.
899 </p><dl>
900 <dt>Returns:</dt>
901 <dd>
902 flag indicating a modified state
903 </dd>
904 </dl><dl>
905 <dt>Return Type:</dt>
906 <dd>
907 bool
908 </dd>
909 </dl><a NAME="HexEditWidget.isReadOnly" ID="HexEditWidget.isReadOnly"></a>
910 <h4>HexEditWidget.isReadOnly</h4>
911 <b>isReadOnly</b>(<i></i>)
912 <p>
913 Public method to test the read only state.
914 </p><dl>
915 <dt>Returns:</dt>
916 <dd>
917 flag indicating the read only state
918 </dd>
919 </dl><dl>
920 <dt>Return Type:</dt>
921 <dd>
922 bool
923 </dd>
924 </dl><a NAME="HexEditWidget.keyPressEvent" ID="HexEditWidget.keyPressEvent"></a>
925 <h4>HexEditWidget.keyPressEvent</h4>
926 <b>keyPressEvent</b>(<i>evt</i>)
927 <p>
928 Protected method to handle key press events.
929 </p><dl>
930 <dt><i>evt</i> (QKeyEvent)</dt>
931 <dd>
932 reference to the key event
933 </dd>
934 </dl><a NAME="HexEditWidget.lastIndexOf" ID="HexEditWidget.lastIndexOf"></a>
935 <h4>HexEditWidget.lastIndexOf</h4>
936 <b>lastIndexOf</b>(<i>byteArray, start</i>)
937 <p>
938 Public method to find the last occurrence of a byte array in our data.
939 </p><dl>
940 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
941 <dd>
942 data to search for
943 </dd><dt><i>start</i> (int)</dt>
944 <dd>
945 start position of the search
946 </dd>
947 </dl><dl>
948 <dt>Returns:</dt>
949 <dd>
950 position of match (or -1 if not found)
951 </dd>
952 </dl><dl>
953 <dt>Return Type:</dt>
954 <dd>
955 int
956 </dd>
957 </dl><a NAME="HexEditWidget.mouseMoveEvent" ID="HexEditWidget.mouseMoveEvent"></a>
958 <h4>HexEditWidget.mouseMoveEvent</h4>
959 <b>mouseMoveEvent</b>(<i>evt</i>)
960 <p>
961 Protected method to handle mouse moves.
962 </p><dl>
963 <dt><i>evt</i> (QMouseEvent)</dt>
964 <dd>
965 reference to the mouse event
966 </dd>
967 </dl><a NAME="HexEditWidget.mousePressEvent" ID="HexEditWidget.mousePressEvent"></a>
968 <h4>HexEditWidget.mousePressEvent</h4>
969 <b>mousePressEvent</b>(<i>evt</i>)
970 <p>
971 Protected method to handle mouse button presses.
972 </p><dl>
973 <dt><i>evt</i> (QMouseEvent)</dt>
974 <dd>
975 reference to the mouse event
976 </dd>
977 </dl><a NAME="HexEditWidget.moveCursorToEndOfDocument" ID="HexEditWidget.moveCursorToEndOfDocument"></a>
978 <h4>HexEditWidget.moveCursorToEndOfDocument</h4>
979 <b>moveCursorToEndOfDocument</b>(<i></i>)
980 <p>
981 Public method to move the cursor to the end of the data.
982 </p><a NAME="HexEditWidget.moveCursorToEndOfLine" ID="HexEditWidget.moveCursorToEndOfLine"></a>
983 <h4>HexEditWidget.moveCursorToEndOfLine</h4>
984 <b>moveCursorToEndOfLine</b>(<i></i>)
985 <p>
986 Public method to move the cursor to the end of the current line.
987 </p><a NAME="HexEditWidget.moveCursorToNextChar" ID="HexEditWidget.moveCursorToNextChar"></a>
988 <h4>HexEditWidget.moveCursorToNextChar</h4>
989 <b>moveCursorToNextChar</b>(<i></i>)
990 <p>
991 Public method to move the cursor to the next byte.
992 </p><a NAME="HexEditWidget.moveCursorToNextLine" ID="HexEditWidget.moveCursorToNextLine"></a>
993 <h4>HexEditWidget.moveCursorToNextLine</h4>
994 <b>moveCursorToNextLine</b>(<i></i>)
995 <p>
996 Public method to move the cursor to the next line.
997 </p><a NAME="HexEditWidget.moveCursorToNextPage" ID="HexEditWidget.moveCursorToNextPage"></a>
998 <h4>HexEditWidget.moveCursorToNextPage</h4>
999 <b>moveCursorToNextPage</b>(<i></i>)
1000 <p>
1001 Public method to move the cursor to the next page.
1002 </p><a NAME="HexEditWidget.moveCursorToPreviousChar" ID="HexEditWidget.moveCursorToPreviousChar"></a>
1003 <h4>HexEditWidget.moveCursorToPreviousChar</h4>
1004 <b>moveCursorToPreviousChar</b>(<i></i>)
1005 <p>
1006 Public method to move the cursor to the previous byte.
1007 </p><a NAME="HexEditWidget.moveCursorToPreviousLine" ID="HexEditWidget.moveCursorToPreviousLine"></a>
1008 <h4>HexEditWidget.moveCursorToPreviousLine</h4>
1009 <b>moveCursorToPreviousLine</b>(<i></i>)
1010 <p>
1011 Public method to move the cursor to the previous line.
1012 </p><a NAME="HexEditWidget.moveCursorToPreviousPage" ID="HexEditWidget.moveCursorToPreviousPage"></a>
1013 <h4>HexEditWidget.moveCursorToPreviousPage</h4>
1014 <b>moveCursorToPreviousPage</b>(<i></i>)
1015 <p>
1016 Public method to move the cursor to the previous page.
1017 </p><a NAME="HexEditWidget.moveCursorToStartOfDocument" ID="HexEditWidget.moveCursorToStartOfDocument"></a>
1018 <h4>HexEditWidget.moveCursorToStartOfDocument</h4>
1019 <b>moveCursorToStartOfDocument</b>(<i></i>)
1020 <p>
1021 Public method to move the cursor to the start of the data.
1022 </p><a NAME="HexEditWidget.moveCursorToStartOfLine" ID="HexEditWidget.moveCursorToStartOfLine"></a>
1023 <h4>HexEditWidget.moveCursorToStartOfLine</h4>
1024 <b>moveCursorToStartOfLine</b>(<i></i>)
1025 <p>
1026 Public method to move the cursor to the beginning of the current line.
1027 </p><a NAME="HexEditWidget.overwriteMode" ID="HexEditWidget.overwriteMode"></a>
1028 <h4>HexEditWidget.overwriteMode</h4>
1029 <b>overwriteMode</b>(<i></i>)
1030 <p>
1031 Public method to get the overwrite mode.
1032 </p><dl>
1033 <dt>Returns:</dt>
1034 <dd>
1035 overwrite mode
1036 </dd>
1037 </dl><dl>
1038 <dt>Return Type:</dt>
1039 <dd>
1040 bool
1041 </dd>
1042 </dl><a NAME="HexEditWidget.paintEvent" ID="HexEditWidget.paintEvent"></a>
1043 <h4>HexEditWidget.paintEvent</h4>
1044 <b>paintEvent</b>(<i>evt</i>)
1045 <p>
1046 Protected method to handle paint events.
1047 </p><dl>
1048 <dt><i>evt</i> (QPaintEvent)</dt>
1049 <dd>
1050 reference to the paint event
1051 </dd>
1052 </dl><a NAME="HexEditWidget.paste" ID="HexEditWidget.paste"></a>
1053 <h4>HexEditWidget.paste</h4>
1054 <b>paste</b>(<i></i>)
1055 <p>
1056 Public method to paste bytes from the clipboard.
1057 </p><a NAME="HexEditWidget.redo" ID="HexEditWidget.redo"></a>
1058 <h4>HexEditWidget.redo</h4>
1059 <b>redo</b>(<i></i>)
1060 <p>
1061 Public slot to redo the last operation.
1062 </p><a NAME="HexEditWidget.remove" ID="HexEditWidget.remove"></a>
1063 <h4>HexEditWidget.remove</h4>
1064 <b>remove</b>(<i>pos, length=1</i>)
1065 <p>
1066 Public method to remove bytes.
1067 </p><dl>
1068 <dt><i>pos</i> (int)</dt>
1069 <dd>
1070 position to remove bytes from
1071 </dd><dt><i>length</i> (int)</dt>
1072 <dd>
1073 amount of bytes to remove
1074 </dd>
1075 </dl><a NAME="HexEditWidget.replace" ID="HexEditWidget.replace"></a>
1076 <h4>HexEditWidget.replace</h4>
1077 <b>replace</b>(<i>pos, ch</i>)
1078 <p>
1079 Public method to replace a byte.
1080 </p><dl>
1081 <dt><i>pos</i> (int)</dt>
1082 <dd>
1083 position to replace the byte at
1084 </dd><dt><i>ch</i> (int in the range 0x00 to 0xff)</dt>
1085 <dd>
1086 byte to replace with
1087 </dd>
1088 </dl><a NAME="HexEditWidget.replaceByteArray" ID="HexEditWidget.replaceByteArray"></a>
1089 <h4>HexEditWidget.replaceByteArray</h4>
1090 <b>replaceByteArray</b>(<i>pos, len, byteArray</i>)
1091 <p>
1092 Public method to replace bytes.
1093 </p><dl>
1094 <dt><i>pos</i> (int)</dt>
1095 <dd>
1096 position to replace the bytes at
1097 </dd><dt><i>len</i> (int)</dt>
1098 <dd>
1099 amount of bytes to replace
1100 </dd><dt><i>byteArray</i> (bytearray or QByteArray)</dt>
1101 <dd>
1102 bytes to replace with
1103 </dd>
1104 </dl><a NAME="HexEditWidget.resizeEvent" ID="HexEditWidget.resizeEvent"></a>
1105 <h4>HexEditWidget.resizeEvent</h4>
1106 <b>resizeEvent</b>(<i>evt</i>)
1107 <p>
1108 Protected method to handle resize events.
1109 </p><dl>
1110 <dt><i>evt</i> (QResizeEvent)</dt>
1111 <dd>
1112 reference to the resize event
1113 </dd>
1114 </dl><a NAME="HexEditWidget.revertToUnmodified" ID="HexEditWidget.revertToUnmodified"></a>
1115 <h4>HexEditWidget.revertToUnmodified</h4>
1116 <b>revertToUnmodified</b>(<i></i>)
1117 <p>
1118 Public slot to revert all changes.
1119 </p><a NAME="HexEditWidget.selectAll" ID="HexEditWidget.selectAll"></a>
1120 <h4>HexEditWidget.selectAll</h4>
1121 <b>selectAll</b>(<i></i>)
1122 <p>
1123 Public method to select all data.
1124 </p><a NAME="HexEditWidget.selectEndOfDocument" ID="HexEditWidget.selectEndOfDocument"></a>
1125 <h4>HexEditWidget.selectEndOfDocument</h4>
1126 <b>selectEndOfDocument</b>(<i></i>)
1127 <p>
1128 Public method to extend the selection to the end of the data.
1129 </p><a NAME="HexEditWidget.selectNextChar" ID="HexEditWidget.selectNextChar"></a>
1130 <h4>HexEditWidget.selectNextChar</h4>
1131 <b>selectNextChar</b>(<i></i>)
1132 <p>
1133 Public method to extend the selection by one byte right.
1134 </p><a NAME="HexEditWidget.selectNextLine" ID="HexEditWidget.selectNextLine"></a>
1135 <h4>HexEditWidget.selectNextLine</h4>
1136 <b>selectNextLine</b>(<i></i>)
1137 <p>
1138 Public method to extend the selection one line down.
1139 </p><a NAME="HexEditWidget.selectNextPage" ID="HexEditWidget.selectNextPage"></a>
1140 <h4>HexEditWidget.selectNextPage</h4>
1141 <b>selectNextPage</b>(<i></i>)
1142 <p>
1143 Public method to extend the selection one page down.
1144 </p><a NAME="HexEditWidget.selectPreviousChar" ID="HexEditWidget.selectPreviousChar"></a>
1145 <h4>HexEditWidget.selectPreviousChar</h4>
1146 <b>selectPreviousChar</b>(<i></i>)
1147 <p>
1148 Public method to extend the selection by one byte left.
1149 </p><a NAME="HexEditWidget.selectPreviousLine" ID="HexEditWidget.selectPreviousLine"></a>
1150 <h4>HexEditWidget.selectPreviousLine</h4>
1151 <b>selectPreviousLine</b>(<i></i>)
1152 <p>
1153 Public method to extend the selection one line up.
1154 </p><a NAME="HexEditWidget.selectPreviousPage" ID="HexEditWidget.selectPreviousPage"></a>
1155 <h4>HexEditWidget.selectPreviousPage</h4>
1156 <b>selectPreviousPage</b>(<i></i>)
1157 <p>
1158 Public method to extend the selection one page up.
1159 </p><a NAME="HexEditWidget.selectStartOfDocument" ID="HexEditWidget.selectStartOfDocument"></a>
1160 <h4>HexEditWidget.selectStartOfDocument</h4>
1161 <b>selectStartOfDocument</b>(<i></i>)
1162 <p>
1163 Public method to extend the selection to the start of the data.
1164 </p><a NAME="HexEditWidget.selectToEndOfLine" ID="HexEditWidget.selectToEndOfLine"></a>
1165 <h4>HexEditWidget.selectToEndOfLine</h4>
1166 <b>selectToEndOfLine</b>(<i></i>)
1167 <p>
1168 Public method to extend the selection to the end of line.
1169 </p><a NAME="HexEditWidget.selectToStartOfLine" ID="HexEditWidget.selectToStartOfLine"></a>
1170 <h4>HexEditWidget.selectToStartOfLine</h4>
1171 <b>selectToStartOfLine</b>(<i></i>)
1172 <p>
1173 Public method to extend the selection to the start of line.
1174 </p><a NAME="HexEditWidget.selectionColors" ID="HexEditWidget.selectionColors"></a>
1175 <h4>HexEditWidget.selectionColors</h4>
1176 <b>selectionColors</b>(<i></i>)
1177 <p>
1178 Public method to get the selection colors.
1179 </p><dl>
1180 <dt>Returns:</dt>
1181 <dd>
1182 selection foreground and background colors
1183 </dd>
1184 </dl><dl>
1185 <dt>Return Type:</dt>
1186 <dd>
1187 tuple of 2 QColor
1188 </dd>
1189 </dl><a NAME="HexEditWidget.selectionToHexString" ID="HexEditWidget.selectionToHexString"></a>
1190 <h4>HexEditWidget.selectionToHexString</h4>
1191 <b>selectionToHexString</b>(<i></i>)
1192 <p>
1193 Public method to get a hexadecimal representation of the selection.
1194 </p><dl>
1195 <dt>Returns:</dt>
1196 <dd>
1197 hexadecimal representation of the selection
1198 </dd>
1199 </dl><dl>
1200 <dt>Return Type:</dt>
1201 <dd>
1202 str
1203 </dd>
1204 </dl><a NAME="HexEditWidget.selectionToReadableString" ID="HexEditWidget.selectionToReadableString"></a>
1205 <h4>HexEditWidget.selectionToReadableString</h4>
1206 <b>selectionToReadableString</b>(<i></i>)
1207 <p>
1208 Public method to get a formatted representation of the selection.
1209 </p><dl>
1210 <dt>Returns:</dt>
1211 <dd>
1212 formatted representation of the selection
1213 </dd>
1214 </dl><dl>
1215 <dt>Return Type:</dt>
1216 <dd>
1217 str
1218 </dd>
1219 </dl><a NAME="HexEditWidget.setAddressArea" ID="HexEditWidget.setAddressArea"></a>
1220 <h4>HexEditWidget.setAddressArea</h4>
1221 <b>setAddressArea</b>(<i>on</i>)
1222 <p>
1223 Public method to set the address area visibility.
1224 </p><dl>
1225 <dt><i>on</i> (bool)</dt>
1226 <dd>
1227 flag indicating the address area visibility
1228 </dd>
1229 </dl><a NAME="HexEditWidget.setAddressAreaColors" ID="HexEditWidget.setAddressAreaColors"></a>
1230 <h4>HexEditWidget.setAddressAreaColors</h4>
1231 <b>setAddressAreaColors</b>(<i>foreground, background</i>)
1232 <p>
1233 Public method to set the address area colors.
1234 </p><dl>
1235 <dt><i>foreground</i> (QColor)</dt>
1236 <dd>
1237 address area foreground color
1238 </dd><dt><i>background</i> (QColor)</dt>
1239 <dd>
1240 address area background color
1241 </dd>
1242 </dl><a NAME="HexEditWidget.setAddressOffset" ID="HexEditWidget.setAddressOffset"></a>
1243 <h4>HexEditWidget.setAddressOffset</h4>
1244 <b>setAddressOffset</b>(<i>offset</i>)
1245 <p>
1246 Public method to set the address offset.
1247 </p><dl>
1248 <dt><i>offset</i> (int)</dt>
1249 <dd>
1250 address offset
1251 </dd>
1252 </dl><a NAME="HexEditWidget.setAddressWidth" ID="HexEditWidget.setAddressWidth"></a>
1253 <h4>HexEditWidget.setAddressWidth</h4>
1254 <b>setAddressWidth</b>(<i>width</i>)
1255 <p>
1256 Public method to set the width of the address area.
1257 </p><dl>
1258 <dt><i>width</i> (int)</dt>
1259 <dd>
1260 width of the address area in characters
1261 </dd>
1262 </dl><a NAME="HexEditWidget.setAsciiArea" ID="HexEditWidget.setAsciiArea"></a>
1263 <h4>HexEditWidget.setAsciiArea</h4>
1264 <b>setAsciiArea</b>(<i>on</i>)
1265 <p>
1266 Public method to set the visibility of the ASCII area.
1267 </p><dl>
1268 <dt><i>on</i> (bool)</dt>
1269 <dd>
1270 flag indicating the visibility of the ASCII area
1271 </dd>
1272 </dl><a NAME="HexEditWidget.setCursorPosition" ID="HexEditWidget.setCursorPosition"></a>
1273 <h4>HexEditWidget.setCursorPosition</h4>
1274 <b>setCursorPosition</b>(<i>pos</i>)
1275 <p>
1276 Public method to set the cursor position.
1277 </p><dl>
1278 <dt><i>pos</i> (int)</dt>
1279 <dd>
1280 cursor position
1281 </dd>
1282 </dl><a NAME="HexEditWidget.setData" ID="HexEditWidget.setData"></a>
1283 <h4>HexEditWidget.setData</h4>
1284 <b>setData</b>(<i>dataOrDevice</i>)
1285 <p>
1286 Public method to set the data to show.
1287 </p><dl>
1288 <dt><i>dataOrDevice</i> (bytearray, QByteArray or QIODevice)</dt>
1289 <dd>
1290 byte array or device containing the data
1291 </dd>
1292 </dl><dl>
1293 <dt>Returns:</dt>
1294 <dd>
1295 flag indicating success
1296 </dd>
1297 </dl><dl>
1298 <dt>Return Type:</dt>
1299 <dd>
1300 bool
1301 </dd>
1302 </dl><dl>
1303 <dt>Raises <b>TypeError</b>:</dt>
1304 <dd>
1305 raised to indicate a wrong parameter type
1306 </dd>
1307 </dl><a NAME="HexEditWidget.setFont" ID="HexEditWidget.setFont"></a>
1308 <h4>HexEditWidget.setFont</h4>
1309 <b>setFont</b>(<i>font</i>)
1310 <p>
1311 Public method to set the font used to show the data.
1312 </p><dl>
1313 <dt><i>font</i> (QFont)</dt>
1314 <dd>
1315 font used to show the data
1316 </dd>
1317 </dl><a NAME="HexEditWidget.setHighlightColors" ID="HexEditWidget.setHighlightColors"></a>
1318 <h4>HexEditWidget.setHighlightColors</h4>
1319 <b>setHighlightColors</b>(<i>foreground, background</i>)
1320 <p>
1321 Public method to set the highlight colors.
1322 </p><dl>
1323 <dt><i>foreground</i> (QColor)</dt>
1324 <dd>
1325 highlight foreground color
1326 </dd><dt><i>background</i> (QColor)</dt>
1327 <dd>
1328 highlight background color
1329 </dd>
1330 </dl><a NAME="HexEditWidget.setHighlighting" ID="HexEditWidget.setHighlighting"></a>
1331 <h4>HexEditWidget.setHighlighting</h4>
1332 <b>setHighlighting</b>(<i>on</i>)
1333 <p>
1334 Public method to set the highlighting state.
1335 </p><dl>
1336 <dt><i>on</i> (bool)</dt>
1337 <dd>
1338 new highlighting state
1339 </dd>
1340 </dl><a NAME="HexEditWidget.setModified" ID="HexEditWidget.setModified"></a>
1341 <h4>HexEditWidget.setModified</h4>
1342 <b>setModified</b>(<i>modified, setCleanState=False</i>)
1343 <p>
1344 Public slot to set the modified flag.
1345 </p><dl>
1346 <dt><i>modified</i> (bool)</dt>
1347 <dd>
1348 flag indicating the new modification status
1349 </dd><dt><i>setCleanState</i> (bool)</dt>
1350 <dd>
1351 flag indicating to set the undo stack to clean
1352 </dd>
1353 </dl><a NAME="HexEditWidget.setOverwriteMode" ID="HexEditWidget.setOverwriteMode"></a>
1354 <h4>HexEditWidget.setOverwriteMode</h4>
1355 <b>setOverwriteMode</b>(<i>on</i>)
1356 <p>
1357 Public method to set the overwrite mode.
1358 </p><dl>
1359 <dt><i>on</i> (bool)</dt>
1360 <dd>
1361 flag indicating the new overwrite mode
1362 </dd>
1363 </dl><a NAME="HexEditWidget.setReadOnly" ID="HexEditWidget.setReadOnly"></a>
1364 <h4>HexEditWidget.setReadOnly</h4>
1365 <b>setReadOnly</b>(<i>on</i>)
1366 <p>
1367 Public method to set the read only state.
1368 </p><dl>
1369 <dt><i>on</i> (bool)</dt>
1370 <dd>
1371 new read only state
1372 </dd>
1373 </dl><a NAME="HexEditWidget.setSelectionColors" ID="HexEditWidget.setSelectionColors"></a>
1374 <h4>HexEditWidget.setSelectionColors</h4>
1375 <b>setSelectionColors</b>(<i>foreground, background</i>)
1376 <p>
1377 Public method to set the selection colors.
1378 </p><dl>
1379 <dt><i>foreground</i> (QColor)</dt>
1380 <dd>
1381 selection foreground color
1382 </dd><dt><i>background</i> (QColor)</dt>
1383 <dd>
1384 selection background color
1385 </dd>
1386 </dl><a NAME="HexEditWidget.toReadableString" ID="HexEditWidget.toReadableString"></a>
1387 <h4>HexEditWidget.toReadableString</h4>
1388 <b>toReadableString</b>(<i></i>)
1389 <p>
1390 Public method to get a formatted representation of our data.
1391 </p><dl>
1392 <dt>Returns:</dt>
1393 <dd>
1394 formatted representation of our data
1395 </dd>
1396 </dl><dl>
1397 <dt>Return Type:</dt>
1398 <dd>
1399 str
1400 </dd>
1401 </dl><a NAME="HexEditWidget.undo" ID="HexEditWidget.undo"></a>
1402 <h4>HexEditWidget.undo</h4>
1403 <b>undo</b>(<i></i>)
1404 <p>
1405 Public slot to undo the last operation.
1406 </p><a NAME="HexEditWidget.undoStack" ID="HexEditWidget.undoStack"></a>
1407 <h4>HexEditWidget.undoStack</h4>
1408 <b>undoStack</b>(<i></i>)
1409 <p>
1410 Public method to get a reference to the undo stack.
1411 </p><dl>
1412 <dt>Returns:</dt>
1413 <dd>
1414 reference to the undo stack
1415 </dd>
1416 </dl><dl>
1417 <dt>Return Type:</dt>
1418 <dd>
1419 HexEditUndoStack
1420 </dd>
1421 </dl><a NAME="HexEditWidget.write" ID="HexEditWidget.write"></a>
1422 <h4>HexEditWidget.write</h4>
1423 <b>write</b>(<i>device, pos=0, count=-1</i>)
1424 <p>
1425 Public method to write data from a given position to a device.
1426 </p><dl>
1427 <dt><i>device</i> (QIODevice)</dt>
1428 <dd>
1429 device to write to
1430 </dd><dt><i>pos</i> (int)</dt>
1431 <dd>
1432 position to start the write at
1433 </dd><dt><i>count</i> (int)</dt>
1434 <dd>
1435 amount of bytes to write
1436 </dd>
1437 </dl><dl>
1438 <dt>Returns:</dt>
1439 <dd>
1440 flag indicating success
1441 </dd>
1442 </dl><dl>
1443 <dt>Return Type:</dt>
1444 <dd>
1445 bool
1446 </dd>
1447 </dl>
1448 <div align="right"><a href="#top">Up</a></div>
1449 <hr />
1450 </body></html>

eric ide

mercurial