eric6/Documentation/Source/eric6.HexEdit.HexEditUndoStack.html

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

eric ide

mercurial