eric7/Documentation/Source/eric7.HexEdit.HexEditUndoStack.html

branch
eric7
changeset 8372
e0227a7c850e
child 8596
d64760b2da50
equal deleted inserted replaced
8371:d6062691d424 8372:e0227a7c850e
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.HexEdit.HexEditUndoStack</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.HexEditUndoStack</h1>
24
25 <p>
26 Module implementing the Undo stack for the hex edit widget.
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="#HexEditCommand">HexEditCommand</a></td>
39 <td>Class implementing the edit commands.</td>
40 </tr>
41 <tr>
42 <td><a href="#HexEditUndoCommand">HexEditUndoCommand</a></td>
43 <td>Class implementing the Undo command.</td>
44 </tr>
45 <tr>
46 <td><a href="#HexEditUndoStack">HexEditUndoStack</a></td>
47 <td>Class implementing an Undo stack for the hex edit widget.</td>
48 </tr>
49 </table>
50 <h3>Functions</h3>
51
52 <table>
53 <tr><td>None</td></tr>
54 </table>
55 <hr />
56 <hr />
57 <a NAME="HexEditCommand" ID="HexEditCommand"></a>
58 <h2>HexEditCommand</h2>
59
60 <p>
61 Class implementing the edit commands.
62 </p>
63 <h3>Derived from</h3>
64 enum.Enum
65 <h3>Class Attributes</h3>
66
67 <table>
68 <tr><td>INSERT</td></tr><tr><td>OVERWRITE</td></tr><tr><td>REMOVEAT</td></tr>
69 </table>
70 <h3>Class Methods</h3>
71
72 <table>
73 <tr><td>None</td></tr>
74 </table>
75 <h3>Methods</h3>
76
77 <table>
78 <tr><td>None</td></tr>
79 </table>
80 <h3>Static Methods</h3>
81
82 <table>
83 <tr><td>None</td></tr>
84 </table>
85
86 <div align="right"><a href="#top">Up</a></div>
87 <hr />
88 <hr />
89 <a NAME="HexEditUndoCommand" ID="HexEditUndoCommand"></a>
90 <h2>HexEditUndoCommand</h2>
91
92 <p>
93 Class implementing the Undo command.
94 </p>
95 <h3>Derived from</h3>
96 QUndoCommand
97 <h3>Class Attributes</h3>
98
99 <table>
100 <tr><td>None</td></tr>
101 </table>
102 <h3>Class Methods</h3>
103
104 <table>
105 <tr><td>None</td></tr>
106 </table>
107 <h3>Methods</h3>
108
109 <table>
110
111 <tr>
112 <td><a href="#HexEditUndoCommand.__init__">HexEditUndoCommand</a></td>
113 <td>Constructor</td>
114 </tr>
115 <tr>
116 <td><a href="#HexEditUndoCommand.id">id</a></td>
117 <td>Public method to get the ID of this undo command class.</td>
118 </tr>
119 <tr>
120 <td><a href="#HexEditUndoCommand.mergeWith">mergeWith</a></td>
121 <td>Public method to merge this command with another one.</td>
122 </tr>
123 <tr>
124 <td><a href="#HexEditUndoCommand.redo">redo</a></td>
125 <td>Public method to redo the command.</td>
126 </tr>
127 <tr>
128 <td><a href="#HexEditUndoCommand.undo">undo</a></td>
129 <td>Public method to undo the command.</td>
130 </tr>
131 </table>
132 <h3>Static Methods</h3>
133
134 <table>
135 <tr><td>None</td></tr>
136 </table>
137
138 <a NAME="HexEditUndoCommand.__init__" ID="HexEditUndoCommand.__init__"></a>
139 <h4>HexEditUndoCommand (Constructor)</h4>
140 <b>HexEditUndoCommand</b>(<i>chunks, cmd, pos, newByte, parent=None</i>)
141
142 <p>
143 Constructor
144 </p>
145 <dl>
146
147 <dt><i>chunks</i> (HexEditChunks)</dt>
148 <dd>
149 reference to the data container
150 </dd>
151 <dt><i>cmd</i> (HexEditCommand)</dt>
152 <dd>
153 edit command
154 </dd>
155 <dt><i>pos</i> (int)</dt>
156 <dd>
157 edit position
158 </dd>
159 <dt><i>newByte</i> (int (range 0 to 255))</dt>
160 <dd>
161 new byte value
162 </dd>
163 <dt><i>parent</i> (QUndoCommand)</dt>
164 <dd>
165 reference to the parent command
166 </dd>
167 </dl>
168 <a NAME="HexEditUndoCommand.id" ID="HexEditUndoCommand.id"></a>
169 <h4>HexEditUndoCommand.id</h4>
170 <b>id</b>(<i></i>)
171
172 <p>
173 Public method to get the ID of this undo command class.
174 </p>
175 <dl>
176 <dt>Return:</dt>
177 <dd>
178 ID of the undo command class
179 </dd>
180 </dl>
181 <dl>
182 <dt>Return Type:</dt>
183 <dd>
184 int
185 </dd>
186 </dl>
187 <a NAME="HexEditUndoCommand.mergeWith" ID="HexEditUndoCommand.mergeWith"></a>
188 <h4>HexEditUndoCommand.mergeWith</h4>
189 <b>mergeWith</b>(<i>command</i>)
190
191 <p>
192 Public method to merge this command with another one.
193 </p>
194 <dl>
195
196 <dt><i>command</i> (QUndoCommand)</dt>
197 <dd>
198 reference to the command to merge with
199 </dd>
200 </dl>
201 <dl>
202 <dt>Return:</dt>
203 <dd>
204 flag indicating a successful merge
205 </dd>
206 </dl>
207 <dl>
208 <dt>Return Type:</dt>
209 <dd>
210 bool
211 </dd>
212 </dl>
213 <a NAME="HexEditUndoCommand.redo" ID="HexEditUndoCommand.redo"></a>
214 <h4>HexEditUndoCommand.redo</h4>
215 <b>redo</b>(<i></i>)
216
217 <p>
218 Public method to redo the command.
219 </p>
220 <a NAME="HexEditUndoCommand.undo" ID="HexEditUndoCommand.undo"></a>
221 <h4>HexEditUndoCommand.undo</h4>
222 <b>undo</b>(<i></i>)
223
224 <p>
225 Public method to undo the command.
226 </p>
227 <div align="right"><a href="#top">Up</a></div>
228 <hr />
229 <hr />
230 <a NAME="HexEditUndoStack" ID="HexEditUndoStack"></a>
231 <h2>HexEditUndoStack</h2>
232
233 <p>
234 Class implementing an Undo stack for the hex edit widget.
235 </p>
236 <h3>Derived from</h3>
237 QUndoStack
238 <h3>Class Attributes</h3>
239
240 <table>
241 <tr><td>None</td></tr>
242 </table>
243 <h3>Class Methods</h3>
244
245 <table>
246 <tr><td>None</td></tr>
247 </table>
248 <h3>Methods</h3>
249
250 <table>
251
252 <tr>
253 <td><a href="#HexEditUndoStack.__init__">HexEditUndoStack</a></td>
254 <td>Constructor</td>
255 </tr>
256 <tr>
257 <td><a href="#HexEditUndoStack.insert">insert</a></td>
258 <td>Public method to insert a byte.</td>
259 </tr>
260 <tr>
261 <td><a href="#HexEditUndoStack.insertByteArray">insertByteArray</a></td>
262 <td>Public method to insert bytes.</td>
263 </tr>
264 <tr>
265 <td><a href="#HexEditUndoStack.overwrite">overwrite</a></td>
266 <td>Public method to replace a byte.</td>
267 </tr>
268 <tr>
269 <td><a href="#HexEditUndoStack.overwriteByteArray">overwriteByteArray</a></td>
270 <td>Public method to replace bytes.</td>
271 </tr>
272 <tr>
273 <td><a href="#HexEditUndoStack.removeAt">removeAt</a></td>
274 <td>Public method to remove bytes.</td>
275 </tr>
276 </table>
277 <h3>Static Methods</h3>
278
279 <table>
280 <tr><td>None</td></tr>
281 </table>
282
283 <a NAME="HexEditUndoStack.__init__" ID="HexEditUndoStack.__init__"></a>
284 <h4>HexEditUndoStack (Constructor)</h4>
285 <b>HexEditUndoStack</b>(<i>chunks, parent=None</i>)
286
287 <p>
288 Constructor
289 </p>
290 <dl>
291
292 <dt><i>chunks</i> (HexEditChunks)</dt>
293 <dd>
294 reference to the data container
295 </dd>
296 <dt><i>parent</i> (QObject)</dt>
297 <dd>
298 reference to the parent object
299 </dd>
300 </dl>
301 <a NAME="HexEditUndoStack.insert" ID="HexEditUndoStack.insert"></a>
302 <h4>HexEditUndoStack.insert</h4>
303 <b>insert</b>(<i>pos, data</i>)
304
305 <p>
306 Public method to insert a byte.
307 </p>
308 <dl>
309
310 <dt><i>pos</i> (int)</dt>
311 <dd>
312 position to insert at
313 </dd>
314 <dt><i>data</i> (int (range 0 to 255))</dt>
315 <dd>
316 byte to be inserted
317 </dd>
318 </dl>
319 <a NAME="HexEditUndoStack.insertByteArray" ID="HexEditUndoStack.insertByteArray"></a>
320 <h4>HexEditUndoStack.insertByteArray</h4>
321 <b>insertByteArray</b>(<i>pos, byteArray</i>)
322
323 <p>
324 Public method to insert bytes.
325 </p>
326 <dl>
327
328 <dt><i>pos</i> (int)</dt>
329 <dd>
330 position to insert at
331 </dd>
332 <dt><i>byteArray</i> (byteArray or QByteArray)</dt>
333 <dd>
334 data to be inserted
335 </dd>
336 </dl>
337 <a NAME="HexEditUndoStack.overwrite" ID="HexEditUndoStack.overwrite"></a>
338 <h4>HexEditUndoStack.overwrite</h4>
339 <b>overwrite</b>(<i>pos, data</i>)
340
341 <p>
342 Public method to replace a byte.
343 </p>
344 <dl>
345
346 <dt><i>pos</i> (int)</dt>
347 <dd>
348 position to replace the byte at
349 </dd>
350 <dt><i>data</i> (int (range 0 to 255))</dt>
351 <dd>
352 byte to replace with
353 </dd>
354 </dl>
355 <a NAME="HexEditUndoStack.overwriteByteArray" ID="HexEditUndoStack.overwriteByteArray"></a>
356 <h4>HexEditUndoStack.overwriteByteArray</h4>
357 <b>overwriteByteArray</b>(<i>pos, length, byteArray</i>)
358
359 <p>
360 Public method to replace bytes.
361 </p>
362 <dl>
363
364 <dt><i>pos</i> (int)</dt>
365 <dd>
366 position to replace the bytes at
367 </dd>
368 <dt><i>length</i> (int)</dt>
369 <dd>
370 amount of bytes to replace
371 </dd>
372 <dt><i>byteArray</i> (bytearray or QByteArray)</dt>
373 <dd>
374 bytes to replace with
375 </dd>
376 </dl>
377 <a NAME="HexEditUndoStack.removeAt" ID="HexEditUndoStack.removeAt"></a>
378 <h4>HexEditUndoStack.removeAt</h4>
379 <b>removeAt</b>(<i>pos, length=1</i>)
380
381 <p>
382 Public method to remove bytes.
383 </p>
384 <dl>
385
386 <dt><i>pos</i> (int)</dt>
387 <dd>
388 position to remove bytes from
389 </dd>
390 <dt><i>length</i> (int)</dt>
391 <dd>
392 amount of bytes to remove
393 </dd>
394 </dl>
395 <div align="right"><a href="#top">Up</a></div>
396 <hr />
397 </body></html>

eric ide

mercurial