|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.HexEdit.HexEditMainWindow</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.HexEditMainWindow</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the hex editor main window. |
|
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="#HexEditMainWindow">HexEditMainWindow</a></td> |
|
25 <td>Class implementing the web browser main window.</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="HexEditMainWindow" ID="HexEditMainWindow"></a> |
|
36 <h2>HexEditMainWindow</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the web browser main window. |
|
40 </p> |
|
41 <h3>Signals</h3> |
|
42 <dl> |
|
43 |
|
44 <dt>editorClosed()</dt> |
|
45 <dd> |
|
46 emitted after the window was requested to close down |
|
47 </dd> |
|
48 </dl> |
|
49 <h3>Derived from</h3> |
|
50 EricMainWindow |
|
51 <h3>Class Attributes</h3> |
|
52 |
|
53 <table> |
|
54 <tr><td>maxMenuFilePathLen</td></tr><tr><td>windows</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 |
|
63 <table> |
|
64 |
|
65 <tr> |
|
66 <td><a href="#HexEditMainWindow.__init__">HexEditMainWindow</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#HexEditMainWindow.__about">__about</a></td> |
|
71 <td>Private slot to show a little About message.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#HexEditMainWindow.__aboutQt">__aboutQt</a></td> |
|
75 <td>Private slot to handle the About Qt dialog.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#HexEditMainWindow.__addToRecentList">__addToRecentList</a></td> |
|
79 <td>Private method to add a file name to the list of recently opened files.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#HexEditMainWindow.__checkActions">__checkActions</a></td> |
|
83 <td>Private slot to check some actions for their enable/disable status.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#HexEditMainWindow.__clearRecent">__clearRecent</a></td> |
|
87 <td>Private method to clear the list of recently opened files.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#HexEditMainWindow.__closeAll">__closeAll</a></td> |
|
91 <td>Private slot to close all windows.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#HexEditMainWindow.__closeOthers">__closeOthers</a></td> |
|
95 <td>Private slot to close all other windows.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#HexEditMainWindow.__createStatusBar">__createStatusBar</a></td> |
|
99 <td>Private method to initialize the status bar.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#HexEditMainWindow.__goto">__goto</a></td> |
|
103 <td>Private method to handle the goto action.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#HexEditMainWindow.__initActions">__initActions</a></td> |
|
107 <td>Private method to define the user interface actions.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#HexEditMainWindow.__initConfigActions">__initConfigActions</a></td> |
|
111 <td>Private method to create the Settings actions.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#HexEditMainWindow.__initEditActions">__initEditActions</a></td> |
|
115 <td>Private method to create the Edit actions.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#HexEditMainWindow.__initFileActions">__initFileActions</a></td> |
|
119 <td>Private method to define the file related user interface actions.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#HexEditMainWindow.__initHelpActions">__initHelpActions</a></td> |
|
123 <td>Private method to create the Help actions.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#HexEditMainWindow.__initMenus">__initMenus</a></td> |
|
127 <td>Private method to create the menus.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#HexEditMainWindow.__initToolbars">__initToolbars</a></td> |
|
131 <td>Private method to create the toolbars.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#HexEditMainWindow.__loadHexFile">__loadHexFile</a></td> |
|
135 <td>Private method to load a binary file.</td> |
|
136 </tr> |
|
137 <tr> |
|
138 <td><a href="#HexEditMainWindow.__loadRecent">__loadRecent</a></td> |
|
139 <td>Private method to load the list of recently opened files.</td> |
|
140 </tr> |
|
141 <tr> |
|
142 <td><a href="#HexEditMainWindow.__maybeSave">__maybeSave</a></td> |
|
143 <td>Private method to ask the user to save the file, if it was modified.</td> |
|
144 </tr> |
|
145 <tr> |
|
146 <td><a href="#HexEditMainWindow.__modificationChanged">__modificationChanged</a></td> |
|
147 <td>Private slot to handle the dataChanged signal.</td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td><a href="#HexEditMainWindow.__openHexFile">__openHexFile</a></td> |
|
151 <td>Private slot to open a binary file.</td> |
|
152 </tr> |
|
153 <tr> |
|
154 <td><a href="#HexEditMainWindow.__openHexFileNewWindow">__openHexFileNewWindow</a></td> |
|
155 <td>Private slot called to open a binary file in new hex editor window.</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#HexEditMainWindow.__openHexFileReadOnly">__openHexFileReadOnly</a></td> |
|
159 <td>Private slot to open a binary file in read only mode.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#HexEditMainWindow.__openRecentHexFile">__openRecentHexFile</a></td> |
|
163 <td>Private method to open a file from the list of recently opened files.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#HexEditMainWindow.__preferencesChangedByLocalPreferencesDialog">__preferencesChangedByLocalPreferencesDialog</a></td> |
|
167 <td>Private slot to handle preferences changes by our local dialog.</td> |
|
168 </tr> |
|
169 <tr> |
|
170 <td><a href="#HexEditMainWindow.__replace">__replace</a></td> |
|
171 <td>Private method to handle the replace action.</td> |
|
172 </tr> |
|
173 <tr> |
|
174 <td><a href="#HexEditMainWindow.__saveHexDataFile">__saveHexDataFile</a></td> |
|
175 <td>Private method to save the binary data to a file.</td> |
|
176 </tr> |
|
177 <tr> |
|
178 <td><a href="#HexEditMainWindow.__saveHexFile">__saveHexFile</a></td> |
|
179 <td>Private method to save a binary file.</td> |
|
180 </tr> |
|
181 <tr> |
|
182 <td><a href="#HexEditMainWindow.__saveHexFileAs">__saveHexFileAs</a></td> |
|
183 <td>Private method to save the data to a new file.</td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td><a href="#HexEditMainWindow.__saveHexFileReadable">__saveHexFileReadable</a></td> |
|
187 <td>Private method to save the binary data in readable format.</td> |
|
188 </tr> |
|
189 <tr> |
|
190 <td><a href="#HexEditMainWindow.__saveRecent">__saveRecent</a></td> |
|
191 <td>Private method to save the list of recently opened files.</td> |
|
192 </tr> |
|
193 <tr> |
|
194 <td><a href="#HexEditMainWindow.__saveSelectionReadable">__saveSelectionReadable</a></td> |
|
195 <td>Private method to save the data of the current selection in readable format.</td> |
|
196 </tr> |
|
197 <tr> |
|
198 <td><a href="#HexEditMainWindow.__search">__search</a></td> |
|
199 <td>Private method to handle the search action.</td> |
|
200 </tr> |
|
201 <tr> |
|
202 <td><a href="#HexEditMainWindow.__setCurrentFile">__setCurrentFile</a></td> |
|
203 <td>Private method to register the file name of the current file.</td> |
|
204 </tr> |
|
205 <tr> |
|
206 <td><a href="#HexEditMainWindow.__setReadOnlyActionTexts">__setReadOnlyActionTexts</a></td> |
|
207 <td>Private method to switch the 'Open Read Only' action between 'read only' and 'read write'.</td> |
|
208 </tr> |
|
209 <tr> |
|
210 <td><a href="#HexEditMainWindow.__showAddress">__showAddress</a></td> |
|
211 <td>Private slot to show the address of the cursor position.</td> |
|
212 </tr> |
|
213 <tr> |
|
214 <td><a href="#HexEditMainWindow.__showEditMode">__showEditMode</a></td> |
|
215 <td>Private slot to show the edit mode.</td> |
|
216 </tr> |
|
217 <tr> |
|
218 <td><a href="#HexEditMainWindow.__showFileMenu">__showFileMenu</a></td> |
|
219 <td>Private slot to modify the file menu before being shown.</td> |
|
220 </tr> |
|
221 <tr> |
|
222 <td><a href="#HexEditMainWindow.__showPreferences">__showPreferences</a></td> |
|
223 <td>Private slot to set the preferences.</td> |
|
224 </tr> |
|
225 <tr> |
|
226 <td><a href="#HexEditMainWindow.__showReadOnlyMode">__showReadOnlyMode</a></td> |
|
227 <td>Private slot to show the read only mode.</td> |
|
228 </tr> |
|
229 <tr> |
|
230 <td><a href="#HexEditMainWindow.__showRecentMenu">__showRecentMenu</a></td> |
|
231 <td>Private slot to set up the recent files menu.</td> |
|
232 </tr> |
|
233 <tr> |
|
234 <td><a href="#HexEditMainWindow.__showSelectionInfo">__showSelectionInfo</a></td> |
|
235 <td>Private slot to show selection information.</td> |
|
236 </tr> |
|
237 <tr> |
|
238 <td><a href="#HexEditMainWindow.__showSize">__showSize</a></td> |
|
239 <td>Private slot to show the binary data size.</td> |
|
240 </tr> |
|
241 <tr> |
|
242 <td><a href="#HexEditMainWindow.__strippedName">__strippedName</a></td> |
|
243 <td>Private method to return the filename part of the given path.</td> |
|
244 </tr> |
|
245 <tr> |
|
246 <td><a href="#HexEditMainWindow.__toggleEditMode">__toggleEditMode</a></td> |
|
247 <td>Private slot to toggle the edit mode upon a click on the status bar label.</td> |
|
248 </tr> |
|
249 <tr> |
|
250 <td><a href="#HexEditMainWindow.__toggleReadOnlyMode">__toggleReadOnlyMode</a></td> |
|
251 <td>Private slot to toggle the read only mode upon a click on the status bar label.</td> |
|
252 </tr> |
|
253 <tr> |
|
254 <td><a href="#HexEditMainWindow.__whatsThis">__whatsThis</a></td> |
|
255 <td>Private slot called in to enter Whats This mode.</td> |
|
256 </tr> |
|
257 <tr> |
|
258 <td><a href="#HexEditMainWindow.closeEvent">closeEvent</a></td> |
|
259 <td>Protected event handler for the close event.</td> |
|
260 </tr> |
|
261 <tr> |
|
262 <td><a href="#HexEditMainWindow.getSRHistory">getSRHistory</a></td> |
|
263 <td>Public method to get the search or replace history list.</td> |
|
264 </tr> |
|
265 <tr> |
|
266 <td><a href="#HexEditMainWindow.preferencesChanged">preferencesChanged</a></td> |
|
267 <td>Public method to (re-)read the various settings.</td> |
|
268 </tr> |
|
269 <tr> |
|
270 <td><a href="#HexEditMainWindow.setRecentPaths">setRecentPaths</a></td> |
|
271 <td>Public method to set the last open and save paths.</td> |
|
272 </tr> |
|
273 </table> |
|
274 <h3>Static Methods</h3> |
|
275 |
|
276 <table> |
|
277 <tr><td>None</td></tr> |
|
278 </table> |
|
279 |
|
280 <a NAME="HexEditMainWindow.__init__" ID="HexEditMainWindow.__init__"></a> |
|
281 <h4>HexEditMainWindow (Constructor)</h4> |
|
282 <b>HexEditMainWindow</b>(<i>fileName="", parent=None, fromEric=False, project=None</i>) |
|
283 |
|
284 <p> |
|
285 Constructor |
|
286 </p> |
|
287 <dl> |
|
288 |
|
289 <dt><i>fileName</i></dt> |
|
290 <dd> |
|
291 name of a file to load on startup (string) |
|
292 </dd> |
|
293 <dt><i>parent</i></dt> |
|
294 <dd> |
|
295 parent widget of this window (QWidget) |
|
296 </dd> |
|
297 <dt><i>fromEric</i></dt> |
|
298 <dd> |
|
299 flag indicating whether it was called from within |
|
300 eric (boolean) |
|
301 </dd> |
|
302 <dt><i>project</i></dt> |
|
303 <dd> |
|
304 reference to the project object (Project) |
|
305 </dd> |
|
306 </dl> |
|
307 <a NAME="HexEditMainWindow.__about" ID="HexEditMainWindow.__about"></a> |
|
308 <h4>HexEditMainWindow.__about</h4> |
|
309 <b>__about</b>(<i></i>) |
|
310 |
|
311 <p> |
|
312 Private slot to show a little About message. |
|
313 </p> |
|
314 <a NAME="HexEditMainWindow.__aboutQt" ID="HexEditMainWindow.__aboutQt"></a> |
|
315 <h4>HexEditMainWindow.__aboutQt</h4> |
|
316 <b>__aboutQt</b>(<i></i>) |
|
317 |
|
318 <p> |
|
319 Private slot to handle the About Qt dialog. |
|
320 </p> |
|
321 <a NAME="HexEditMainWindow.__addToRecentList" ID="HexEditMainWindow.__addToRecentList"></a> |
|
322 <h4>HexEditMainWindow.__addToRecentList</h4> |
|
323 <b>__addToRecentList</b>(<i>fileName</i>) |
|
324 |
|
325 <p> |
|
326 Private method to add a file name to the list of recently opened files. |
|
327 </p> |
|
328 <dl> |
|
329 |
|
330 <dt><i>fileName</i></dt> |
|
331 <dd> |
|
332 name of the file to be added |
|
333 </dd> |
|
334 </dl> |
|
335 <a NAME="HexEditMainWindow.__checkActions" ID="HexEditMainWindow.__checkActions"></a> |
|
336 <h4>HexEditMainWindow.__checkActions</h4> |
|
337 <b>__checkActions</b>(<i></i>) |
|
338 |
|
339 <p> |
|
340 Private slot to check some actions for their enable/disable status. |
|
341 </p> |
|
342 <a NAME="HexEditMainWindow.__clearRecent" ID="HexEditMainWindow.__clearRecent"></a> |
|
343 <h4>HexEditMainWindow.__clearRecent</h4> |
|
344 <b>__clearRecent</b>(<i></i>) |
|
345 |
|
346 <p> |
|
347 Private method to clear the list of recently opened files. |
|
348 </p> |
|
349 <a NAME="HexEditMainWindow.__closeAll" ID="HexEditMainWindow.__closeAll"></a> |
|
350 <h4>HexEditMainWindow.__closeAll</h4> |
|
351 <b>__closeAll</b>(<i></i>) |
|
352 |
|
353 <p> |
|
354 Private slot to close all windows. |
|
355 </p> |
|
356 <a NAME="HexEditMainWindow.__closeOthers" ID="HexEditMainWindow.__closeOthers"></a> |
|
357 <h4>HexEditMainWindow.__closeOthers</h4> |
|
358 <b>__closeOthers</b>(<i></i>) |
|
359 |
|
360 <p> |
|
361 Private slot to close all other windows. |
|
362 </p> |
|
363 <a NAME="HexEditMainWindow.__createStatusBar" ID="HexEditMainWindow.__createStatusBar"></a> |
|
364 <h4>HexEditMainWindow.__createStatusBar</h4> |
|
365 <b>__createStatusBar</b>(<i></i>) |
|
366 |
|
367 <p> |
|
368 Private method to initialize the status bar. |
|
369 </p> |
|
370 <a NAME="HexEditMainWindow.__goto" ID="HexEditMainWindow.__goto"></a> |
|
371 <h4>HexEditMainWindow.__goto</h4> |
|
372 <b>__goto</b>(<i></i>) |
|
373 |
|
374 <p> |
|
375 Private method to handle the goto action. |
|
376 </p> |
|
377 <a NAME="HexEditMainWindow.__initActions" ID="HexEditMainWindow.__initActions"></a> |
|
378 <h4>HexEditMainWindow.__initActions</h4> |
|
379 <b>__initActions</b>(<i></i>) |
|
380 |
|
381 <p> |
|
382 Private method to define the user interface actions. |
|
383 </p> |
|
384 <a NAME="HexEditMainWindow.__initConfigActions" ID="HexEditMainWindow.__initConfigActions"></a> |
|
385 <h4>HexEditMainWindow.__initConfigActions</h4> |
|
386 <b>__initConfigActions</b>(<i></i>) |
|
387 |
|
388 <p> |
|
389 Private method to create the Settings actions. |
|
390 </p> |
|
391 <a NAME="HexEditMainWindow.__initEditActions" ID="HexEditMainWindow.__initEditActions"></a> |
|
392 <h4>HexEditMainWindow.__initEditActions</h4> |
|
393 <b>__initEditActions</b>(<i></i>) |
|
394 |
|
395 <p> |
|
396 Private method to create the Edit actions. |
|
397 </p> |
|
398 <a NAME="HexEditMainWindow.__initFileActions" ID="HexEditMainWindow.__initFileActions"></a> |
|
399 <h4>HexEditMainWindow.__initFileActions</h4> |
|
400 <b>__initFileActions</b>(<i></i>) |
|
401 |
|
402 <p> |
|
403 Private method to define the file related user interface actions. |
|
404 </p> |
|
405 <a NAME="HexEditMainWindow.__initHelpActions" ID="HexEditMainWindow.__initHelpActions"></a> |
|
406 <h4>HexEditMainWindow.__initHelpActions</h4> |
|
407 <b>__initHelpActions</b>(<i></i>) |
|
408 |
|
409 <p> |
|
410 Private method to create the Help actions. |
|
411 </p> |
|
412 <a NAME="HexEditMainWindow.__initMenus" ID="HexEditMainWindow.__initMenus"></a> |
|
413 <h4>HexEditMainWindow.__initMenus</h4> |
|
414 <b>__initMenus</b>(<i></i>) |
|
415 |
|
416 <p> |
|
417 Private method to create the menus. |
|
418 </p> |
|
419 <a NAME="HexEditMainWindow.__initToolbars" ID="HexEditMainWindow.__initToolbars"></a> |
|
420 <h4>HexEditMainWindow.__initToolbars</h4> |
|
421 <b>__initToolbars</b>(<i></i>) |
|
422 |
|
423 <p> |
|
424 Private method to create the toolbars. |
|
425 </p> |
|
426 <a NAME="HexEditMainWindow.__loadHexFile" ID="HexEditMainWindow.__loadHexFile"></a> |
|
427 <h4>HexEditMainWindow.__loadHexFile</h4> |
|
428 <b>__loadHexFile</b>(<i>fileName</i>) |
|
429 |
|
430 <p> |
|
431 Private method to load a binary file. |
|
432 </p> |
|
433 <dl> |
|
434 |
|
435 <dt><i>fileName</i> (str)</dt> |
|
436 <dd> |
|
437 name of the binary file to load |
|
438 </dd> |
|
439 </dl> |
|
440 <a NAME="HexEditMainWindow.__loadRecent" ID="HexEditMainWindow.__loadRecent"></a> |
|
441 <h4>HexEditMainWindow.__loadRecent</h4> |
|
442 <b>__loadRecent</b>(<i></i>) |
|
443 |
|
444 <p> |
|
445 Private method to load the list of recently opened files. |
|
446 </p> |
|
447 <a NAME="HexEditMainWindow.__maybeSave" ID="HexEditMainWindow.__maybeSave"></a> |
|
448 <h4>HexEditMainWindow.__maybeSave</h4> |
|
449 <b>__maybeSave</b>(<i></i>) |
|
450 |
|
451 <p> |
|
452 Private method to ask the user to save the file, if it was modified. |
|
453 </p> |
|
454 <dl> |
|
455 <dt>Return:</dt> |
|
456 <dd> |
|
457 flag indicating, if it is ok to continue |
|
458 </dd> |
|
459 </dl> |
|
460 <dl> |
|
461 <dt>Return Type:</dt> |
|
462 <dd> |
|
463 bool |
|
464 </dd> |
|
465 </dl> |
|
466 <a NAME="HexEditMainWindow.__modificationChanged" ID="HexEditMainWindow.__modificationChanged"></a> |
|
467 <h4>HexEditMainWindow.__modificationChanged</h4> |
|
468 <b>__modificationChanged</b>(<i>m</i>) |
|
469 |
|
470 <p> |
|
471 Private slot to handle the dataChanged signal. |
|
472 </p> |
|
473 <dl> |
|
474 |
|
475 <dt><i>m</i> (bool)</dt> |
|
476 <dd> |
|
477 modification status |
|
478 </dd> |
|
479 </dl> |
|
480 <a NAME="HexEditMainWindow.__openHexFile" ID="HexEditMainWindow.__openHexFile"></a> |
|
481 <h4>HexEditMainWindow.__openHexFile</h4> |
|
482 <b>__openHexFile</b>(<i></i>) |
|
483 |
|
484 <p> |
|
485 Private slot to open a binary file. |
|
486 </p> |
|
487 <a NAME="HexEditMainWindow.__openHexFileNewWindow" ID="HexEditMainWindow.__openHexFileNewWindow"></a> |
|
488 <h4>HexEditMainWindow.__openHexFileNewWindow</h4> |
|
489 <b>__openHexFileNewWindow</b>(<i></i>) |
|
490 |
|
491 <p> |
|
492 Private slot called to open a binary file in new hex editor window. |
|
493 </p> |
|
494 <a NAME="HexEditMainWindow.__openHexFileReadOnly" ID="HexEditMainWindow.__openHexFileReadOnly"></a> |
|
495 <h4>HexEditMainWindow.__openHexFileReadOnly</h4> |
|
496 <b>__openHexFileReadOnly</b>(<i></i>) |
|
497 |
|
498 <p> |
|
499 Private slot to open a binary file in read only mode. |
|
500 </p> |
|
501 <a NAME="HexEditMainWindow.__openRecentHexFile" ID="HexEditMainWindow.__openRecentHexFile"></a> |
|
502 <h4>HexEditMainWindow.__openRecentHexFile</h4> |
|
503 <b>__openRecentHexFile</b>(<i>act</i>) |
|
504 |
|
505 <p> |
|
506 Private method to open a file from the list of recently opened files. |
|
507 </p> |
|
508 <dl> |
|
509 |
|
510 <dt><i>act</i></dt> |
|
511 <dd> |
|
512 reference to the action that triggered (QAction) |
|
513 </dd> |
|
514 </dl> |
|
515 <a NAME="HexEditMainWindow.__preferencesChangedByLocalPreferencesDialog" ID="HexEditMainWindow.__preferencesChangedByLocalPreferencesDialog"></a> |
|
516 <h4>HexEditMainWindow.__preferencesChangedByLocalPreferencesDialog</h4> |
|
517 <b>__preferencesChangedByLocalPreferencesDialog</b>(<i></i>) |
|
518 |
|
519 <p> |
|
520 Private slot to handle preferences changes by our local dialog. |
|
521 </p> |
|
522 <a NAME="HexEditMainWindow.__replace" ID="HexEditMainWindow.__replace"></a> |
|
523 <h4>HexEditMainWindow.__replace</h4> |
|
524 <b>__replace</b>(<i></i>) |
|
525 |
|
526 <p> |
|
527 Private method to handle the replace action. |
|
528 </p> |
|
529 <a NAME="HexEditMainWindow.__saveHexDataFile" ID="HexEditMainWindow.__saveHexDataFile"></a> |
|
530 <h4>HexEditMainWindow.__saveHexDataFile</h4> |
|
531 <b>__saveHexDataFile</b>(<i>fileName</i>) |
|
532 |
|
533 <p> |
|
534 Private method to save the binary data to a file. |
|
535 </p> |
|
536 <dl> |
|
537 |
|
538 <dt><i>fileName</i> (str)</dt> |
|
539 <dd> |
|
540 name of the file to write to |
|
541 </dd> |
|
542 </dl> |
|
543 <dl> |
|
544 <dt>Return:</dt> |
|
545 <dd> |
|
546 flag indicating success |
|
547 </dd> |
|
548 </dl> |
|
549 <dl> |
|
550 <dt>Return Type:</dt> |
|
551 <dd> |
|
552 bool |
|
553 </dd> |
|
554 </dl> |
|
555 <a NAME="HexEditMainWindow.__saveHexFile" ID="HexEditMainWindow.__saveHexFile"></a> |
|
556 <h4>HexEditMainWindow.__saveHexFile</h4> |
|
557 <b>__saveHexFile</b>(<i></i>) |
|
558 |
|
559 <p> |
|
560 Private method to save a binary file. |
|
561 </p> |
|
562 <dl> |
|
563 <dt>Return:</dt> |
|
564 <dd> |
|
565 flag indicating success |
|
566 </dd> |
|
567 </dl> |
|
568 <dl> |
|
569 <dt>Return Type:</dt> |
|
570 <dd> |
|
571 bool |
|
572 </dd> |
|
573 </dl> |
|
574 <a NAME="HexEditMainWindow.__saveHexFileAs" ID="HexEditMainWindow.__saveHexFileAs"></a> |
|
575 <h4>HexEditMainWindow.__saveHexFileAs</h4> |
|
576 <b>__saveHexFileAs</b>(<i></i>) |
|
577 |
|
578 <p> |
|
579 Private method to save the data to a new file. |
|
580 </p> |
|
581 <dl> |
|
582 <dt>Return:</dt> |
|
583 <dd> |
|
584 flag indicating success |
|
585 </dd> |
|
586 </dl> |
|
587 <dl> |
|
588 <dt>Return Type:</dt> |
|
589 <dd> |
|
590 bool |
|
591 </dd> |
|
592 </dl> |
|
593 <a NAME="HexEditMainWindow.__saveHexFileReadable" ID="HexEditMainWindow.__saveHexFileReadable"></a> |
|
594 <h4>HexEditMainWindow.__saveHexFileReadable</h4> |
|
595 <b>__saveHexFileReadable</b>(<i>selectionOnly=False</i>) |
|
596 |
|
597 <p> |
|
598 Private method to save the binary data in readable format. |
|
599 </p> |
|
600 <dl> |
|
601 |
|
602 <dt><i>selectionOnly</i> (bool)</dt> |
|
603 <dd> |
|
604 flag indicating to save the selection only |
|
605 </dd> |
|
606 </dl> |
|
607 <a NAME="HexEditMainWindow.__saveRecent" ID="HexEditMainWindow.__saveRecent"></a> |
|
608 <h4>HexEditMainWindow.__saveRecent</h4> |
|
609 <b>__saveRecent</b>(<i></i>) |
|
610 |
|
611 <p> |
|
612 Private method to save the list of recently opened files. |
|
613 </p> |
|
614 <a NAME="HexEditMainWindow.__saveSelectionReadable" ID="HexEditMainWindow.__saveSelectionReadable"></a> |
|
615 <h4>HexEditMainWindow.__saveSelectionReadable</h4> |
|
616 <b>__saveSelectionReadable</b>(<i></i>) |
|
617 |
|
618 <p> |
|
619 Private method to save the data of the current selection in readable |
|
620 format. |
|
621 </p> |
|
622 <a NAME="HexEditMainWindow.__search" ID="HexEditMainWindow.__search"></a> |
|
623 <h4>HexEditMainWindow.__search</h4> |
|
624 <b>__search</b>(<i></i>) |
|
625 |
|
626 <p> |
|
627 Private method to handle the search action. |
|
628 </p> |
|
629 <a NAME="HexEditMainWindow.__setCurrentFile" ID="HexEditMainWindow.__setCurrentFile"></a> |
|
630 <h4>HexEditMainWindow.__setCurrentFile</h4> |
|
631 <b>__setCurrentFile</b>(<i>fileName</i>) |
|
632 |
|
633 <p> |
|
634 Private method to register the file name of the current file. |
|
635 </p> |
|
636 <dl> |
|
637 |
|
638 <dt><i>fileName</i> (str)</dt> |
|
639 <dd> |
|
640 name of the file to register |
|
641 </dd> |
|
642 </dl> |
|
643 <a NAME="HexEditMainWindow.__setReadOnlyActionTexts" ID="HexEditMainWindow.__setReadOnlyActionTexts"></a> |
|
644 <h4>HexEditMainWindow.__setReadOnlyActionTexts</h4> |
|
645 <b>__setReadOnlyActionTexts</b>(<i></i>) |
|
646 |
|
647 <p> |
|
648 Private method to switch the 'Open Read Only' action between |
|
649 'read only' and 'read write'. |
|
650 </p> |
|
651 <a NAME="HexEditMainWindow.__showAddress" ID="HexEditMainWindow.__showAddress"></a> |
|
652 <h4>HexEditMainWindow.__showAddress</h4> |
|
653 <b>__showAddress</b>(<i>address</i>) |
|
654 |
|
655 <p> |
|
656 Private slot to show the address of the cursor position. |
|
657 </p> |
|
658 <dl> |
|
659 |
|
660 <dt><i>address</i> (int)</dt> |
|
661 <dd> |
|
662 address of the cursor |
|
663 </dd> |
|
664 </dl> |
|
665 <a NAME="HexEditMainWindow.__showEditMode" ID="HexEditMainWindow.__showEditMode"></a> |
|
666 <h4>HexEditMainWindow.__showEditMode</h4> |
|
667 <b>__showEditMode</b>(<i>overwrite</i>) |
|
668 |
|
669 <p> |
|
670 Private slot to show the edit mode. |
|
671 </p> |
|
672 <dl> |
|
673 |
|
674 <dt><i>overwrite</i> (bool)</dt> |
|
675 <dd> |
|
676 flag indicating overwrite mode |
|
677 </dd> |
|
678 </dl> |
|
679 <a NAME="HexEditMainWindow.__showFileMenu" ID="HexEditMainWindow.__showFileMenu"></a> |
|
680 <h4>HexEditMainWindow.__showFileMenu</h4> |
|
681 <b>__showFileMenu</b>(<i></i>) |
|
682 |
|
683 <p> |
|
684 Private slot to modify the file menu before being shown. |
|
685 </p> |
|
686 <a NAME="HexEditMainWindow.__showPreferences" ID="HexEditMainWindow.__showPreferences"></a> |
|
687 <h4>HexEditMainWindow.__showPreferences</h4> |
|
688 <b>__showPreferences</b>(<i></i>) |
|
689 |
|
690 <p> |
|
691 Private slot to set the preferences. |
|
692 </p> |
|
693 <a NAME="HexEditMainWindow.__showReadOnlyMode" ID="HexEditMainWindow.__showReadOnlyMode"></a> |
|
694 <h4>HexEditMainWindow.__showReadOnlyMode</h4> |
|
695 <b>__showReadOnlyMode</b>(<i>on</i>) |
|
696 |
|
697 <p> |
|
698 Private slot to show the read only mode. |
|
699 </p> |
|
700 <dl> |
|
701 |
|
702 <dt><i>on</i> (bool)</dt> |
|
703 <dd> |
|
704 flag indicating the read only state |
|
705 </dd> |
|
706 </dl> |
|
707 <a NAME="HexEditMainWindow.__showRecentMenu" ID="HexEditMainWindow.__showRecentMenu"></a> |
|
708 <h4>HexEditMainWindow.__showRecentMenu</h4> |
|
709 <b>__showRecentMenu</b>(<i></i>) |
|
710 |
|
711 <p> |
|
712 Private slot to set up the recent files menu. |
|
713 </p> |
|
714 <a NAME="HexEditMainWindow.__showSelectionInfo" ID="HexEditMainWindow.__showSelectionInfo"></a> |
|
715 <h4>HexEditMainWindow.__showSelectionInfo</h4> |
|
716 <b>__showSelectionInfo</b>(<i>avail</i>) |
|
717 |
|
718 <p> |
|
719 Private slot to show selection information. |
|
720 </p> |
|
721 <dl> |
|
722 |
|
723 <dt><i>avail</i> (bool)</dt> |
|
724 <dd> |
|
725 flag indicating the availability of a selection. |
|
726 </dd> |
|
727 </dl> |
|
728 <a NAME="HexEditMainWindow.__showSize" ID="HexEditMainWindow.__showSize"></a> |
|
729 <h4>HexEditMainWindow.__showSize</h4> |
|
730 <b>__showSize</b>(<i>size</i>) |
|
731 |
|
732 <p> |
|
733 Private slot to show the binary data size. |
|
734 </p> |
|
735 <dl> |
|
736 |
|
737 <dt><i>size</i> (int)</dt> |
|
738 <dd> |
|
739 size of the binary data |
|
740 </dd> |
|
741 </dl> |
|
742 <a NAME="HexEditMainWindow.__strippedName" ID="HexEditMainWindow.__strippedName"></a> |
|
743 <h4>HexEditMainWindow.__strippedName</h4> |
|
744 <b>__strippedName</b>(<i>fullFileName</i>) |
|
745 |
|
746 <p> |
|
747 Private method to return the filename part of the given path. |
|
748 </p> |
|
749 <dl> |
|
750 |
|
751 <dt><i>fullFileName</i> (str)</dt> |
|
752 <dd> |
|
753 full pathname of the given file |
|
754 </dd> |
|
755 </dl> |
|
756 <dl> |
|
757 <dt>Return:</dt> |
|
758 <dd> |
|
759 filename part |
|
760 </dd> |
|
761 </dl> |
|
762 <dl> |
|
763 <dt>Return Type:</dt> |
|
764 <dd> |
|
765 str |
|
766 </dd> |
|
767 </dl> |
|
768 <a NAME="HexEditMainWindow.__toggleEditMode" ID="HexEditMainWindow.__toggleEditMode"></a> |
|
769 <h4>HexEditMainWindow.__toggleEditMode</h4> |
|
770 <b>__toggleEditMode</b>(<i></i>) |
|
771 |
|
772 <p> |
|
773 Private slot to toggle the edit mode upon a click on the status bar |
|
774 label. |
|
775 </p> |
|
776 <a NAME="HexEditMainWindow.__toggleReadOnlyMode" ID="HexEditMainWindow.__toggleReadOnlyMode"></a> |
|
777 <h4>HexEditMainWindow.__toggleReadOnlyMode</h4> |
|
778 <b>__toggleReadOnlyMode</b>(<i></i>) |
|
779 |
|
780 <p> |
|
781 Private slot to toggle the read only mode upon a click on the status |
|
782 bar label. |
|
783 </p> |
|
784 <a NAME="HexEditMainWindow.__whatsThis" ID="HexEditMainWindow.__whatsThis"></a> |
|
785 <h4>HexEditMainWindow.__whatsThis</h4> |
|
786 <b>__whatsThis</b>(<i></i>) |
|
787 |
|
788 <p> |
|
789 Private slot called in to enter Whats This mode. |
|
790 </p> |
|
791 <a NAME="HexEditMainWindow.closeEvent" ID="HexEditMainWindow.closeEvent"></a> |
|
792 <h4>HexEditMainWindow.closeEvent</h4> |
|
793 <b>closeEvent</b>(<i>evt</i>) |
|
794 |
|
795 <p> |
|
796 Protected event handler for the close event. |
|
797 </p> |
|
798 <dl> |
|
799 |
|
800 <dt><i>evt</i> (QCloseEvent)</dt> |
|
801 <dd> |
|
802 reference to the close event |
|
803 <br />This event is simply accepted after the history has been |
|
804 saved and all window references have been deleted. |
|
805 </dd> |
|
806 </dl> |
|
807 <a NAME="HexEditMainWindow.getSRHistory" ID="HexEditMainWindow.getSRHistory"></a> |
|
808 <h4>HexEditMainWindow.getSRHistory</h4> |
|
809 <b>getSRHistory</b>(<i>key</i>) |
|
810 |
|
811 <p> |
|
812 Public method to get the search or replace history list. |
|
813 </p> |
|
814 <dl> |
|
815 |
|
816 <dt><i>key</i> (str (must be 'search' or 'replace'))</dt> |
|
817 <dd> |
|
818 name of list to return |
|
819 </dd> |
|
820 </dl> |
|
821 <dl> |
|
822 <dt>Return:</dt> |
|
823 <dd> |
|
824 the requested history list |
|
825 </dd> |
|
826 </dl> |
|
827 <dl> |
|
828 <dt>Return Type:</dt> |
|
829 <dd> |
|
830 list of tuples of (int, str) |
|
831 </dd> |
|
832 </dl> |
|
833 <a NAME="HexEditMainWindow.preferencesChanged" ID="HexEditMainWindow.preferencesChanged"></a> |
|
834 <h4>HexEditMainWindow.preferencesChanged</h4> |
|
835 <b>preferencesChanged</b>(<i></i>) |
|
836 |
|
837 <p> |
|
838 Public method to (re-)read the various settings. |
|
839 </p> |
|
840 <a NAME="HexEditMainWindow.setRecentPaths" ID="HexEditMainWindow.setRecentPaths"></a> |
|
841 <h4>HexEditMainWindow.setRecentPaths</h4> |
|
842 <b>setRecentPaths</b>(<i>openPath, savePath</i>) |
|
843 |
|
844 <p> |
|
845 Public method to set the last open and save paths. |
|
846 </p> |
|
847 <dl> |
|
848 |
|
849 <dt><i>openPath</i> (str)</dt> |
|
850 <dd> |
|
851 least recently used open path |
|
852 </dd> |
|
853 <dt><i>savePath</i> (str)</dt> |
|
854 <dd> |
|
855 least recently used save path |
|
856 </dd> |
|
857 </dl> |
|
858 <div align="right"><a href="#top">Up</a></div> |
|
859 <hr /> |
|
860 </body></html> |