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

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

eric ide

mercurial