eric6/Documentation/Source/eric6.HexEdit.HexEditChunks.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.HexEditChunks</h1> 23 <h1>eric6.HexEdit.HexEditChunks</h1>
24
23 <p> 25 <p>
24 Module implementing the storage backend for the hex editor. 26 Module implementing the storage backend for the hex editor.
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="#HexEditChunk">HexEditChunk</a></td> 38 <td><a href="#HexEditChunk">HexEditChunk</a></td>
34 <td>Class implementing a container for the data chunks.</td> 39 <td>Class implementing a container for the data chunks.</td>
35 </tr><tr> 40 </tr>
41 <tr>
36 <td><a href="#HexEditChunks">HexEditChunks</a></td> 42 <td><a href="#HexEditChunks">HexEditChunks</a></td>
37 <td>Class implementing the storage backend for the hex editor.</td> 43 <td>Class implementing the storage backend for the hex editor.</td>
38 </tr> 44 </tr>
39 </table> 45 </table>
40 <h3>Functions</h3> 46 <h3>Functions</h3>
41 <table> 47
42 <tr><td>None</td></tr> 48 <table>
43 </table> 49 <tr><td>None</td></tr>
44 <hr /><hr /> 50 </table>
51 <hr />
52 <hr />
45 <a NAME="HexEditChunk" ID="HexEditChunk"></a> 53 <a NAME="HexEditChunk" ID="HexEditChunk"></a>
46 <h2>HexEditChunk</h2> 54 <h2>HexEditChunk</h2>
55
47 <p> 56 <p>
48 Class implementing a container for the data chunks. 57 Class implementing a container for the data chunks.
49 </p> 58 </p>
50 <h3>Derived from</h3> 59 <h3>Derived from</h3>
51 object 60 object
52 <h3>Class Attributes</h3> 61 <h3>Class Attributes</h3>
62
53 <table> 63 <table>
54 <tr><td>None</td></tr> 64 <tr><td>None</td></tr>
55 </table> 65 </table>
56 <h3>Class Methods</h3> 66 <h3>Class Methods</h3>
67
57 <table> 68 <table>
58 <tr><td>None</td></tr> 69 <tr><td>None</td></tr>
59 </table> 70 </table>
60 <h3>Methods</h3> 71 <h3>Methods</h3>
61 <table> 72
73 <table>
74
62 <tr> 75 <tr>
63 <td><a href="#HexEditChunk.__init__">HexEditChunk</a></td> 76 <td><a href="#HexEditChunk.__init__">HexEditChunk</a></td>
64 <td>Constructor</td> 77 <td>Constructor</td>
65 </tr> 78 </tr>
66 </table> 79 </table>
67 <h3>Static Methods</h3> 80 <h3>Static Methods</h3>
68 <table> 81
69 <tr><td>None</td></tr> 82 <table>
70 </table> 83 <tr><td>None</td></tr>
84 </table>
85
71 <a NAME="HexEditChunk.__init__" ID="HexEditChunk.__init__"></a> 86 <a NAME="HexEditChunk.__init__" ID="HexEditChunk.__init__"></a>
72 <h4>HexEditChunk (Constructor)</h4> 87 <h4>HexEditChunk (Constructor)</h4>
73 <b>HexEditChunk</b>(<i></i>) 88 <b>HexEditChunk</b>(<i></i>)
89
74 <p> 90 <p>
75 Constructor 91 Constructor
76 </p> 92 </p>
77 <div align="right"><a href="#top">Up</a></div> 93 <div align="right"><a href="#top">Up</a></div>
78 <hr /><hr /> 94 <hr />
95 <hr />
79 <a NAME="HexEditChunks" ID="HexEditChunks"></a> 96 <a NAME="HexEditChunks" ID="HexEditChunks"></a>
80 <h2>HexEditChunks</h2> 97 <h2>HexEditChunks</h2>
98
81 <p> 99 <p>
82 Class implementing the storage backend for the hex editor. 100 Class implementing the storage backend for the hex editor.
83 </p><p> 101 </p>
102 <p>
84 When HexEditWidget loads data, HexEditChunks access them using a QIODevice 103 When HexEditWidget loads data, HexEditChunks access them using a QIODevice
85 interface. When the app uses a QByteArray or Python bytearray interface, 104 interface. When the app uses a QByteArray or Python bytearray interface,
86 QBuffer is used to provide again a QIODevice like interface. No data will 105 QBuffer is used to provide again a QIODevice like interface. No data will
87 be changed, therefore HexEditChunks opens the QIODevice in 106 be changed, therefore HexEditChunks opens the QIODevice in
88 QIODevice.ReadOnly mode. After every access HexEditChunks closes the 107 QIODevice.ReadOnly mode. After every access HexEditChunks closes the
89 QIODevice. That's why external applications can overwrite files while 108 QIODevice. That's why external applications can overwrite files while
90 HexEditWidget shows them. 109 HexEditWidget shows them.
91 </p><p> 110 </p>
111 <p>
92 When the the user starts to edit the data, HexEditChunks creates a local 112 When the the user starts to edit the data, HexEditChunks creates a local
93 copy of a chunk of data (4 kilobytes) and notes all changes there. Parallel 113 copy of a chunk of data (4 kilobytes) and notes all changes there. Parallel
94 to that chunk, there is a second chunk, which keeps track of which bytes 114 to that chunk, there is a second chunk, which keeps track of which bytes
95 are changed and which are not. 115 are changed and which are not.
96 </p> 116 </p>
97 <h3>Derived from</h3> 117 <h3>Derived from</h3>
98 object 118 object
99 <h3>Class Attributes</h3> 119 <h3>Class Attributes</h3>
120
100 <table> 121 <table>
101 <tr><td>BUFFER_SIZE</td></tr><tr><td>CHUNK_SIZE</td></tr><tr><td>READ_CHUNK_MASK</td></tr> 122 <tr><td>BUFFER_SIZE</td></tr><tr><td>CHUNK_SIZE</td></tr><tr><td>READ_CHUNK_MASK</td></tr>
102 </table> 123 </table>
103 <h3>Class Methods</h3> 124 <h3>Class Methods</h3>
125
104 <table> 126 <table>
105 <tr><td>None</td></tr> 127 <tr><td>None</td></tr>
106 </table> 128 </table>
107 <h3>Methods</h3> 129 <h3>Methods</h3>
108 <table> 130
131 <table>
132
109 <tr> 133 <tr>
110 <td><a href="#HexEditChunks.__init__">HexEditChunks</a></td> 134 <td><a href="#HexEditChunks.__init__">HexEditChunks</a></td>
111 <td>Constructor</td> 135 <td>Constructor</td>
112 </tr><tr> 136 </tr>
137 <tr>
113 <td><a href="#HexEditChunks.__getChunkIndex">__getChunkIndex</a></td> 138 <td><a href="#HexEditChunks.__getChunkIndex">__getChunkIndex</a></td>
114 <td>Private method to get the chunk index for a position.</td> 139 <td>Private method to get the chunk index for a position.</td>
115 </tr><tr> 140 </tr>
141 <tr>
116 <td><a href="#HexEditChunks.__getitem__">__getitem__</a></td> 142 <td><a href="#HexEditChunks.__getitem__">__getitem__</a></td>
117 <td>Special method to get a byte at a position.</td> 143 <td>Special method to get a byte at a position.</td>
118 </tr><tr> 144 </tr>
145 <tr>
119 <td><a href="#HexEditChunks.data">data</a></td> 146 <td><a href="#HexEditChunks.data">data</a></td>
120 <td>Public method to get data out of the chunks.</td> 147 <td>Public method to get data out of the chunks.</td>
121 </tr><tr> 148 </tr>
149 <tr>
122 <td><a href="#HexEditChunks.dataChanged">dataChanged</a></td> 150 <td><a href="#HexEditChunks.dataChanged">dataChanged</a></td>
123 <td>Public method to test, if some data was changed.</td> 151 <td>Public method to test, if some data was changed.</td>
124 </tr><tr> 152 </tr>
153 <tr>
125 <td><a href="#HexEditChunks.indexOf">indexOf</a></td> 154 <td><a href="#HexEditChunks.indexOf">indexOf</a></td>
126 <td>Public method to search the first occurrence of some data.</td> 155 <td>Public method to search the first occurrence of some data.</td>
127 </tr><tr> 156 </tr>
157 <tr>
128 <td><a href="#HexEditChunks.insert">insert</a></td> 158 <td><a href="#HexEditChunks.insert">insert</a></td>
129 <td>Public method to insert a byte.</td> 159 <td>Public method to insert a byte.</td>
130 </tr><tr> 160 </tr>
161 <tr>
131 <td><a href="#HexEditChunks.lastIndexOf">lastIndexOf</a></td> 162 <td><a href="#HexEditChunks.lastIndexOf">lastIndexOf</a></td>
132 <td>Public method to search the last occurrence of some data.</td> 163 <td>Public method to search the last occurrence of some data.</td>
133 </tr><tr> 164 </tr>
165 <tr>
134 <td><a href="#HexEditChunks.overwrite">overwrite</a></td> 166 <td><a href="#HexEditChunks.overwrite">overwrite</a></td>
135 <td>Public method to overwrite a byte.</td> 167 <td>Public method to overwrite a byte.</td>
136 </tr><tr> 168 </tr>
169 <tr>
137 <td><a href="#HexEditChunks.pos">pos</a></td> 170 <td><a href="#HexEditChunks.pos">pos</a></td>
138 <td>Public method to get the current position.</td> 171 <td>Public method to get the current position.</td>
139 </tr><tr> 172 </tr>
173 <tr>
140 <td><a href="#HexEditChunks.removeAt">removeAt</a></td> 174 <td><a href="#HexEditChunks.removeAt">removeAt</a></td>
141 <td>Public method to remove a byte.</td> 175 <td>Public method to remove a byte.</td>
142 </tr><tr> 176 </tr>
177 <tr>
143 <td><a href="#HexEditChunks.setDataChanged">setDataChanged</a></td> 178 <td><a href="#HexEditChunks.setDataChanged">setDataChanged</a></td>
144 <td>Public method to set highlighting info.</td> 179 <td>Public method to set highlighting info.</td>
145 </tr><tr> 180 </tr>
181 <tr>
146 <td><a href="#HexEditChunks.setIODevice">setIODevice</a></td> 182 <td><a href="#HexEditChunks.setIODevice">setIODevice</a></td>
147 <td>Public method to set an io device to read the binary data from.</td> 183 <td>Public method to set an io device to read the binary data from.</td>
148 </tr><tr> 184 </tr>
185 <tr>
149 <td><a href="#HexEditChunks.size">size</a></td> 186 <td><a href="#HexEditChunks.size">size</a></td>
150 <td>Public method to get the current data size.</td> 187 <td>Public method to get the current data size.</td>
151 </tr><tr> 188 </tr>
189 <tr>
152 <td><a href="#HexEditChunks.write">write</a></td> 190 <td><a href="#HexEditChunks.write">write</a></td>
153 <td>Public method to write data to an io device.</td> 191 <td>Public method to write data to an io device.</td>
154 </tr> 192 </tr>
155 </table> 193 </table>
156 <h3>Static Methods</h3> 194 <h3>Static Methods</h3>
157 <table> 195
158 <tr><td>None</td></tr> 196 <table>
159 </table> 197 <tr><td>None</td></tr>
198 </table>
199
160 <a NAME="HexEditChunks.__init__" ID="HexEditChunks.__init__"></a> 200 <a NAME="HexEditChunks.__init__" ID="HexEditChunks.__init__"></a>
161 <h4>HexEditChunks (Constructor)</h4> 201 <h4>HexEditChunks (Constructor)</h4>
162 <b>HexEditChunks</b>(<i>ioDevice=None</i>) 202 <b>HexEditChunks</b>(<i>ioDevice=None</i>)
203
163 <p> 204 <p>
164 Constructor 205 Constructor
165 </p><dl> 206 </p>
207 <dl>
208
166 <dt><i>ioDevice</i> (QIODevice)</dt> 209 <dt><i>ioDevice</i> (QIODevice)</dt>
167 <dd> 210 <dd>
168 io device to get the data from 211 io device to get the data from
169 </dd> 212 </dd>
170 </dl><a NAME="HexEditChunks.__getChunkIndex" ID="HexEditChunks.__getChunkIndex"></a> 213 </dl>
214 <a NAME="HexEditChunks.__getChunkIndex" ID="HexEditChunks.__getChunkIndex"></a>
171 <h4>HexEditChunks.__getChunkIndex</h4> 215 <h4>HexEditChunks.__getChunkIndex</h4>
172 <b>__getChunkIndex</b>(<i>absPos</i>) 216 <b>__getChunkIndex</b>(<i>absPos</i>)
217
173 <p> 218 <p>
174 Private method to get the chunk index for a position. 219 Private method to get the chunk index for a position.
175 </p><p> 220 </p>
221 <p>
176 This method checks, if there is already a copied chunk available. If 222 This method checks, if there is already a copied chunk available. If
177 there is one, it returns its index. If there is no copied chunk 223 there is one, it returns its index. If there is no copied chunk
178 available, original data will be copied into a new chunk. 224 available, original data will be copied into a new chunk.
179 </p><dl> 225 </p>
226 <dl>
227
180 <dt><i>absPos</i> (int)</dt> 228 <dt><i>absPos</i> (int)</dt>
181 <dd> 229 <dd>
182 absolute position of the data. 230 absolute position of the data.
183 </dd> 231 </dd>
184 </dl><dl> 232 </dl>
233 <dl>
185 <dt>Returns:</dt> 234 <dt>Returns:</dt>
186 <dd> 235 <dd>
187 index of the chunk containing the position 236 index of the chunk containing the position
188 </dd> 237 </dd>
189 </dl><dl> 238 </dl>
239 <dl>
190 <dt>Return Type:</dt> 240 <dt>Return Type:</dt>
191 <dd> 241 <dd>
192 int 242 int
193 </dd> 243 </dd>
194 </dl><a NAME="HexEditChunks.__getitem__" ID="HexEditChunks.__getitem__"></a> 244 </dl>
245 <a NAME="HexEditChunks.__getitem__" ID="HexEditChunks.__getitem__"></a>
195 <h4>HexEditChunks.__getitem__</h4> 246 <h4>HexEditChunks.__getitem__</h4>
196 <b>__getitem__</b>(<i>pos</i>) 247 <b>__getitem__</b>(<i>pos</i>)
248
197 <p> 249 <p>
198 Special method to get a byte at a position. 250 Special method to get a byte at a position.
199 </p><p> 251 </p>
252 <p>
200 Note: This realizes the [] get operator. 253 Note: This realizes the [] get operator.
201 </p><dl> 254 </p>
255 <dl>
256
202 <dt><i>pos</i> (int)</dt> 257 <dt><i>pos</i> (int)</dt>
203 <dd> 258 <dd>
204 position of byte to get 259 position of byte to get
205 </dd> 260 </dd>
206 </dl><dl> 261 </dl>
262 <dl>
207 <dt>Returns:</dt> 263 <dt>Returns:</dt>
208 <dd> 264 <dd>
209 requested byte 265 requested byte
210 </dd> 266 </dd>
211 </dl><dl> 267 </dl>
268 <dl>
212 <dt>Return Type:</dt> 269 <dt>Return Type:</dt>
213 <dd> 270 <dd>
214 int (range 0 to 255) 271 int (range 0 to 255)
215 </dd> 272 </dd>
216 </dl><a NAME="HexEditChunks.data" ID="HexEditChunks.data"></a> 273 </dl>
274 <a NAME="HexEditChunks.data" ID="HexEditChunks.data"></a>
217 <h4>HexEditChunks.data</h4> 275 <h4>HexEditChunks.data</h4>
218 <b>data</b>(<i>pos=0, maxSize=-1, highlighted=None</i>) 276 <b>data</b>(<i>pos=0, maxSize=-1, highlighted=None</i>)
277
219 <p> 278 <p>
220 Public method to get data out of the chunks. 279 Public method to get data out of the chunks.
221 </p><dl> 280 </p>
281 <dl>
282
222 <dt><i>pos</i> (int)</dt> 283 <dt><i>pos</i> (int)</dt>
223 <dd> 284 <dd>
224 position to get bytes from 285 position to get bytes from
225 </dd><dt><i>maxSize</i> (int)</dt> 286 </dd>
287 <dt><i>maxSize</i> (int)</dt>
226 <dd> 288 <dd>
227 maximum amount of bytes to get 289 maximum amount of bytes to get
228 </dd><dt><i>highlighted</i> (bytearray)</dt> 290 </dd>
291 <dt><i>highlighted</i> (bytearray)</dt>
229 <dd> 292 <dd>
230 reference to a byte array storing highlighting info 293 reference to a byte array storing highlighting info
231 </dd> 294 </dd>
232 </dl><dl> 295 </dl>
296 <dl>
233 <dt>Returns:</dt> 297 <dt>Returns:</dt>
234 <dd> 298 <dd>
235 retrieved data 299 retrieved data
236 </dd> 300 </dd>
237 </dl><dl> 301 </dl>
302 <dl>
238 <dt>Return Type:</dt> 303 <dt>Return Type:</dt>
239 <dd> 304 <dd>
240 bytearray 305 bytearray
241 </dd> 306 </dd>
242 </dl><a NAME="HexEditChunks.dataChanged" ID="HexEditChunks.dataChanged"></a> 307 </dl>
308 <a NAME="HexEditChunks.dataChanged" ID="HexEditChunks.dataChanged"></a>
243 <h4>HexEditChunks.dataChanged</h4> 309 <h4>HexEditChunks.dataChanged</h4>
244 <b>dataChanged</b>(<i>pos</i>) 310 <b>dataChanged</b>(<i>pos</i>)
311
245 <p> 312 <p>
246 Public method to test, if some data was changed. 313 Public method to test, if some data was changed.
247 </p><dl> 314 </p>
315 <dl>
316
248 <dt><i>pos</i> (int)</dt> 317 <dt><i>pos</i> (int)</dt>
249 <dd> 318 <dd>
250 byte position to check 319 byte position to check
251 </dd> 320 </dd>
252 </dl><dl> 321 </dl>
322 <dl>
253 <dt>Returns:</dt> 323 <dt>Returns:</dt>
254 <dd> 324 <dd>
255 flag indicating the changed state 325 flag indicating the changed state
256 </dd> 326 </dd>
257 </dl><dl> 327 </dl>
328 <dl>
258 <dt>Return Type:</dt> 329 <dt>Return Type:</dt>
259 <dd> 330 <dd>
260 bool 331 bool
261 </dd> 332 </dd>
262 </dl><a NAME="HexEditChunks.indexOf" ID="HexEditChunks.indexOf"></a> 333 </dl>
334 <a NAME="HexEditChunks.indexOf" ID="HexEditChunks.indexOf"></a>
263 <h4>HexEditChunks.indexOf</h4> 335 <h4>HexEditChunks.indexOf</h4>
264 <b>indexOf</b>(<i>byteArray, start</i>) 336 <b>indexOf</b>(<i>byteArray, start</i>)
337
265 <p> 338 <p>
266 Public method to search the first occurrence of some data. 339 Public method to search the first occurrence of some data.
267 </p><dl> 340 </p>
341 <dl>
342
268 <dt><i>byteArray</i> (bytearray)</dt> 343 <dt><i>byteArray</i> (bytearray)</dt>
269 <dd> 344 <dd>
270 data to search for 345 data to search for
271 </dd><dt><i>start</i> (int)</dt> 346 </dd>
347 <dt><i>start</i> (int)</dt>
272 <dd> 348 <dd>
273 position to start the search at 349 position to start the search at
274 </dd> 350 </dd>
275 </dl><dl> 351 </dl>
352 <dl>
276 <dt>Returns:</dt> 353 <dt>Returns:</dt>
277 <dd> 354 <dd>
278 position the data was found at or -1 if nothing could be found 355 position the data was found at or -1 if nothing could be found
279 </dd> 356 </dd>
280 </dl><dl> 357 </dl>
358 <dl>
281 <dt>Return Type:</dt> 359 <dt>Return Type:</dt>
282 <dd> 360 <dd>
283 int 361 int
284 </dd> 362 </dd>
285 </dl><a NAME="HexEditChunks.insert" ID="HexEditChunks.insert"></a> 363 </dl>
364 <a NAME="HexEditChunks.insert" ID="HexEditChunks.insert"></a>
286 <h4>HexEditChunks.insert</h4> 365 <h4>HexEditChunks.insert</h4>
287 <b>insert</b>(<i>pos, data</i>) 366 <b>insert</b>(<i>pos, data</i>)
367
288 <p> 368 <p>
289 Public method to insert a byte. 369 Public method to insert a byte.
290 </p><dl> 370 </p>
371 <dl>
372
291 <dt><i>pos</i> (int)</dt> 373 <dt><i>pos</i> (int)</dt>
292 <dd> 374 <dd>
293 position to insert at 375 position to insert at
294 </dd><dt><i>data</i> (int (range 0 to 255))</dt> 376 </dd>
377 <dt><i>data</i> (int (range 0 to 255))</dt>
295 <dd> 378 <dd>
296 byte to insert 379 byte to insert
297 </dd> 380 </dd>
298 </dl><dl> 381 </dl>
382 <dl>
299 <dt>Returns:</dt> 383 <dt>Returns:</dt>
300 <dd> 384 <dd>
301 flag indicating success 385 flag indicating success
302 </dd> 386 </dd>
303 </dl><dl> 387 </dl>
388 <dl>
304 <dt>Return Type:</dt> 389 <dt>Return Type:</dt>
305 <dd> 390 <dd>
306 bool 391 bool
307 </dd> 392 </dd>
308 </dl><a NAME="HexEditChunks.lastIndexOf" ID="HexEditChunks.lastIndexOf"></a> 393 </dl>
394 <a NAME="HexEditChunks.lastIndexOf" ID="HexEditChunks.lastIndexOf"></a>
309 <h4>HexEditChunks.lastIndexOf</h4> 395 <h4>HexEditChunks.lastIndexOf</h4>
310 <b>lastIndexOf</b>(<i>byteArray, start</i>) 396 <b>lastIndexOf</b>(<i>byteArray, start</i>)
397
311 <p> 398 <p>
312 Public method to search the last occurrence of some data. 399 Public method to search the last occurrence of some data.
313 </p><dl> 400 </p>
401 <dl>
402
314 <dt><i>byteArray</i> (bytearray)</dt> 403 <dt><i>byteArray</i> (bytearray)</dt>
315 <dd> 404 <dd>
316 data to search for 405 data to search for
317 </dd><dt><i>start</i> (int)</dt> 406 </dd>
407 <dt><i>start</i> (int)</dt>
318 <dd> 408 <dd>
319 position to start the search at 409 position to start the search at
320 </dd> 410 </dd>
321 </dl><dl> 411 </dl>
412 <dl>
322 <dt>Returns:</dt> 413 <dt>Returns:</dt>
323 <dd> 414 <dd>
324 position the data was found at or -1 if nothing could be found 415 position the data was found at or -1 if nothing could be found
325 </dd> 416 </dd>
326 </dl><dl> 417 </dl>
418 <dl>
327 <dt>Return Type:</dt> 419 <dt>Return Type:</dt>
328 <dd> 420 <dd>
329 int 421 int
330 </dd> 422 </dd>
331 </dl><a NAME="HexEditChunks.overwrite" ID="HexEditChunks.overwrite"></a> 423 </dl>
424 <a NAME="HexEditChunks.overwrite" ID="HexEditChunks.overwrite"></a>
332 <h4>HexEditChunks.overwrite</h4> 425 <h4>HexEditChunks.overwrite</h4>
333 <b>overwrite</b>(<i>pos, data</i>) 426 <b>overwrite</b>(<i>pos, data</i>)
427
334 <p> 428 <p>
335 Public method to overwrite a byte. 429 Public method to overwrite a byte.
336 </p><dl> 430 </p>
431 <dl>
432
337 <dt><i>pos</i> (int)</dt> 433 <dt><i>pos</i> (int)</dt>
338 <dd> 434 <dd>
339 position to overwrite 435 position to overwrite
340 </dd><dt><i>data</i> (int (range 0 to 255))</dt> 436 </dd>
437 <dt><i>data</i> (int (range 0 to 255))</dt>
341 <dd> 438 <dd>
342 byte to overwrite with 439 byte to overwrite with
343 </dd> 440 </dd>
344 </dl><dl> 441 </dl>
442 <dl>
345 <dt>Returns:</dt> 443 <dt>Returns:</dt>
346 <dd> 444 <dd>
347 flag indicating success 445 flag indicating success
348 </dd> 446 </dd>
349 </dl><dl> 447 </dl>
448 <dl>
350 <dt>Return Type:</dt> 449 <dt>Return Type:</dt>
351 <dd> 450 <dd>
352 bool 451 bool
353 </dd> 452 </dd>
354 </dl><a NAME="HexEditChunks.pos" ID="HexEditChunks.pos"></a> 453 </dl>
454 <a NAME="HexEditChunks.pos" ID="HexEditChunks.pos"></a>
355 <h4>HexEditChunks.pos</h4> 455 <h4>HexEditChunks.pos</h4>
356 <b>pos</b>(<i></i>) 456 <b>pos</b>(<i></i>)
457
357 <p> 458 <p>
358 Public method to get the current position. 459 Public method to get the current position.
359 </p><dl> 460 </p>
461 <dl>
360 <dt>Returns:</dt> 462 <dt>Returns:</dt>
361 <dd> 463 <dd>
362 current position 464 current position
363 </dd> 465 </dd>
364 </dl><dl> 466 </dl>
467 <dl>
365 <dt>Return Type:</dt> 468 <dt>Return Type:</dt>
366 <dd> 469 <dd>
367 int 470 int
368 </dd> 471 </dd>
369 </dl><a NAME="HexEditChunks.removeAt" ID="HexEditChunks.removeAt"></a> 472 </dl>
473 <a NAME="HexEditChunks.removeAt" ID="HexEditChunks.removeAt"></a>
370 <h4>HexEditChunks.removeAt</h4> 474 <h4>HexEditChunks.removeAt</h4>
371 <b>removeAt</b>(<i>pos</i>) 475 <b>removeAt</b>(<i>pos</i>)
476
372 <p> 477 <p>
373 Public method to remove a byte. 478 Public method to remove a byte.
374 </p><dl> 479 </p>
480 <dl>
481
375 <dt><i>pos</i> (int)</dt> 482 <dt><i>pos</i> (int)</dt>
376 <dd> 483 <dd>
377 position to remove 484 position to remove
378 </dd> 485 </dd>
379 </dl><dl> 486 </dl>
487 <dl>
380 <dt>Returns:</dt> 488 <dt>Returns:</dt>
381 <dd> 489 <dd>
382 flag indicating success 490 flag indicating success
383 </dd> 491 </dd>
384 </dl><dl> 492 </dl>
493 <dl>
385 <dt>Return Type:</dt> 494 <dt>Return Type:</dt>
386 <dd> 495 <dd>
387 bool 496 bool
388 </dd> 497 </dd>
389 </dl><a NAME="HexEditChunks.setDataChanged" ID="HexEditChunks.setDataChanged"></a> 498 </dl>
499 <a NAME="HexEditChunks.setDataChanged" ID="HexEditChunks.setDataChanged"></a>
390 <h4>HexEditChunks.setDataChanged</h4> 500 <h4>HexEditChunks.setDataChanged</h4>
391 <b>setDataChanged</b>(<i>pos, dataChanged</i>) 501 <b>setDataChanged</b>(<i>pos, dataChanged</i>)
502
392 <p> 503 <p>
393 Public method to set highlighting info. 504 Public method to set highlighting info.
394 </p><dl> 505 </p>
506 <dl>
507
395 <dt><i>pos</i> (int)</dt> 508 <dt><i>pos</i> (int)</dt>
396 <dd> 509 <dd>
397 position to set highlighting info for 510 position to set highlighting info for
398 </dd><dt><i>dataChanged</i> (bool)</dt> 511 </dd>
512 <dt><i>dataChanged</i> (bool)</dt>
399 <dd> 513 <dd>
400 flag indicating changed data 514 flag indicating changed data
401 </dd> 515 </dd>
402 </dl><a NAME="HexEditChunks.setIODevice" ID="HexEditChunks.setIODevice"></a> 516 </dl>
517 <a NAME="HexEditChunks.setIODevice" ID="HexEditChunks.setIODevice"></a>
403 <h4>HexEditChunks.setIODevice</h4> 518 <h4>HexEditChunks.setIODevice</h4>
404 <b>setIODevice</b>(<i>ioDevice</i>) 519 <b>setIODevice</b>(<i>ioDevice</i>)
520
405 <p> 521 <p>
406 Public method to set an io device to read the binary data from. 522 Public method to set an io device to read the binary data from.
407 </p><dl> 523 </p>
524 <dl>
525
408 <dt><i>ioDevice</i> (QIODevice)</dt> 526 <dt><i>ioDevice</i> (QIODevice)</dt>
409 <dd> 527 <dd>
410 io device to get the data from 528 io device to get the data from
411 </dd> 529 </dd>
412 </dl><dl> 530 </dl>
531 <dl>
413 <dt>Returns:</dt> 532 <dt>Returns:</dt>
414 <dd> 533 <dd>
415 flag indicating successful operation 534 flag indicating successful operation
416 </dd> 535 </dd>
417 </dl><dl> 536 </dl>
537 <dl>
418 <dt>Return Type:</dt> 538 <dt>Return Type:</dt>
419 <dd> 539 <dd>
420 bool 540 bool
421 </dd> 541 </dd>
422 </dl><a NAME="HexEditChunks.size" ID="HexEditChunks.size"></a> 542 </dl>
543 <a NAME="HexEditChunks.size" ID="HexEditChunks.size"></a>
423 <h4>HexEditChunks.size</h4> 544 <h4>HexEditChunks.size</h4>
424 <b>size</b>(<i></i>) 545 <b>size</b>(<i></i>)
546
425 <p> 547 <p>
426 Public method to get the current data size. 548 Public method to get the current data size.
427 </p><dl> 549 </p>
550 <dl>
428 <dt>Returns:</dt> 551 <dt>Returns:</dt>
429 <dd> 552 <dd>
430 current data size 553 current data size
431 </dd> 554 </dd>
432 </dl><dl> 555 </dl>
556 <dl>
433 <dt>Return Type:</dt> 557 <dt>Return Type:</dt>
434 <dd> 558 <dd>
435 int 559 int
436 </dd> 560 </dd>
437 </dl><a NAME="HexEditChunks.write" ID="HexEditChunks.write"></a> 561 </dl>
562 <a NAME="HexEditChunks.write" ID="HexEditChunks.write"></a>
438 <h4>HexEditChunks.write</h4> 563 <h4>HexEditChunks.write</h4>
439 <b>write</b>(<i>ioDevice, pos=0, count=-1</i>) 564 <b>write</b>(<i>ioDevice, pos=0, count=-1</i>)
565
440 <p> 566 <p>
441 Public method to write data to an io device. 567 Public method to write data to an io device.
442 </p><dl> 568 </p>
569 <dl>
570
443 <dt><i>ioDevice</i> (QIODevice)</dt> 571 <dt><i>ioDevice</i> (QIODevice)</dt>
444 <dd> 572 <dd>
445 io device to write the data to 573 io device to write the data to
446 </dd><dt><i>pos</i> (int)</dt> 574 </dd>
575 <dt><i>pos</i> (int)</dt>
447 <dd> 576 <dd>
448 position to write bytes from 577 position to write bytes from
449 </dd><dt><i>count</i> (int)</dt> 578 </dd>
579 <dt><i>count</i> (int)</dt>
450 <dd> 580 <dd>
451 amount of bytes to write 581 amount of bytes to write
452 </dd> 582 </dd>
453 </dl><dl> 583 </dl>
584 <dl>
454 <dt>Returns:</dt> 585 <dt>Returns:</dt>
455 <dd> 586 <dd>
456 flag indicating success 587 flag indicating success
457 </dd> 588 </dd>
458 </dl><dl> 589 </dl>
590 <dl>
459 <dt>Return Type:</dt> 591 <dt>Return Type:</dt>
460 <dd> 592 <dd>
461 bool 593 bool
462 </dd> 594 </dd>
463 </dl> 595 </dl>

eric ide

mercurial