src/eric7/Documentation/Source/eric7.HexEdit.HexEditWidget.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 9164
111fe229ee4f
child 10479
856476537696
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.HexEdit.HexEditWidget</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.HexEdit.HexEditWidget</h1>
10
11 <p>
12 Module implementing an editor for binary data.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#HexEditWidget">HexEditWidget</a></td>
25 <td>Class implementing an editor for binary data.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="HexEditWidget" ID="HexEditWidget"></a>
36 <h2>HexEditWidget</h2>
37
38 <p>
39 Class implementing an editor for binary data.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>canRedoChanged(bool)</dt>
45 <dd>
46 emitted after the redo status has changed
47 </dd>
48 <dt>canUndoChanged(bool)</dt>
49 <dd>
50 emitted after the undo status has changed
51 </dd>
52 <dt>currentAddressChanged(address)</dt>
53 <dd>
54 emitted to indicate the new
55 cursor position
56 </dd>
57 <dt>currentSizeChanged(size)</dt>
58 <dd>
59 emitted to indicate the new size of
60 the data
61 </dd>
62 <dt>dataChanged(modified)</dt>
63 <dd>
64 emitted to indicate a change of the data
65 </dd>
66 <dt>overwriteModeChanged(state)</dt>
67 <dd>
68 emitted to indicate a change of
69 the overwrite mode
70 </dd>
71 <dt>readOnlyChanged(state)</dt>
72 <dd>
73 emitted to indicate a change of the
74 read only state
75 </dd>
76 <dt>selectionAvailable(bool)</dt>
77 <dd>
78 emitted to signal a change of the
79 selection
80 </dd>
81 </dl>
82 <h3>Derived from</h3>
83 QAbstractScrollArea
84 <h3>Class Attributes</h3>
85
86 <table>
87 <tr><td>BYTES_PER_LINE</td></tr><tr><td>HEXCHARS_PER_LINE</td></tr>
88 </table>
89 <h3>Class Methods</h3>
90
91 <table>
92 <tr><td>None</td></tr>
93 </table>
94 <h3>Methods</h3>
95
96 <table>
97
98 <tr>
99 <td><a href="#HexEditWidget.__init__">HexEditWidget</a></td>
100 <td>Constructor</td>
101 </tr>
102 <tr>
103 <td><a href="#HexEditWidget.__adjust">__adjust</a></td>
104 <td>Private slot to recalculate pixel positions.</td>
105 </tr>
106 <tr>
107 <td><a href="#HexEditWidget.__canRedoChanged">__canRedoChanged</a></td>
108 <td>Private slot handling changes of the Redo state.</td>
109 </tr>
110 <tr>
111 <td><a href="#HexEditWidget.__canUndoChanged">__canUndoChanged</a></td>
112 <td>Private slot handling changes of the Undo state.</td>
113 </tr>
114 <tr>
115 <td><a href="#HexEditWidget.__dataChangedPrivate">__dataChangedPrivate</a></td>
116 <td>Private slot to handle data changes.</td>
117 </tr>
118 <tr>
119 <td><a href="#HexEditWidget.__fromHex">__fromHex</a></td>
120 <td>Private method to convert data of a Python bytearray from hex.</td>
121 </tr>
122 <tr>
123 <td><a href="#HexEditWidget.__initialize">__initialize</a></td>
124 <td>Private method to do some initialization.</td>
125 </tr>
126 <tr>
127 <td><a href="#HexEditWidget.__readBuffers">__readBuffers</a></td>
128 <td>Private method to read the buffers.</td>
129 </tr>
130 <tr>
131 <td><a href="#HexEditWidget.__refresh">__refresh</a></td>
132 <td>Private slot to refresh the display.</td>
133 </tr>
134 <tr>
135 <td><a href="#HexEditWidget.__resetSelection">__resetSelection</a></td>
136 <td>Private method to reset the selection.</td>
137 </tr>
138 <tr>
139 <td><a href="#HexEditWidget.__setData">__setData</a></td>
140 <td>Private method to set the data to show.</td>
141 </tr>
142 <tr>
143 <td><a href="#HexEditWidget.__setHexCursorRect">__setHexCursorRect</a></td>
144 <td>Private method to set the cursor.</td>
145 </tr>
146 <tr>
147 <td><a href="#HexEditWidget.__setSelection">__setSelection</a></td>
148 <td>Private method to set the selection.</td>
149 </tr>
150 <tr>
151 <td><a href="#HexEditWidget.__toHex">__toHex</a></td>
152 <td>Private method to convert the data of a Python bytearray to hex.</td>
153 </tr>
154 <tr>
155 <td><a href="#HexEditWidget.__toReadable">__toReadable</a></td>
156 <td>Private method to convert some data into a readable format.</td>
157 </tr>
158 <tr>
159 <td><a href="#HexEditWidget.__updateCursor">__updateCursor</a></td>
160 <td>Private slot to update the blinking cursor.</td>
161 </tr>
162 <tr>
163 <td><a href="#HexEditWidget.addressArea">addressArea</a></td>
164 <td>Public method to get the address area visibility.</td>
165 </tr>
166 <tr>
167 <td><a href="#HexEditWidget.addressOffset">addressOffset</a></td>
168 <td>Public method to get the address offset.</td>
169 </tr>
170 <tr>
171 <td><a href="#HexEditWidget.addressWidth">addressWidth</a></td>
172 <td>Public method to get the width of the address area in characters.</td>
173 </tr>
174 <tr>
175 <td><a href="#HexEditWidget.asciiArea">asciiArea</a></td>
176 <td>Public method to get the visibility of the ASCII area.</td>
177 </tr>
178 <tr>
179 <td><a href="#HexEditWidget.copy">copy</a></td>
180 <td>Public method to copy the selected bytes to the clipboard.</td>
181 </tr>
182 <tr>
183 <td><a href="#HexEditWidget.cursorBytePosition">cursorBytePosition</a></td>
184 <td>Public method to get the cursor position in bytes.</td>
185 </tr>
186 <tr>
187 <td><a href="#HexEditWidget.cursorPosition">cursorPosition</a></td>
188 <td>Public method to get the cursor position.</td>
189 </tr>
190 <tr>
191 <td><a href="#HexEditWidget.cursorPositionFromPoint">cursorPositionFromPoint</a></td>
192 <td>Public method to calculate a cursor position from a graphics position.</td>
193 </tr>
194 <tr>
195 <td><a href="#HexEditWidget.cut">cut</a></td>
196 <td>Public method to cut the selected bytes and move them to the clipboard.</td>
197 </tr>
198 <tr>
199 <td><a href="#HexEditWidget.data">data</a></td>
200 <td>Public method to get the binary data.</td>
201 </tr>
202 <tr>
203 <td><a href="#HexEditWidget.dataAt">dataAt</a></td>
204 <td>Public method to get data from a given position.</td>
205 </tr>
206 <tr>
207 <td><a href="#HexEditWidget.deleteByte">deleteByte</a></td>
208 <td>Public method to delete the current byte.</td>
209 </tr>
210 <tr>
211 <td><a href="#HexEditWidget.deleteByteBack">deleteByteBack</a></td>
212 <td>Public method to delete the previous byte.</td>
213 </tr>
214 <tr>
215 <td><a href="#HexEditWidget.deselectAll">deselectAll</a></td>
216 <td>Public method to deselect all data.</td>
217 </tr>
218 <tr>
219 <td><a href="#HexEditWidget.ensureVisible">ensureVisible</a></td>
220 <td>Public method to ensure, that the cursor is visible.</td>
221 </tr>
222 <tr>
223 <td><a href="#HexEditWidget.font">font</a></td>
224 <td>Public method to get the font used to show the data.</td>
225 </tr>
226 <tr>
227 <td><a href="#HexEditWidget.getSelectionBegin">getSelectionBegin</a></td>
228 <td>Public method to get the start of the selection.</td>
229 </tr>
230 <tr>
231 <td><a href="#HexEditWidget.getSelectionEnd">getSelectionEnd</a></td>
232 <td>Public method to get the end of the selection.</td>
233 </tr>
234 <tr>
235 <td><a href="#HexEditWidget.getSelectionLength">getSelectionLength</a></td>
236 <td>Public method to get the length of the selection.</td>
237 </tr>
238 <tr>
239 <td><a href="#HexEditWidget.goto">goto</a></td>
240 <td>Public method to move the cursor.</td>
241 </tr>
242 <tr>
243 <td><a href="#HexEditWidget.hasSelection">hasSelection</a></td>
244 <td>Public method to test for a selection.</td>
245 </tr>
246 <tr>
247 <td><a href="#HexEditWidget.highlighting">highlighting</a></td>
248 <td>Public method to get the highlighting state.</td>
249 </tr>
250 <tr>
251 <td><a href="#HexEditWidget.indexOf">indexOf</a></td>
252 <td>Public method to find the first occurrence of a byte array in our data.</td>
253 </tr>
254 <tr>
255 <td><a href="#HexEditWidget.insert">insert</a></td>
256 <td>Public method to insert a byte.</td>
257 </tr>
258 <tr>
259 <td><a href="#HexEditWidget.insertByteArray">insertByteArray</a></td>
260 <td>Public method to insert bytes.</td>
261 </tr>
262 <tr>
263 <td><a href="#HexEditWidget.isModified">isModified</a></td>
264 <td>Public method to check for any modification.</td>
265 </tr>
266 <tr>
267 <td><a href="#HexEditWidget.isReadOnly">isReadOnly</a></td>
268 <td>Public method to test the read only state.</td>
269 </tr>
270 <tr>
271 <td><a href="#HexEditWidget.keyPressEvent">keyPressEvent</a></td>
272 <td>Protected method to handle key press events.</td>
273 </tr>
274 <tr>
275 <td><a href="#HexEditWidget.lastIndexOf">lastIndexOf</a></td>
276 <td>Public method to find the last occurrence of a byte array in our data.</td>
277 </tr>
278 <tr>
279 <td><a href="#HexEditWidget.mouseMoveEvent">mouseMoveEvent</a></td>
280 <td>Protected method to handle mouse moves.</td>
281 </tr>
282 <tr>
283 <td><a href="#HexEditWidget.mousePressEvent">mousePressEvent</a></td>
284 <td>Protected method to handle mouse button presses.</td>
285 </tr>
286 <tr>
287 <td><a href="#HexEditWidget.moveCursorToEndOfDocument">moveCursorToEndOfDocument</a></td>
288 <td>Public method to move the cursor to the end of the data.</td>
289 </tr>
290 <tr>
291 <td><a href="#HexEditWidget.moveCursorToEndOfLine">moveCursorToEndOfLine</a></td>
292 <td>Public method to move the cursor to the end of the current line.</td>
293 </tr>
294 <tr>
295 <td><a href="#HexEditWidget.moveCursorToNextChar">moveCursorToNextChar</a></td>
296 <td>Public method to move the cursor to the next byte.</td>
297 </tr>
298 <tr>
299 <td><a href="#HexEditWidget.moveCursorToNextLine">moveCursorToNextLine</a></td>
300 <td>Public method to move the cursor to the next line.</td>
301 </tr>
302 <tr>
303 <td><a href="#HexEditWidget.moveCursorToNextPage">moveCursorToNextPage</a></td>
304 <td>Public method to move the cursor to the next page.</td>
305 </tr>
306 <tr>
307 <td><a href="#HexEditWidget.moveCursorToPreviousChar">moveCursorToPreviousChar</a></td>
308 <td>Public method to move the cursor to the previous byte.</td>
309 </tr>
310 <tr>
311 <td><a href="#HexEditWidget.moveCursorToPreviousLine">moveCursorToPreviousLine</a></td>
312 <td>Public method to move the cursor to the previous line.</td>
313 </tr>
314 <tr>
315 <td><a href="#HexEditWidget.moveCursorToPreviousPage">moveCursorToPreviousPage</a></td>
316 <td>Public method to move the cursor to the previous page.</td>
317 </tr>
318 <tr>
319 <td><a href="#HexEditWidget.moveCursorToStartOfDocument">moveCursorToStartOfDocument</a></td>
320 <td>Public method to move the cursor to the start of the data.</td>
321 </tr>
322 <tr>
323 <td><a href="#HexEditWidget.moveCursorToStartOfLine">moveCursorToStartOfLine</a></td>
324 <td>Public method to move the cursor to the beginning of the current line.</td>
325 </tr>
326 <tr>
327 <td><a href="#HexEditWidget.overwriteMode">overwriteMode</a></td>
328 <td>Public method to get the overwrite mode.</td>
329 </tr>
330 <tr>
331 <td><a href="#HexEditWidget.paintEvent">paintEvent</a></td>
332 <td>Protected method to handle paint events.</td>
333 </tr>
334 <tr>
335 <td><a href="#HexEditWidget.paste">paste</a></td>
336 <td>Public method to paste bytes from the clipboard.</td>
337 </tr>
338 <tr>
339 <td><a href="#HexEditWidget.redo">redo</a></td>
340 <td>Public slot to redo the last operation.</td>
341 </tr>
342 <tr>
343 <td><a href="#HexEditWidget.remove">remove</a></td>
344 <td>Public method to remove bytes.</td>
345 </tr>
346 <tr>
347 <td><a href="#HexEditWidget.replace">replace</a></td>
348 <td>Public method to replace a byte.</td>
349 </tr>
350 <tr>
351 <td><a href="#HexEditWidget.replaceByteArray">replaceByteArray</a></td>
352 <td>Public method to replace bytes.</td>
353 </tr>
354 <tr>
355 <td><a href="#HexEditWidget.resizeEvent">resizeEvent</a></td>
356 <td>Protected method to handle resize events.</td>
357 </tr>
358 <tr>
359 <td><a href="#HexEditWidget.revertToUnmodified">revertToUnmodified</a></td>
360 <td>Public slot to revert all changes.</td>
361 </tr>
362 <tr>
363 <td><a href="#HexEditWidget.selectAll">selectAll</a></td>
364 <td>Public method to select all data.</td>
365 </tr>
366 <tr>
367 <td><a href="#HexEditWidget.selectEndOfDocument">selectEndOfDocument</a></td>
368 <td>Public method to extend the selection to the end of the data.</td>
369 </tr>
370 <tr>
371 <td><a href="#HexEditWidget.selectNextChar">selectNextChar</a></td>
372 <td>Public method to extend the selection by one byte right.</td>
373 </tr>
374 <tr>
375 <td><a href="#HexEditWidget.selectNextLine">selectNextLine</a></td>
376 <td>Public method to extend the selection one line down.</td>
377 </tr>
378 <tr>
379 <td><a href="#HexEditWidget.selectNextPage">selectNextPage</a></td>
380 <td>Public method to extend the selection one page down.</td>
381 </tr>
382 <tr>
383 <td><a href="#HexEditWidget.selectPreviousChar">selectPreviousChar</a></td>
384 <td>Public method to extend the selection by one byte left.</td>
385 </tr>
386 <tr>
387 <td><a href="#HexEditWidget.selectPreviousLine">selectPreviousLine</a></td>
388 <td>Public method to extend the selection one line up.</td>
389 </tr>
390 <tr>
391 <td><a href="#HexEditWidget.selectPreviousPage">selectPreviousPage</a></td>
392 <td>Public method to extend the selection one page up.</td>
393 </tr>
394 <tr>
395 <td><a href="#HexEditWidget.selectStartOfDocument">selectStartOfDocument</a></td>
396 <td>Public method to extend the selection to the start of the data.</td>
397 </tr>
398 <tr>
399 <td><a href="#HexEditWidget.selectToEndOfLine">selectToEndOfLine</a></td>
400 <td>Public method to extend the selection to the end of line.</td>
401 </tr>
402 <tr>
403 <td><a href="#HexEditWidget.selectToStartOfLine">selectToStartOfLine</a></td>
404 <td>Public method to extend the selection to the start of line.</td>
405 </tr>
406 <tr>
407 <td><a href="#HexEditWidget.selectionToHexString">selectionToHexString</a></td>
408 <td>Public method to get a hexadecimal representation of the selection.</td>
409 </tr>
410 <tr>
411 <td><a href="#HexEditWidget.selectionToReadableString">selectionToReadableString</a></td>
412 <td>Public method to get a formatted representation of the selection.</td>
413 </tr>
414 <tr>
415 <td><a href="#HexEditWidget.setAddressArea">setAddressArea</a></td>
416 <td>Public method to set the address area visibility.</td>
417 </tr>
418 <tr>
419 <td><a href="#HexEditWidget.setAddressOffset">setAddressOffset</a></td>
420 <td>Public method to set the address offset.</td>
421 </tr>
422 <tr>
423 <td><a href="#HexEditWidget.setAddressWidth">setAddressWidth</a></td>
424 <td>Public method to set the width of the address area.</td>
425 </tr>
426 <tr>
427 <td><a href="#HexEditWidget.setAsciiArea">setAsciiArea</a></td>
428 <td>Public method to set the visibility of the ASCII area.</td>
429 </tr>
430 <tr>
431 <td><a href="#HexEditWidget.setCursorBytePosition">setCursorBytePosition</a></td>
432 <td>Public method to set the cursor position in bytes.</td>
433 </tr>
434 <tr>
435 <td><a href="#HexEditWidget.setCursorPosition">setCursorPosition</a></td>
436 <td>Public method to set the cursor position.</td>
437 </tr>
438 <tr>
439 <td><a href="#HexEditWidget.setData">setData</a></td>
440 <td>Public method to set the data to show.</td>
441 </tr>
442 <tr>
443 <td><a href="#HexEditWidget.setFont">setFont</a></td>
444 <td>Public method to set the font used to show the data.</td>
445 </tr>
446 <tr>
447 <td><a href="#HexEditWidget.setHighlighting">setHighlighting</a></td>
448 <td>Public method to set the highlighting state.</td>
449 </tr>
450 <tr>
451 <td><a href="#HexEditWidget.setModified">setModified</a></td>
452 <td>Public slot to set the modified flag.</td>
453 </tr>
454 <tr>
455 <td><a href="#HexEditWidget.setOverwriteMode">setOverwriteMode</a></td>
456 <td>Public method to set the overwrite mode.</td>
457 </tr>
458 <tr>
459 <td><a href="#HexEditWidget.setReadOnly">setReadOnly</a></td>
460 <td>Public method to set the read only state.</td>
461 </tr>
462 <tr>
463 <td><a href="#HexEditWidget.toReadableString">toReadableString</a></td>
464 <td>Public method to get a formatted representation of our data.</td>
465 </tr>
466 <tr>
467 <td><a href="#HexEditWidget.undo">undo</a></td>
468 <td>Public slot to undo the last operation.</td>
469 </tr>
470 <tr>
471 <td><a href="#HexEditWidget.undoStack">undoStack</a></td>
472 <td>Public method to get a reference to the undo stack.</td>
473 </tr>
474 <tr>
475 <td><a href="#HexEditWidget.write">write</a></td>
476 <td>Public method to write data from a given position to a device.</td>
477 </tr>
478 </table>
479 <h3>Static Methods</h3>
480
481 <table>
482 <tr><td>None</td></tr>
483 </table>
484
485 <a NAME="HexEditWidget.__init__" ID="HexEditWidget.__init__"></a>
486 <h4>HexEditWidget (Constructor)</h4>
487 <b>HexEditWidget</b>(<i>parent=None</i>)
488
489 <p>
490 Constructor
491 </p>
492 <dl>
493
494 <dt><i>parent</i> (QWidget)</dt>
495 <dd>
496 refernce to the parent widget
497 </dd>
498 </dl>
499 <a NAME="HexEditWidget.__adjust" ID="HexEditWidget.__adjust"></a>
500 <h4>HexEditWidget.__adjust</h4>
501 <b>__adjust</b>(<i></i>)
502
503 <p>
504 Private slot to recalculate pixel positions.
505 </p>
506 <a NAME="HexEditWidget.__canRedoChanged" ID="HexEditWidget.__canRedoChanged"></a>
507 <h4>HexEditWidget.__canRedoChanged</h4>
508 <b>__canRedoChanged</b>(<i></i>)
509
510 <p>
511 Private slot handling changes of the Redo state.
512 </p>
513 <a NAME="HexEditWidget.__canUndoChanged" ID="HexEditWidget.__canUndoChanged"></a>
514 <h4>HexEditWidget.__canUndoChanged</h4>
515 <b>__canUndoChanged</b>(<i></i>)
516
517 <p>
518 Private slot handling changes of the Undo state.
519 </p>
520 <a NAME="HexEditWidget.__dataChangedPrivate" ID="HexEditWidget.__dataChangedPrivate"></a>
521 <h4>HexEditWidget.__dataChangedPrivate</h4>
522 <b>__dataChangedPrivate</b>(<i>idx=0</i>)
523
524 <p>
525 Private slot to handle data changes.
526 </p>
527 <dl>
528
529 <dt><i>idx</i> (int)</dt>
530 <dd>
531 index
532 </dd>
533 </dl>
534 <a NAME="HexEditWidget.__fromHex" ID="HexEditWidget.__fromHex"></a>
535 <h4>HexEditWidget.__fromHex</h4>
536 <b>__fromHex</b>(<i>byteArray</i>)
537
538 <p>
539 Private method to convert data of a Python bytearray from hex.
540 </p>
541 <dl>
542
543 <dt><i>byteArray</i> (bytearray)</dt>
544 <dd>
545 byte array to be converted
546 </dd>
547 </dl>
548 <dl>
549 <dt>Return:</dt>
550 <dd>
551 converted data
552 </dd>
553 </dl>
554 <dl>
555 <dt>Return Type:</dt>
556 <dd>
557 bytearray
558 </dd>
559 </dl>
560 <a NAME="HexEditWidget.__initialize" ID="HexEditWidget.__initialize"></a>
561 <h4>HexEditWidget.__initialize</h4>
562 <b>__initialize</b>(<i></i>)
563
564 <p>
565 Private method to do some initialization.
566 </p>
567 <a NAME="HexEditWidget.__readBuffers" ID="HexEditWidget.__readBuffers"></a>
568 <h4>HexEditWidget.__readBuffers</h4>
569 <b>__readBuffers</b>(<i></i>)
570
571 <p>
572 Private method to read the buffers.
573 </p>
574 <a NAME="HexEditWidget.__refresh" ID="HexEditWidget.__refresh"></a>
575 <h4>HexEditWidget.__refresh</h4>
576 <b>__refresh</b>(<i></i>)
577
578 <p>
579 Private slot to refresh the display.
580 </p>
581 <a NAME="HexEditWidget.__resetSelection" ID="HexEditWidget.__resetSelection"></a>
582 <h4>HexEditWidget.__resetSelection</h4>
583 <b>__resetSelection</b>(<i>pos=None</i>)
584
585 <p>
586 Private method to reset the selection.
587 </p>
588 <dl>
589
590 <dt><i>pos</i> (int or None)</dt>
591 <dd>
592 position to set selection start and end to
593 (if this is None, selection end is set to selection start)
594 </dd>
595 </dl>
596 <a NAME="HexEditWidget.__setData" ID="HexEditWidget.__setData"></a>
597 <h4>HexEditWidget.__setData</h4>
598 <b>__setData</b>(<i>ioDevice</i>)
599
600 <p>
601 Private method to set the data to show.
602 </p>
603 <dl>
604
605 <dt><i>ioDevice</i> (QIODevice)</dt>
606 <dd>
607 device containing the data
608 </dd>
609 </dl>
610 <dl>
611 <dt>Return:</dt>
612 <dd>
613 flag indicating success
614 </dd>
615 </dl>
616 <dl>
617 <dt>Return Type:</dt>
618 <dd>
619 bool
620 </dd>
621 </dl>
622 <a NAME="HexEditWidget.__setHexCursorRect" ID="HexEditWidget.__setHexCursorRect"></a>
623 <h4>HexEditWidget.__setHexCursorRect</h4>
624 <b>__setHexCursorRect</b>(<i></i>)
625
626 <p>
627 Private method to set the cursor.
628 </p>
629 <a NAME="HexEditWidget.__setSelection" ID="HexEditWidget.__setSelection"></a>
630 <h4>HexEditWidget.__setSelection</h4>
631 <b>__setSelection</b>(<i>pos</i>)
632
633 <p>
634 Private method to set the selection.
635 </p>
636 <dl>
637
638 <dt><i>pos</i> (int)</dt>
639 <dd>
640 position
641 </dd>
642 </dl>
643 <a NAME="HexEditWidget.__toHex" ID="HexEditWidget.__toHex"></a>
644 <h4>HexEditWidget.__toHex</h4>
645 <b>__toHex</b>(<i>byteArray</i>)
646
647 <p>
648 Private method to convert the data of a Python bytearray to hex.
649 </p>
650 <dl>
651
652 <dt><i>byteArray</i> (bytearray)</dt>
653 <dd>
654 byte array to be converted
655 </dd>
656 </dl>
657 <dl>
658 <dt>Return:</dt>
659 <dd>
660 converted data
661 </dd>
662 </dl>
663 <dl>
664 <dt>Return Type:</dt>
665 <dd>
666 bytearray
667 </dd>
668 </dl>
669 <a NAME="HexEditWidget.__toReadable" ID="HexEditWidget.__toReadable"></a>
670 <h4>HexEditWidget.__toReadable</h4>
671 <b>__toReadable</b>(<i>byteArray</i>)
672
673 <p>
674 Private method to convert some data into a readable format.
675 </p>
676 <dl>
677
678 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
679 <dd>
680 data to be converted
681 </dd>
682 </dl>
683 <dl>
684 <dt>Return:</dt>
685 <dd>
686 readable data
687 </dd>
688 </dl>
689 <dl>
690 <dt>Return Type:</dt>
691 <dd>
692 str
693 </dd>
694 </dl>
695 <a NAME="HexEditWidget.__updateCursor" ID="HexEditWidget.__updateCursor"></a>
696 <h4>HexEditWidget.__updateCursor</h4>
697 <b>__updateCursor</b>(<i></i>)
698
699 <p>
700 Private slot to update the blinking cursor.
701 </p>
702 <a NAME="HexEditWidget.addressArea" ID="HexEditWidget.addressArea"></a>
703 <h4>HexEditWidget.addressArea</h4>
704 <b>addressArea</b>(<i></i>)
705
706 <p>
707 Public method to get the address area visibility.
708 </p>
709 <dl>
710 <dt>Return:</dt>
711 <dd>
712 flag indicating the address area visibility
713 </dd>
714 </dl>
715 <dl>
716 <dt>Return Type:</dt>
717 <dd>
718 bool
719 </dd>
720 </dl>
721 <a NAME="HexEditWidget.addressOffset" ID="HexEditWidget.addressOffset"></a>
722 <h4>HexEditWidget.addressOffset</h4>
723 <b>addressOffset</b>(<i></i>)
724
725 <p>
726 Public method to get the address offset.
727 </p>
728 <dl>
729 <dt>Return:</dt>
730 <dd>
731 address offset
732 </dd>
733 </dl>
734 <dl>
735 <dt>Return Type:</dt>
736 <dd>
737 int
738 </dd>
739 </dl>
740 <a NAME="HexEditWidget.addressWidth" ID="HexEditWidget.addressWidth"></a>
741 <h4>HexEditWidget.addressWidth</h4>
742 <b>addressWidth</b>(<i></i>)
743
744 <p>
745 Public method to get the width of the address area in
746 characters.
747 </p>
748 <p>
749 Note: The address area width is always a multiple of four.
750 </p>
751 <dl>
752 <dt>Return:</dt>
753 <dd>
754 minimum width of the address area
755 </dd>
756 </dl>
757 <dl>
758 <dt>Return Type:</dt>
759 <dd>
760 int
761 </dd>
762 </dl>
763 <a NAME="HexEditWidget.asciiArea" ID="HexEditWidget.asciiArea"></a>
764 <h4>HexEditWidget.asciiArea</h4>
765 <b>asciiArea</b>(<i></i>)
766
767 <p>
768 Public method to get the visibility of the ASCII area.
769 </p>
770 <dl>
771 <dt>Return:</dt>
772 <dd>
773 visibility of the ASCII area
774 </dd>
775 </dl>
776 <dl>
777 <dt>Return Type:</dt>
778 <dd>
779 bool
780 </dd>
781 </dl>
782 <a NAME="HexEditWidget.copy" ID="HexEditWidget.copy"></a>
783 <h4>HexEditWidget.copy</h4>
784 <b>copy</b>(<i></i>)
785
786 <p>
787 Public method to copy the selected bytes to the clipboard.
788 </p>
789 <a NAME="HexEditWidget.cursorBytePosition" ID="HexEditWidget.cursorBytePosition"></a>
790 <h4>HexEditWidget.cursorBytePosition</h4>
791 <b>cursorBytePosition</b>(<i></i>)
792
793 <p>
794 Public method to get the cursor position in bytes.
795 </p>
796 <dl>
797 <dt>Return:</dt>
798 <dd>
799 cursor position in bytes
800 </dd>
801 </dl>
802 <dl>
803 <dt>Return Type:</dt>
804 <dd>
805 int
806 </dd>
807 </dl>
808 <a NAME="HexEditWidget.cursorPosition" ID="HexEditWidget.cursorPosition"></a>
809 <h4>HexEditWidget.cursorPosition</h4>
810 <b>cursorPosition</b>(<i></i>)
811
812 <p>
813 Public method to get the cursor position.
814 </p>
815 <dl>
816 <dt>Return:</dt>
817 <dd>
818 cursor position
819 </dd>
820 </dl>
821 <dl>
822 <dt>Return Type:</dt>
823 <dd>
824 int
825 </dd>
826 </dl>
827 <a NAME="HexEditWidget.cursorPositionFromPoint" ID="HexEditWidget.cursorPositionFromPoint"></a>
828 <h4>HexEditWidget.cursorPositionFromPoint</h4>
829 <b>cursorPositionFromPoint</b>(<i>point</i>)
830
831 <p>
832 Public method to calculate a cursor position from a graphics position.
833 </p>
834 <dl>
835
836 <dt><i>point</i> (QPoint)</dt>
837 <dd>
838 graphics position
839 </dd>
840 </dl>
841 <dl>
842 <dt>Return:</dt>
843 <dd>
844 cursor position
845 </dd>
846 </dl>
847 <dl>
848 <dt>Return Type:</dt>
849 <dd>
850 int
851 </dd>
852 </dl>
853 <a NAME="HexEditWidget.cut" ID="HexEditWidget.cut"></a>
854 <h4>HexEditWidget.cut</h4>
855 <b>cut</b>(<i></i>)
856
857 <p>
858 Public method to cut the selected bytes and move them to the clipboard.
859 </p>
860 <a NAME="HexEditWidget.data" ID="HexEditWidget.data"></a>
861 <h4>HexEditWidget.data</h4>
862 <b>data</b>(<i></i>)
863
864 <p>
865 Public method to get the binary data.
866 </p>
867 <dl>
868 <dt>Return:</dt>
869 <dd>
870 binary data
871 </dd>
872 </dl>
873 <dl>
874 <dt>Return Type:</dt>
875 <dd>
876 bytearray
877 </dd>
878 </dl>
879 <a NAME="HexEditWidget.dataAt" ID="HexEditWidget.dataAt"></a>
880 <h4>HexEditWidget.dataAt</h4>
881 <b>dataAt</b>(<i>pos, count=-1</i>)
882
883 <p>
884 Public method to get data from a given position.
885 </p>
886 <dl>
887
888 <dt><i>pos</i> (int)</dt>
889 <dd>
890 position to get data from
891 </dd>
892 <dt><i>count</i> (int)</dt>
893 <dd>
894 amount of bytes to get
895 </dd>
896 </dl>
897 <dl>
898 <dt>Return:</dt>
899 <dd>
900 requested data
901 </dd>
902 </dl>
903 <dl>
904 <dt>Return Type:</dt>
905 <dd>
906 bytearray
907 </dd>
908 </dl>
909 <a NAME="HexEditWidget.deleteByte" ID="HexEditWidget.deleteByte"></a>
910 <h4>HexEditWidget.deleteByte</h4>
911 <b>deleteByte</b>(<i></i>)
912
913 <p>
914 Public method to delete the current byte.
915 </p>
916 <a NAME="HexEditWidget.deleteByteBack" ID="HexEditWidget.deleteByteBack"></a>
917 <h4>HexEditWidget.deleteByteBack</h4>
918 <b>deleteByteBack</b>(<i></i>)
919
920 <p>
921 Public method to delete the previous byte.
922 </p>
923 <a NAME="HexEditWidget.deselectAll" ID="HexEditWidget.deselectAll"></a>
924 <h4>HexEditWidget.deselectAll</h4>
925 <b>deselectAll</b>(<i></i>)
926
927 <p>
928 Public method to deselect all data.
929 </p>
930 <a NAME="HexEditWidget.ensureVisible" ID="HexEditWidget.ensureVisible"></a>
931 <h4>HexEditWidget.ensureVisible</h4>
932 <b>ensureVisible</b>(<i></i>)
933
934 <p>
935 Public method to ensure, that the cursor is visible.
936 </p>
937 <a NAME="HexEditWidget.font" ID="HexEditWidget.font"></a>
938 <h4>HexEditWidget.font</h4>
939 <b>font</b>(<i></i>)
940
941 <p>
942 Public method to get the font used to show the data.
943 </p>
944 <dl>
945 <dt>Return:</dt>
946 <dd>
947 font used to show the data
948 </dd>
949 </dl>
950 <dl>
951 <dt>Return Type:</dt>
952 <dd>
953 QFont
954 </dd>
955 </dl>
956 <a NAME="HexEditWidget.getSelectionBegin" ID="HexEditWidget.getSelectionBegin"></a>
957 <h4>HexEditWidget.getSelectionBegin</h4>
958 <b>getSelectionBegin</b>(<i></i>)
959
960 <p>
961 Public method to get the start of the selection.
962 </p>
963 <dl>
964 <dt>Return:</dt>
965 <dd>
966 selection start
967 </dd>
968 </dl>
969 <dl>
970 <dt>Return Type:</dt>
971 <dd>
972 int
973 </dd>
974 </dl>
975 <a NAME="HexEditWidget.getSelectionEnd" ID="HexEditWidget.getSelectionEnd"></a>
976 <h4>HexEditWidget.getSelectionEnd</h4>
977 <b>getSelectionEnd</b>(<i></i>)
978
979 <p>
980 Public method to get the end of the selection.
981 </p>
982 <dl>
983 <dt>Return:</dt>
984 <dd>
985 selection end
986 </dd>
987 </dl>
988 <dl>
989 <dt>Return Type:</dt>
990 <dd>
991 int
992 </dd>
993 </dl>
994 <a NAME="HexEditWidget.getSelectionLength" ID="HexEditWidget.getSelectionLength"></a>
995 <h4>HexEditWidget.getSelectionLength</h4>
996 <b>getSelectionLength</b>(<i></i>)
997
998 <p>
999 Public method to get the length of the selection.
1000 </p>
1001 <dl>
1002 <dt>Return:</dt>
1003 <dd>
1004 selection length
1005 </dd>
1006 </dl>
1007 <dl>
1008 <dt>Return Type:</dt>
1009 <dd>
1010 int
1011 </dd>
1012 </dl>
1013 <a NAME="HexEditWidget.goto" ID="HexEditWidget.goto"></a>
1014 <h4>HexEditWidget.goto</h4>
1015 <b>goto</b>(<i>offset, fromCursor=False, backwards=False, extendSelection=False</i>)
1016
1017 <p>
1018 Public method to move the cursor.
1019 </p>
1020 <dl>
1021
1022 <dt><i>offset</i> (int)</dt>
1023 <dd>
1024 offset to move to
1025 </dd>
1026 <dt><i>fromCursor</i> (bool)</dt>
1027 <dd>
1028 flag indicating a move relative to the current cursor
1029 </dd>
1030 <dt><i>backwards</i> (bool)</dt>
1031 <dd>
1032 flag indicating a backwards move
1033 </dd>
1034 <dt><i>extendSelection</i> (bool)</dt>
1035 <dd>
1036 flag indicating to extend the selection
1037 </dd>
1038 </dl>
1039 <a NAME="HexEditWidget.hasSelection" ID="HexEditWidget.hasSelection"></a>
1040 <h4>HexEditWidget.hasSelection</h4>
1041 <b>hasSelection</b>(<i></i>)
1042
1043 <p>
1044 Public method to test for a selection.
1045 </p>
1046 <dl>
1047 <dt>Return:</dt>
1048 <dd>
1049 flag indicating the presence of a selection
1050 </dd>
1051 </dl>
1052 <dl>
1053 <dt>Return Type:</dt>
1054 <dd>
1055 bool
1056 </dd>
1057 </dl>
1058 <a NAME="HexEditWidget.highlighting" ID="HexEditWidget.highlighting"></a>
1059 <h4>HexEditWidget.highlighting</h4>
1060 <b>highlighting</b>(<i></i>)
1061
1062 <p>
1063 Public method to get the highlighting state.
1064 </p>
1065 <dl>
1066 <dt>Return:</dt>
1067 <dd>
1068 highlighting state
1069 </dd>
1070 </dl>
1071 <dl>
1072 <dt>Return Type:</dt>
1073 <dd>
1074 bool
1075 </dd>
1076 </dl>
1077 <a NAME="HexEditWidget.indexOf" ID="HexEditWidget.indexOf"></a>
1078 <h4>HexEditWidget.indexOf</h4>
1079 <b>indexOf</b>(<i>byteArray, start</i>)
1080
1081 <p>
1082 Public method to find the first occurrence of a byte array in our data.
1083 </p>
1084 <dl>
1085
1086 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
1087 <dd>
1088 data to search for
1089 </dd>
1090 <dt><i>start</i> (int)</dt>
1091 <dd>
1092 start position of the search
1093 </dd>
1094 </dl>
1095 <dl>
1096 <dt>Return:</dt>
1097 <dd>
1098 position of match (or -1 if not found)
1099 </dd>
1100 </dl>
1101 <dl>
1102 <dt>Return Type:</dt>
1103 <dd>
1104 int
1105 </dd>
1106 </dl>
1107 <a NAME="HexEditWidget.insert" ID="HexEditWidget.insert"></a>
1108 <h4>HexEditWidget.insert</h4>
1109 <b>insert</b>(<i>pos, ch</i>)
1110
1111 <p>
1112 Public method to insert a byte.
1113 </p>
1114 <dl>
1115
1116 <dt><i>pos</i> (int)</dt>
1117 <dd>
1118 position to insert the byte at
1119 </dd>
1120 <dt><i>ch</i> (int in the range 0x00 to 0xff)</dt>
1121 <dd>
1122 byte to insert
1123 </dd>
1124 </dl>
1125 <a NAME="HexEditWidget.insertByteArray" ID="HexEditWidget.insertByteArray"></a>
1126 <h4>HexEditWidget.insertByteArray</h4>
1127 <b>insertByteArray</b>(<i>pos, byteArray</i>)
1128
1129 <p>
1130 Public method to insert bytes.
1131 </p>
1132 <dl>
1133
1134 <dt><i>pos</i> (int)</dt>
1135 <dd>
1136 position to insert the bytes at
1137 </dd>
1138 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
1139 <dd>
1140 bytes to be insert
1141 </dd>
1142 </dl>
1143 <a NAME="HexEditWidget.isModified" ID="HexEditWidget.isModified"></a>
1144 <h4>HexEditWidget.isModified</h4>
1145 <b>isModified</b>(<i></i>)
1146
1147 <p>
1148 Public method to check for any modification.
1149 </p>
1150 <dl>
1151 <dt>Return:</dt>
1152 <dd>
1153 flag indicating a modified state
1154 </dd>
1155 </dl>
1156 <dl>
1157 <dt>Return Type:</dt>
1158 <dd>
1159 bool
1160 </dd>
1161 </dl>
1162 <a NAME="HexEditWidget.isReadOnly" ID="HexEditWidget.isReadOnly"></a>
1163 <h4>HexEditWidget.isReadOnly</h4>
1164 <b>isReadOnly</b>(<i></i>)
1165
1166 <p>
1167 Public method to test the read only state.
1168 </p>
1169 <dl>
1170 <dt>Return:</dt>
1171 <dd>
1172 flag indicating the read only state
1173 </dd>
1174 </dl>
1175 <dl>
1176 <dt>Return Type:</dt>
1177 <dd>
1178 bool
1179 </dd>
1180 </dl>
1181 <a NAME="HexEditWidget.keyPressEvent" ID="HexEditWidget.keyPressEvent"></a>
1182 <h4>HexEditWidget.keyPressEvent</h4>
1183 <b>keyPressEvent</b>(<i>evt</i>)
1184
1185 <p>
1186 Protected method to handle key press events.
1187 </p>
1188 <dl>
1189
1190 <dt><i>evt</i> (QKeyEvent)</dt>
1191 <dd>
1192 reference to the key event
1193 </dd>
1194 </dl>
1195 <a NAME="HexEditWidget.lastIndexOf" ID="HexEditWidget.lastIndexOf"></a>
1196 <h4>HexEditWidget.lastIndexOf</h4>
1197 <b>lastIndexOf</b>(<i>byteArray, start</i>)
1198
1199 <p>
1200 Public method to find the last occurrence of a byte array in our data.
1201 </p>
1202 <dl>
1203
1204 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
1205 <dd>
1206 data to search for
1207 </dd>
1208 <dt><i>start</i> (int)</dt>
1209 <dd>
1210 start position of the search
1211 </dd>
1212 </dl>
1213 <dl>
1214 <dt>Return:</dt>
1215 <dd>
1216 position of match (or -1 if not found)
1217 </dd>
1218 </dl>
1219 <dl>
1220 <dt>Return Type:</dt>
1221 <dd>
1222 int
1223 </dd>
1224 </dl>
1225 <a NAME="HexEditWidget.mouseMoveEvent" ID="HexEditWidget.mouseMoveEvent"></a>
1226 <h4>HexEditWidget.mouseMoveEvent</h4>
1227 <b>mouseMoveEvent</b>(<i>evt</i>)
1228
1229 <p>
1230 Protected method to handle mouse moves.
1231 </p>
1232 <dl>
1233
1234 <dt><i>evt</i> (QMouseEvent)</dt>
1235 <dd>
1236 reference to the mouse event
1237 </dd>
1238 </dl>
1239 <a NAME="HexEditWidget.mousePressEvent" ID="HexEditWidget.mousePressEvent"></a>
1240 <h4>HexEditWidget.mousePressEvent</h4>
1241 <b>mousePressEvent</b>(<i>evt</i>)
1242
1243 <p>
1244 Protected method to handle mouse button presses.
1245 </p>
1246 <dl>
1247
1248 <dt><i>evt</i> (QMouseEvent)</dt>
1249 <dd>
1250 reference to the mouse event
1251 </dd>
1252 </dl>
1253 <a NAME="HexEditWidget.moveCursorToEndOfDocument" ID="HexEditWidget.moveCursorToEndOfDocument"></a>
1254 <h4>HexEditWidget.moveCursorToEndOfDocument</h4>
1255 <b>moveCursorToEndOfDocument</b>(<i></i>)
1256
1257 <p>
1258 Public method to move the cursor to the end of the data.
1259 </p>
1260 <a NAME="HexEditWidget.moveCursorToEndOfLine" ID="HexEditWidget.moveCursorToEndOfLine"></a>
1261 <h4>HexEditWidget.moveCursorToEndOfLine</h4>
1262 <b>moveCursorToEndOfLine</b>(<i></i>)
1263
1264 <p>
1265 Public method to move the cursor to the end of the current line.
1266 </p>
1267 <a NAME="HexEditWidget.moveCursorToNextChar" ID="HexEditWidget.moveCursorToNextChar"></a>
1268 <h4>HexEditWidget.moveCursorToNextChar</h4>
1269 <b>moveCursorToNextChar</b>(<i></i>)
1270
1271 <p>
1272 Public method to move the cursor to the next byte.
1273 </p>
1274 <a NAME="HexEditWidget.moveCursorToNextLine" ID="HexEditWidget.moveCursorToNextLine"></a>
1275 <h4>HexEditWidget.moveCursorToNextLine</h4>
1276 <b>moveCursorToNextLine</b>(<i></i>)
1277
1278 <p>
1279 Public method to move the cursor to the next line.
1280 </p>
1281 <a NAME="HexEditWidget.moveCursorToNextPage" ID="HexEditWidget.moveCursorToNextPage"></a>
1282 <h4>HexEditWidget.moveCursorToNextPage</h4>
1283 <b>moveCursorToNextPage</b>(<i></i>)
1284
1285 <p>
1286 Public method to move the cursor to the next page.
1287 </p>
1288 <a NAME="HexEditWidget.moveCursorToPreviousChar" ID="HexEditWidget.moveCursorToPreviousChar"></a>
1289 <h4>HexEditWidget.moveCursorToPreviousChar</h4>
1290 <b>moveCursorToPreviousChar</b>(<i></i>)
1291
1292 <p>
1293 Public method to move the cursor to the previous byte.
1294 </p>
1295 <a NAME="HexEditWidget.moveCursorToPreviousLine" ID="HexEditWidget.moveCursorToPreviousLine"></a>
1296 <h4>HexEditWidget.moveCursorToPreviousLine</h4>
1297 <b>moveCursorToPreviousLine</b>(<i></i>)
1298
1299 <p>
1300 Public method to move the cursor to the previous line.
1301 </p>
1302 <a NAME="HexEditWidget.moveCursorToPreviousPage" ID="HexEditWidget.moveCursorToPreviousPage"></a>
1303 <h4>HexEditWidget.moveCursorToPreviousPage</h4>
1304 <b>moveCursorToPreviousPage</b>(<i></i>)
1305
1306 <p>
1307 Public method to move the cursor to the previous page.
1308 </p>
1309 <a NAME="HexEditWidget.moveCursorToStartOfDocument" ID="HexEditWidget.moveCursorToStartOfDocument"></a>
1310 <h4>HexEditWidget.moveCursorToStartOfDocument</h4>
1311 <b>moveCursorToStartOfDocument</b>(<i></i>)
1312
1313 <p>
1314 Public method to move the cursor to the start of the data.
1315 </p>
1316 <a NAME="HexEditWidget.moveCursorToStartOfLine" ID="HexEditWidget.moveCursorToStartOfLine"></a>
1317 <h4>HexEditWidget.moveCursorToStartOfLine</h4>
1318 <b>moveCursorToStartOfLine</b>(<i></i>)
1319
1320 <p>
1321 Public method to move the cursor to the beginning of the current line.
1322 </p>
1323 <a NAME="HexEditWidget.overwriteMode" ID="HexEditWidget.overwriteMode"></a>
1324 <h4>HexEditWidget.overwriteMode</h4>
1325 <b>overwriteMode</b>(<i></i>)
1326
1327 <p>
1328 Public method to get the overwrite mode.
1329 </p>
1330 <dl>
1331 <dt>Return:</dt>
1332 <dd>
1333 overwrite mode
1334 </dd>
1335 </dl>
1336 <dl>
1337 <dt>Return Type:</dt>
1338 <dd>
1339 bool
1340 </dd>
1341 </dl>
1342 <a NAME="HexEditWidget.paintEvent" ID="HexEditWidget.paintEvent"></a>
1343 <h4>HexEditWidget.paintEvent</h4>
1344 <b>paintEvent</b>(<i>evt</i>)
1345
1346 <p>
1347 Protected method to handle paint events.
1348 </p>
1349 <dl>
1350
1351 <dt><i>evt</i> (QPaintEvent)</dt>
1352 <dd>
1353 reference to the paint event
1354 </dd>
1355 </dl>
1356 <a NAME="HexEditWidget.paste" ID="HexEditWidget.paste"></a>
1357 <h4>HexEditWidget.paste</h4>
1358 <b>paste</b>(<i></i>)
1359
1360 <p>
1361 Public method to paste bytes from the clipboard.
1362 </p>
1363 <a NAME="HexEditWidget.redo" ID="HexEditWidget.redo"></a>
1364 <h4>HexEditWidget.redo</h4>
1365 <b>redo</b>(<i></i>)
1366
1367 <p>
1368 Public slot to redo the last operation.
1369 </p>
1370 <a NAME="HexEditWidget.remove" ID="HexEditWidget.remove"></a>
1371 <h4>HexEditWidget.remove</h4>
1372 <b>remove</b>(<i>pos, length=1</i>)
1373
1374 <p>
1375 Public method to remove bytes.
1376 </p>
1377 <dl>
1378
1379 <dt><i>pos</i> (int)</dt>
1380 <dd>
1381 position to remove bytes from
1382 </dd>
1383 <dt><i>length</i> (int)</dt>
1384 <dd>
1385 amount of bytes to remove
1386 </dd>
1387 </dl>
1388 <a NAME="HexEditWidget.replace" ID="HexEditWidget.replace"></a>
1389 <h4>HexEditWidget.replace</h4>
1390 <b>replace</b>(<i>pos, ch</i>)
1391
1392 <p>
1393 Public method to replace a byte.
1394 </p>
1395 <dl>
1396
1397 <dt><i>pos</i> (int)</dt>
1398 <dd>
1399 position to replace the byte at
1400 </dd>
1401 <dt><i>ch</i> (int in the range 0x00 to 0xff)</dt>
1402 <dd>
1403 byte to replace with
1404 </dd>
1405 </dl>
1406 <a NAME="HexEditWidget.replaceByteArray" ID="HexEditWidget.replaceByteArray"></a>
1407 <h4>HexEditWidget.replaceByteArray</h4>
1408 <b>replaceByteArray</b>(<i>pos, length, byteArray</i>)
1409
1410 <p>
1411 Public method to replace bytes.
1412 </p>
1413 <dl>
1414
1415 <dt><i>pos</i> (int)</dt>
1416 <dd>
1417 position to replace the bytes at
1418 </dd>
1419 <dt><i>length</i> (int)</dt>
1420 <dd>
1421 amount of bytes to replace
1422 </dd>
1423 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
1424 <dd>
1425 bytes to replace with
1426 </dd>
1427 </dl>
1428 <a NAME="HexEditWidget.resizeEvent" ID="HexEditWidget.resizeEvent"></a>
1429 <h4>HexEditWidget.resizeEvent</h4>
1430 <b>resizeEvent</b>(<i>evt</i>)
1431
1432 <p>
1433 Protected method to handle resize events.
1434 </p>
1435 <dl>
1436
1437 <dt><i>evt</i> (QResizeEvent)</dt>
1438 <dd>
1439 reference to the resize event
1440 </dd>
1441 </dl>
1442 <a NAME="HexEditWidget.revertToUnmodified" ID="HexEditWidget.revertToUnmodified"></a>
1443 <h4>HexEditWidget.revertToUnmodified</h4>
1444 <b>revertToUnmodified</b>(<i></i>)
1445
1446 <p>
1447 Public slot to revert all changes.
1448 </p>
1449 <a NAME="HexEditWidget.selectAll" ID="HexEditWidget.selectAll"></a>
1450 <h4>HexEditWidget.selectAll</h4>
1451 <b>selectAll</b>(<i></i>)
1452
1453 <p>
1454 Public method to select all data.
1455 </p>
1456 <a NAME="HexEditWidget.selectEndOfDocument" ID="HexEditWidget.selectEndOfDocument"></a>
1457 <h4>HexEditWidget.selectEndOfDocument</h4>
1458 <b>selectEndOfDocument</b>(<i></i>)
1459
1460 <p>
1461 Public method to extend the selection to the end of the data.
1462 </p>
1463 <a NAME="HexEditWidget.selectNextChar" ID="HexEditWidget.selectNextChar"></a>
1464 <h4>HexEditWidget.selectNextChar</h4>
1465 <b>selectNextChar</b>(<i></i>)
1466
1467 <p>
1468 Public method to extend the selection by one byte right.
1469 </p>
1470 <a NAME="HexEditWidget.selectNextLine" ID="HexEditWidget.selectNextLine"></a>
1471 <h4>HexEditWidget.selectNextLine</h4>
1472 <b>selectNextLine</b>(<i></i>)
1473
1474 <p>
1475 Public method to extend the selection one line down.
1476 </p>
1477 <a NAME="HexEditWidget.selectNextPage" ID="HexEditWidget.selectNextPage"></a>
1478 <h4>HexEditWidget.selectNextPage</h4>
1479 <b>selectNextPage</b>(<i></i>)
1480
1481 <p>
1482 Public method to extend the selection one page down.
1483 </p>
1484 <a NAME="HexEditWidget.selectPreviousChar" ID="HexEditWidget.selectPreviousChar"></a>
1485 <h4>HexEditWidget.selectPreviousChar</h4>
1486 <b>selectPreviousChar</b>(<i></i>)
1487
1488 <p>
1489 Public method to extend the selection by one byte left.
1490 </p>
1491 <a NAME="HexEditWidget.selectPreviousLine" ID="HexEditWidget.selectPreviousLine"></a>
1492 <h4>HexEditWidget.selectPreviousLine</h4>
1493 <b>selectPreviousLine</b>(<i></i>)
1494
1495 <p>
1496 Public method to extend the selection one line up.
1497 </p>
1498 <a NAME="HexEditWidget.selectPreviousPage" ID="HexEditWidget.selectPreviousPage"></a>
1499 <h4>HexEditWidget.selectPreviousPage</h4>
1500 <b>selectPreviousPage</b>(<i></i>)
1501
1502 <p>
1503 Public method to extend the selection one page up.
1504 </p>
1505 <a NAME="HexEditWidget.selectStartOfDocument" ID="HexEditWidget.selectStartOfDocument"></a>
1506 <h4>HexEditWidget.selectStartOfDocument</h4>
1507 <b>selectStartOfDocument</b>(<i></i>)
1508
1509 <p>
1510 Public method to extend the selection to the start of the data.
1511 </p>
1512 <a NAME="HexEditWidget.selectToEndOfLine" ID="HexEditWidget.selectToEndOfLine"></a>
1513 <h4>HexEditWidget.selectToEndOfLine</h4>
1514 <b>selectToEndOfLine</b>(<i></i>)
1515
1516 <p>
1517 Public method to extend the selection to the end of line.
1518 </p>
1519 <a NAME="HexEditWidget.selectToStartOfLine" ID="HexEditWidget.selectToStartOfLine"></a>
1520 <h4>HexEditWidget.selectToStartOfLine</h4>
1521 <b>selectToStartOfLine</b>(<i></i>)
1522
1523 <p>
1524 Public method to extend the selection to the start of line.
1525 </p>
1526 <a NAME="HexEditWidget.selectionToHexString" ID="HexEditWidget.selectionToHexString"></a>
1527 <h4>HexEditWidget.selectionToHexString</h4>
1528 <b>selectionToHexString</b>(<i></i>)
1529
1530 <p>
1531 Public method to get a hexadecimal representation of the selection.
1532 </p>
1533 <dl>
1534 <dt>Return:</dt>
1535 <dd>
1536 hexadecimal representation of the selection
1537 </dd>
1538 </dl>
1539 <dl>
1540 <dt>Return Type:</dt>
1541 <dd>
1542 str
1543 </dd>
1544 </dl>
1545 <a NAME="HexEditWidget.selectionToReadableString" ID="HexEditWidget.selectionToReadableString"></a>
1546 <h4>HexEditWidget.selectionToReadableString</h4>
1547 <b>selectionToReadableString</b>(<i></i>)
1548
1549 <p>
1550 Public method to get a formatted representation of the selection.
1551 </p>
1552 <dl>
1553 <dt>Return:</dt>
1554 <dd>
1555 formatted representation of the selection
1556 </dd>
1557 </dl>
1558 <dl>
1559 <dt>Return Type:</dt>
1560 <dd>
1561 str
1562 </dd>
1563 </dl>
1564 <a NAME="HexEditWidget.setAddressArea" ID="HexEditWidget.setAddressArea"></a>
1565 <h4>HexEditWidget.setAddressArea</h4>
1566 <b>setAddressArea</b>(<i>on</i>)
1567
1568 <p>
1569 Public method to set the address area visibility.
1570 </p>
1571 <dl>
1572
1573 <dt><i>on</i> (bool)</dt>
1574 <dd>
1575 flag indicating the address area visibility
1576 </dd>
1577 </dl>
1578 <a NAME="HexEditWidget.setAddressOffset" ID="HexEditWidget.setAddressOffset"></a>
1579 <h4>HexEditWidget.setAddressOffset</h4>
1580 <b>setAddressOffset</b>(<i>offset</i>)
1581
1582 <p>
1583 Public method to set the address offset.
1584 </p>
1585 <dl>
1586
1587 <dt><i>offset</i> (int)</dt>
1588 <dd>
1589 address offset
1590 </dd>
1591 </dl>
1592 <a NAME="HexEditWidget.setAddressWidth" ID="HexEditWidget.setAddressWidth"></a>
1593 <h4>HexEditWidget.setAddressWidth</h4>
1594 <b>setAddressWidth</b>(<i>width</i>)
1595
1596 <p>
1597 Public method to set the width of the address area.
1598 </p>
1599 <p>
1600 Note: The address area width is always a multiple of four.
1601 The given value will be adjusted as required.
1602 </p>
1603 <dl>
1604
1605 <dt><i>width</i> (int)</dt>
1606 <dd>
1607 width of the address area in characters
1608 </dd>
1609 </dl>
1610 <a NAME="HexEditWidget.setAsciiArea" ID="HexEditWidget.setAsciiArea"></a>
1611 <h4>HexEditWidget.setAsciiArea</h4>
1612 <b>setAsciiArea</b>(<i>on</i>)
1613
1614 <p>
1615 Public method to set the visibility of the ASCII area.
1616 </p>
1617 <dl>
1618
1619 <dt><i>on</i> (bool)</dt>
1620 <dd>
1621 flag indicating the visibility of the ASCII area
1622 </dd>
1623 </dl>
1624 <a NAME="HexEditWidget.setCursorBytePosition" ID="HexEditWidget.setCursorBytePosition"></a>
1625 <h4>HexEditWidget.setCursorBytePosition</h4>
1626 <b>setCursorBytePosition</b>(<i>pos</i>)
1627
1628 <p>
1629 Public method to set the cursor position in bytes.
1630 </p>
1631 <dl>
1632
1633 <dt><i>pos</i> (int)</dt>
1634 <dd>
1635 cursor position in bytes
1636 </dd>
1637 </dl>
1638 <a NAME="HexEditWidget.setCursorPosition" ID="HexEditWidget.setCursorPosition"></a>
1639 <h4>HexEditWidget.setCursorPosition</h4>
1640 <b>setCursorPosition</b>(<i>pos</i>)
1641
1642 <p>
1643 Public method to set the cursor position.
1644 </p>
1645 <dl>
1646
1647 <dt><i>pos</i> (int)</dt>
1648 <dd>
1649 cursor position
1650 </dd>
1651 </dl>
1652 <a NAME="HexEditWidget.setData" ID="HexEditWidget.setData"></a>
1653 <h4>HexEditWidget.setData</h4>
1654 <b>setData</b>(<i>dataOrDevice</i>)
1655
1656 <p>
1657 Public method to set the data to show.
1658 </p>
1659 <dl>
1660
1661 <dt><i>dataOrDevice</i> (bytes, bytearray, QByteArray or QIODevice)</dt>
1662 <dd>
1663 byte array or device containing the data
1664 </dd>
1665 </dl>
1666 <dl>
1667 <dt>Return:</dt>
1668 <dd>
1669 flag indicating success
1670 </dd>
1671 </dl>
1672 <dl>
1673 <dt>Return Type:</dt>
1674 <dd>
1675 bool
1676 </dd>
1677 </dl>
1678 <dl>
1679
1680 <dt>Raises <b>TypeError</b>:</dt>
1681 <dd>
1682 raised to indicate a wrong parameter type
1683 </dd>
1684 </dl>
1685 <a NAME="HexEditWidget.setFont" ID="HexEditWidget.setFont"></a>
1686 <h4>HexEditWidget.setFont</h4>
1687 <b>setFont</b>(<i>font</i>)
1688
1689 <p>
1690 Public method to set the font used to show the data.
1691 </p>
1692 <dl>
1693
1694 <dt><i>font</i> (QFont)</dt>
1695 <dd>
1696 font used to show the data
1697 </dd>
1698 </dl>
1699 <a NAME="HexEditWidget.setHighlighting" ID="HexEditWidget.setHighlighting"></a>
1700 <h4>HexEditWidget.setHighlighting</h4>
1701 <b>setHighlighting</b>(<i>on</i>)
1702
1703 <p>
1704 Public method to set the highlighting state.
1705 </p>
1706 <dl>
1707
1708 <dt><i>on</i> (bool)</dt>
1709 <dd>
1710 new highlighting state
1711 </dd>
1712 </dl>
1713 <a NAME="HexEditWidget.setModified" ID="HexEditWidget.setModified"></a>
1714 <h4>HexEditWidget.setModified</h4>
1715 <b>setModified</b>(<i>modified, setCleanState=False</i>)
1716
1717 <p>
1718 Public slot to set the modified flag.
1719 </p>
1720 <dl>
1721
1722 <dt><i>modified</i> (bool)</dt>
1723 <dd>
1724 flag indicating the new modification status
1725 </dd>
1726 <dt><i>setCleanState</i> (bool)</dt>
1727 <dd>
1728 flag indicating to set the undo stack to clean
1729 </dd>
1730 </dl>
1731 <a NAME="HexEditWidget.setOverwriteMode" ID="HexEditWidget.setOverwriteMode"></a>
1732 <h4>HexEditWidget.setOverwriteMode</h4>
1733 <b>setOverwriteMode</b>(<i>on</i>)
1734
1735 <p>
1736 Public method to set the overwrite mode.
1737 </p>
1738 <dl>
1739
1740 <dt><i>on</i> (bool)</dt>
1741 <dd>
1742 flag indicating the new overwrite mode
1743 </dd>
1744 </dl>
1745 <a NAME="HexEditWidget.setReadOnly" ID="HexEditWidget.setReadOnly"></a>
1746 <h4>HexEditWidget.setReadOnly</h4>
1747 <b>setReadOnly</b>(<i>on</i>)
1748
1749 <p>
1750 Public method to set the read only state.
1751 </p>
1752 <dl>
1753
1754 <dt><i>on</i> (bool)</dt>
1755 <dd>
1756 new read only state
1757 </dd>
1758 </dl>
1759 <a NAME="HexEditWidget.toReadableString" ID="HexEditWidget.toReadableString"></a>
1760 <h4>HexEditWidget.toReadableString</h4>
1761 <b>toReadableString</b>(<i></i>)
1762
1763 <p>
1764 Public method to get a formatted representation of our data.
1765 </p>
1766 <dl>
1767 <dt>Return:</dt>
1768 <dd>
1769 formatted representation of our data
1770 </dd>
1771 </dl>
1772 <dl>
1773 <dt>Return Type:</dt>
1774 <dd>
1775 str
1776 </dd>
1777 </dl>
1778 <a NAME="HexEditWidget.undo" ID="HexEditWidget.undo"></a>
1779 <h4>HexEditWidget.undo</h4>
1780 <b>undo</b>(<i></i>)
1781
1782 <p>
1783 Public slot to undo the last operation.
1784 </p>
1785 <a NAME="HexEditWidget.undoStack" ID="HexEditWidget.undoStack"></a>
1786 <h4>HexEditWidget.undoStack</h4>
1787 <b>undoStack</b>(<i></i>)
1788
1789 <p>
1790 Public method to get a reference to the undo stack.
1791 </p>
1792 <dl>
1793 <dt>Return:</dt>
1794 <dd>
1795 reference to the undo stack
1796 </dd>
1797 </dl>
1798 <dl>
1799 <dt>Return Type:</dt>
1800 <dd>
1801 HexEditUndoStack
1802 </dd>
1803 </dl>
1804 <a NAME="HexEditWidget.write" ID="HexEditWidget.write"></a>
1805 <h4>HexEditWidget.write</h4>
1806 <b>write</b>(<i>device, pos=0, count=-1</i>)
1807
1808 <p>
1809 Public method to write data from a given position to a device.
1810 </p>
1811 <dl>
1812
1813 <dt><i>device</i> (QIODevice)</dt>
1814 <dd>
1815 device to write to
1816 </dd>
1817 <dt><i>pos</i> (int)</dt>
1818 <dd>
1819 position to start the write at
1820 </dd>
1821 <dt><i>count</i> (int)</dt>
1822 <dd>
1823 amount of bytes to write
1824 </dd>
1825 </dl>
1826 <dl>
1827 <dt>Return:</dt>
1828 <dd>
1829 flag indicating success
1830 </dd>
1831 </dl>
1832 <dl>
1833 <dt>Return Type:</dt>
1834 <dd>
1835 bool
1836 </dd>
1837 </dl>
1838 <div align="right"><a href="#top">Up</a></div>
1839 <hr />
1840 </body></html>

eric ide

mercurial