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