5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.HexEdit.HexEditUndoStack</h1> |
9 <h1>eric7.HexEdit.HexEditUndoStack</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the Undo stack for the hex edit widget. |
11 Module implementing the Undo stack for the hex edit widget. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#HexEditCommand">HexEditCommand</a></td> |
22 <td><a href="#HexEditCommand">HexEditCommand</a></td> |
25 <td>Class implementing the edit commands.</td> |
23 <td>Class implementing the edit commands.</td> |
26 </tr> |
24 </tr> |
27 <tr> |
25 <tr> |
31 <tr> |
29 <tr> |
32 <td><a href="#HexEditUndoStack">HexEditUndoStack</a></td> |
30 <td><a href="#HexEditUndoStack">HexEditUndoStack</a></td> |
33 <td>Class implementing an Undo stack for the hex edit widget.</td> |
31 <td>Class implementing an Undo stack for the hex edit widget.</td> |
34 </tr> |
32 </tr> |
35 </table> |
33 </table> |
|
34 |
36 <h3>Functions</h3> |
35 <h3>Functions</h3> |
37 |
36 <table> |
38 <table> |
37 <tr><td>None</td></tr> |
39 <tr><td>None</td></tr> |
38 </table> |
40 </table> |
39 |
41 <hr /> |
40 <hr /> |
42 <hr /> |
41 <hr /> |
43 <a NAME="HexEditCommand" ID="HexEditCommand"></a> |
42 <a NAME="HexEditCommand" ID="HexEditCommand"></a> |
44 <h2>HexEditCommand</h2> |
43 <h2>HexEditCommand</h2> |
45 |
|
46 <p> |
44 <p> |
47 Class implementing the edit commands. |
45 Class implementing the edit commands. |
48 </p> |
46 </p> |
|
47 |
49 <h3>Derived from</h3> |
48 <h3>Derived from</h3> |
50 enum.Enum |
49 enum.Enum |
51 <h3>Class Attributes</h3> |
50 <h3>Class Attributes</h3> |
52 |
51 <table> |
53 <table> |
52 <tr><td>INSERT</td></tr> |
54 <tr><td>INSERT</td></tr><tr><td>OVERWRITE</td></tr><tr><td>REMOVEAT</td></tr> |
53 <tr><td>OVERWRITE</td></tr> |
55 </table> |
54 <tr><td>REMOVEAT</td></tr> |
|
55 </table> |
|
56 |
56 <h3>Class Methods</h3> |
57 <h3>Class Methods</h3> |
57 |
58 <table> |
58 <table> |
59 <tr><td>None</td></tr> |
59 <tr><td>None</td></tr> |
60 </table> |
60 </table> |
61 |
61 <h3>Methods</h3> |
62 <h3>Methods</h3> |
62 |
63 <table> |
63 <table> |
64 <tr><td>None</td></tr> |
64 <tr><td>None</td></tr> |
65 </table> |
65 </table> |
66 |
66 <h3>Static Methods</h3> |
67 <h3>Static Methods</h3> |
67 |
68 <table> |
68 <table> |
69 <tr><td>None</td></tr> |
69 <tr><td>None</td></tr> |
70 </table> |
70 </table> |
71 |
71 |
72 |
72 <div align="right"><a href="#top">Up</a></div> |
73 <div align="right"><a href="#top">Up</a></div> |
73 <hr /> |
74 <hr /> |
74 <hr /> |
75 <hr /> |
75 <a NAME="HexEditUndoCommand" ID="HexEditUndoCommand"></a> |
76 <a NAME="HexEditUndoCommand" ID="HexEditUndoCommand"></a> |
76 <h2>HexEditUndoCommand</h2> |
77 <h2>HexEditUndoCommand</h2> |
77 |
|
78 <p> |
78 <p> |
79 Class implementing the Undo command. |
79 Class implementing the Undo command. |
80 </p> |
80 </p> |
|
81 |
81 <h3>Derived from</h3> |
82 <h3>Derived from</h3> |
82 QUndoCommand |
83 QUndoCommand |
83 <h3>Class Attributes</h3> |
84 <h3>Class Attributes</h3> |
84 |
85 <table> |
85 <table> |
86 <tr><td>None</td></tr> |
86 <tr><td>None</td></tr> |
87 </table> |
87 </table> |
88 |
88 <h3>Class Methods</h3> |
89 <h3>Class Methods</h3> |
89 |
90 <table> |
90 <table> |
91 <tr><td>None</td></tr> |
91 <tr><td>None</td></tr> |
92 </table> |
92 </table> |
93 |
93 <h3>Methods</h3> |
94 <h3>Methods</h3> |
94 |
95 <table> |
95 <table> |
|
96 |
|
97 <tr> |
96 <tr> |
98 <td><a href="#HexEditUndoCommand.__init__">HexEditUndoCommand</a></td> |
97 <td><a href="#HexEditUndoCommand.__init__">HexEditUndoCommand</a></td> |
99 <td>Constructor</td> |
98 <td>Constructor</td> |
100 </tr> |
99 </tr> |
101 <tr> |
100 <tr> |
113 <tr> |
112 <tr> |
114 <td><a href="#HexEditUndoCommand.undo">undo</a></td> |
113 <td><a href="#HexEditUndoCommand.undo">undo</a></td> |
115 <td>Public method to undo the command.</td> |
114 <td>Public method to undo the command.</td> |
116 </tr> |
115 </tr> |
117 </table> |
116 </table> |
|
117 |
118 <h3>Static Methods</h3> |
118 <h3>Static Methods</h3> |
119 |
119 <table> |
120 <table> |
120 <tr><td>None</td></tr> |
121 <tr><td>None</td></tr> |
121 </table> |
122 </table> |
122 |
123 |
123 |
124 <a NAME="HexEditUndoCommand.__init__" ID="HexEditUndoCommand.__init__"></a> |
124 <a NAME="HexEditUndoCommand.__init__" ID="HexEditUndoCommand.__init__"></a> |
125 <h4>HexEditUndoCommand (Constructor)</h4> |
125 <h4>HexEditUndoCommand (Constructor)</h4> |
126 <b>HexEditUndoCommand</b>(<i>chunks, cmd, pos, newByte, parent=None</i>) |
126 <b>HexEditUndoCommand</b>(<i>chunks, cmd, pos, newByte, parent=None</i>) |
127 |
|
128 <p> |
127 <p> |
129 Constructor |
128 Constructor |
130 </p> |
129 </p> |
|
130 |
131 <dl> |
131 <dl> |
132 |
132 |
133 <dt><i>chunks</i> (HexEditChunks)</dt> |
133 <dt><i>chunks</i> (HexEditChunks)</dt> |
134 <dd> |
134 <dd> |
135 reference to the data container |
135 reference to the data container |
171 </dd> |
171 </dd> |
172 </dl> |
172 </dl> |
173 <a NAME="HexEditUndoCommand.mergeWith" ID="HexEditUndoCommand.mergeWith"></a> |
173 <a NAME="HexEditUndoCommand.mergeWith" ID="HexEditUndoCommand.mergeWith"></a> |
174 <h4>HexEditUndoCommand.mergeWith</h4> |
174 <h4>HexEditUndoCommand.mergeWith</h4> |
175 <b>mergeWith</b>(<i>command</i>) |
175 <b>mergeWith</b>(<i>command</i>) |
176 |
|
177 <p> |
176 <p> |
178 Public method to merge this command with another one. |
177 Public method to merge this command with another one. |
179 </p> |
178 </p> |
|
179 |
180 <dl> |
180 <dl> |
181 |
181 |
182 <dt><i>command</i> (QUndoCommand)</dt> |
182 <dt><i>command</i> (QUndoCommand)</dt> |
183 <dd> |
183 <dd> |
184 reference to the command to merge with |
184 reference to the command to merge with |
197 </dd> |
197 </dd> |
198 </dl> |
198 </dl> |
199 <a NAME="HexEditUndoCommand.redo" ID="HexEditUndoCommand.redo"></a> |
199 <a NAME="HexEditUndoCommand.redo" ID="HexEditUndoCommand.redo"></a> |
200 <h4>HexEditUndoCommand.redo</h4> |
200 <h4>HexEditUndoCommand.redo</h4> |
201 <b>redo</b>(<i></i>) |
201 <b>redo</b>(<i></i>) |
202 |
|
203 <p> |
202 <p> |
204 Public method to redo the command. |
203 Public method to redo the command. |
205 </p> |
204 </p> |
|
205 |
206 <a NAME="HexEditUndoCommand.undo" ID="HexEditUndoCommand.undo"></a> |
206 <a NAME="HexEditUndoCommand.undo" ID="HexEditUndoCommand.undo"></a> |
207 <h4>HexEditUndoCommand.undo</h4> |
207 <h4>HexEditUndoCommand.undo</h4> |
208 <b>undo</b>(<i></i>) |
208 <b>undo</b>(<i></i>) |
209 |
|
210 <p> |
209 <p> |
211 Public method to undo the command. |
210 Public method to undo the command. |
212 </p> |
211 </p> |
|
212 |
213 <div align="right"><a href="#top">Up</a></div> |
213 <div align="right"><a href="#top">Up</a></div> |
214 <hr /> |
214 <hr /> |
215 <hr /> |
215 <hr /> |
216 <a NAME="HexEditUndoStack" ID="HexEditUndoStack"></a> |
216 <a NAME="HexEditUndoStack" ID="HexEditUndoStack"></a> |
217 <h2>HexEditUndoStack</h2> |
217 <h2>HexEditUndoStack</h2> |
218 |
|
219 <p> |
218 <p> |
220 Class implementing an Undo stack for the hex edit widget. |
219 Class implementing an Undo stack for the hex edit widget. |
221 </p> |
220 </p> |
|
221 |
222 <h3>Derived from</h3> |
222 <h3>Derived from</h3> |
223 QUndoStack |
223 QUndoStack |
224 <h3>Class Attributes</h3> |
224 <h3>Class Attributes</h3> |
225 |
225 <table> |
226 <table> |
226 <tr><td>None</td></tr> |
227 <tr><td>None</td></tr> |
227 </table> |
228 </table> |
228 |
229 <h3>Class Methods</h3> |
229 <h3>Class Methods</h3> |
230 |
230 <table> |
231 <table> |
231 <tr><td>None</td></tr> |
232 <tr><td>None</td></tr> |
232 </table> |
233 </table> |
233 |
234 <h3>Methods</h3> |
234 <h3>Methods</h3> |
235 |
235 <table> |
236 <table> |
|
237 |
|
238 <tr> |
236 <tr> |
239 <td><a href="#HexEditUndoStack.__init__">HexEditUndoStack</a></td> |
237 <td><a href="#HexEditUndoStack.__init__">HexEditUndoStack</a></td> |
240 <td>Constructor</td> |
238 <td>Constructor</td> |
241 </tr> |
239 </tr> |
242 <tr> |
240 <tr> |
258 <tr> |
256 <tr> |
259 <td><a href="#HexEditUndoStack.removeAt">removeAt</a></td> |
257 <td><a href="#HexEditUndoStack.removeAt">removeAt</a></td> |
260 <td>Public method to remove bytes.</td> |
258 <td>Public method to remove bytes.</td> |
261 </tr> |
259 </tr> |
262 </table> |
260 </table> |
|
261 |
263 <h3>Static Methods</h3> |
262 <h3>Static Methods</h3> |
264 |
263 <table> |
265 <table> |
264 <tr><td>None</td></tr> |
266 <tr><td>None</td></tr> |
265 </table> |
267 </table> |
266 |
268 |
267 |
269 <a NAME="HexEditUndoStack.__init__" ID="HexEditUndoStack.__init__"></a> |
268 <a NAME="HexEditUndoStack.__init__" ID="HexEditUndoStack.__init__"></a> |
270 <h4>HexEditUndoStack (Constructor)</h4> |
269 <h4>HexEditUndoStack (Constructor)</h4> |
271 <b>HexEditUndoStack</b>(<i>chunks, parent=None</i>) |
270 <b>HexEditUndoStack</b>(<i>chunks, parent=None</i>) |
272 |
|
273 <p> |
271 <p> |
274 Constructor |
272 Constructor |
275 </p> |
273 </p> |
|
274 |
276 <dl> |
275 <dl> |
277 |
276 |
278 <dt><i>chunks</i> (HexEditChunks)</dt> |
277 <dt><i>chunks</i> (HexEditChunks)</dt> |
279 <dd> |
278 <dd> |
280 reference to the data container |
279 reference to the data container |
285 </dd> |
284 </dd> |
286 </dl> |
285 </dl> |
287 <a NAME="HexEditUndoStack.insert" ID="HexEditUndoStack.insert"></a> |
286 <a NAME="HexEditUndoStack.insert" ID="HexEditUndoStack.insert"></a> |
288 <h4>HexEditUndoStack.insert</h4> |
287 <h4>HexEditUndoStack.insert</h4> |
289 <b>insert</b>(<i>pos, data</i>) |
288 <b>insert</b>(<i>pos, data</i>) |
290 |
|
291 <p> |
289 <p> |
292 Public method to insert a byte. |
290 Public method to insert a byte. |
293 </p> |
291 </p> |
|
292 |
294 <dl> |
293 <dl> |
295 |
294 |
296 <dt><i>pos</i> (int)</dt> |
295 <dt><i>pos</i> (int)</dt> |
297 <dd> |
296 <dd> |
298 position to insert at |
297 position to insert at |
303 </dd> |
302 </dd> |
304 </dl> |
303 </dl> |
305 <a NAME="HexEditUndoStack.insertByteArray" ID="HexEditUndoStack.insertByteArray"></a> |
304 <a NAME="HexEditUndoStack.insertByteArray" ID="HexEditUndoStack.insertByteArray"></a> |
306 <h4>HexEditUndoStack.insertByteArray</h4> |
305 <h4>HexEditUndoStack.insertByteArray</h4> |
307 <b>insertByteArray</b>(<i>pos, byteArray</i>) |
306 <b>insertByteArray</b>(<i>pos, byteArray</i>) |
308 |
|
309 <p> |
307 <p> |
310 Public method to insert bytes. |
308 Public method to insert bytes. |
311 </p> |
309 </p> |
|
310 |
312 <dl> |
311 <dl> |
313 |
312 |
314 <dt><i>pos</i> (int)</dt> |
313 <dt><i>pos</i> (int)</dt> |
315 <dd> |
314 <dd> |
316 position to insert at |
315 position to insert at |
321 </dd> |
320 </dd> |
322 </dl> |
321 </dl> |
323 <a NAME="HexEditUndoStack.overwrite" ID="HexEditUndoStack.overwrite"></a> |
322 <a NAME="HexEditUndoStack.overwrite" ID="HexEditUndoStack.overwrite"></a> |
324 <h4>HexEditUndoStack.overwrite</h4> |
323 <h4>HexEditUndoStack.overwrite</h4> |
325 <b>overwrite</b>(<i>pos, data</i>) |
324 <b>overwrite</b>(<i>pos, data</i>) |
326 |
|
327 <p> |
325 <p> |
328 Public method to replace a byte. |
326 Public method to replace a byte. |
329 </p> |
327 </p> |
|
328 |
330 <dl> |
329 <dl> |
331 |
330 |
332 <dt><i>pos</i> (int)</dt> |
331 <dt><i>pos</i> (int)</dt> |
333 <dd> |
332 <dd> |
334 position to replace the byte at |
333 position to replace the byte at |
339 </dd> |
338 </dd> |
340 </dl> |
339 </dl> |
341 <a NAME="HexEditUndoStack.overwriteByteArray" ID="HexEditUndoStack.overwriteByteArray"></a> |
340 <a NAME="HexEditUndoStack.overwriteByteArray" ID="HexEditUndoStack.overwriteByteArray"></a> |
342 <h4>HexEditUndoStack.overwriteByteArray</h4> |
341 <h4>HexEditUndoStack.overwriteByteArray</h4> |
343 <b>overwriteByteArray</b>(<i>pos, length, byteArray</i>) |
342 <b>overwriteByteArray</b>(<i>pos, length, byteArray</i>) |
344 |
|
345 <p> |
343 <p> |
346 Public method to replace bytes. |
344 Public method to replace bytes. |
347 </p> |
345 </p> |
|
346 |
348 <dl> |
347 <dl> |
349 |
348 |
350 <dt><i>pos</i> (int)</dt> |
349 <dt><i>pos</i> (int)</dt> |
351 <dd> |
350 <dd> |
352 position to replace the bytes at |
351 position to replace the bytes at |
361 </dd> |
360 </dd> |
362 </dl> |
361 </dl> |
363 <a NAME="HexEditUndoStack.removeAt" ID="HexEditUndoStack.removeAt"></a> |
362 <a NAME="HexEditUndoStack.removeAt" ID="HexEditUndoStack.removeAt"></a> |
364 <h4>HexEditUndoStack.removeAt</h4> |
363 <h4>HexEditUndoStack.removeAt</h4> |
365 <b>removeAt</b>(<i>pos, length=1</i>) |
364 <b>removeAt</b>(<i>pos, length=1</i>) |
366 |
|
367 <p> |
365 <p> |
368 Public method to remove bytes. |
366 Public method to remove bytes. |
369 </p> |
367 </p> |
|
368 |
370 <dl> |
369 <dl> |
371 |
370 |
372 <dt><i>pos</i> (int)</dt> |
371 <dt><i>pos</i> (int)</dt> |
373 <dd> |
372 <dd> |
374 position to remove bytes from |
373 position to remove bytes from |