src/eric7/HexEdit/HexEditChunks.py

branch
eric7
changeset 9500
5771348ded12
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9499:dd389c57c2f0 9500:5771348ded12
7 Module implementing the storage backend for the hex editor. 7 Module implementing the storage backend for the hex editor.
8 """ 8 """
9 9
10 import sys 10 import sys
11 11
12 from dataclasses import dataclass, field
13
12 from PyQt6.QtCore import QBuffer, QByteArray, QIODevice 14 from PyQt6.QtCore import QBuffer, QByteArray, QIODevice
13 15
14 16
17 @dataclass
15 class HexEditChunk: 18 class HexEditChunk:
16 """ 19 """
17 Class implementing a container for the data chunks. 20 Class implementing a container for the data chunks.
18 """ 21 """
19 22
20 def __init__(self): 23 data: bytearray = field(default_factory=bytearray)
21 """ 24 dataChanged: bytearray = field(default_factory=bytearray)
22 Constructor 25 absPos: int = 0
23 """
24 self.data = bytearray()
25 self.dataChanged = bytearray()
26 self.absPos = 0
27 26
28 27
29 class HexEditChunks: 28 class HexEditChunks:
30 """ 29 """
31 Class implementing the storage backend for the hex editor. 30 Class implementing the storage backend for the hex editor.

eric ide

mercurial