eric6.HexEdit.HexEditUndoStack
Module implementing the Undo stack for the hex edit widget.
Global Attributes
Classes
Functions
HexEditCommand
Class implementing the edit comands.
Derived from
Enum
Class Attributes
Class Methods
Methods
Static Methods
HexEditUndoCommand
Class implementing the Undo command.
Derived from
QUndoCommand
Class Attributes
Class Methods
Methods
HexEditUndoCommand |
Constructor |
id |
Public method to get the ID of this undo command class. |
mergeWith |
Public method to merge this command with another one. |
redo |
Public method to redo the command. |
undo |
Public method to undo the command. |
Static Methods
HexEditUndoCommand (Constructor)
HexEditUndoCommand(chunks, cmd, pos, newByte, parent=None)
Constructor
- chunks (HexEditChunks)
-
reference to the data container
- cmd (HexEditCommand)
-
edit command
- pos (int)
-
edit position
- newByte (int (range 0 to 255))
-
new byte value
- parent (QUndoCommand)
-
reference to the parent command
HexEditUndoCommand.id
id()
Public method to get the ID of this undo command class.
- Returns:
-
ID of the undo command class
- Return Type:
-
int
HexEditUndoCommand.mergeWith
mergeWith(command)
Public method to merge this command with another one.
- command (QUndoCommand)
-
reference to the command to merge with
- Returns:
-
flag indicating a successful merge
- Return Type:
-
bool
HexEditUndoCommand.redo
redo()
Public method to redo the command.
HexEditUndoCommand.undo
undo()
Public method to undo the command.
HexEditUndoStack
Class implementing an Undo stack for the hex edit widget.
Derived from
QUndoStack
Class Attributes
Class Methods
Methods
Static Methods
HexEditUndoStack (Constructor)
HexEditUndoStack(chunks, parent=None)
Constructor
- chunks (HexEditChunks)
-
reference to the data container
- parent (QObject)
-
reference to the parent object
HexEditUndoStack.insert
insert(pos, data)
Public method to insert a byte.
- pos (int)
-
position to insert at
- data (int (range 0 to 255))
-
byte to be inserted
HexEditUndoStack.insertByteArray
insertByteArray(pos, byteArray)
Public method to insert bytes.
- pos (int)
-
position to insert at
- byteArray (byteArray or QByteArray)
-
data to be inserted
HexEditUndoStack.overwrite
overwrite(pos, data)
Public method to replace a byte.
- pos (int)
-
position to replace the byte at
- data (int (range 0 to 255))
-
byte to replace with
HexEditUndoStack.overwriteByteArray
overwriteByteArray(pos, length, byteArray)
Public method to replace bytes.
- pos (int)
-
position to replace the bytes at
- length (int)
-
amount of bytes to replace
- byteArray (bytearray or QByteArray)
-
bytes to replace with
HexEditUndoStack.removeAt
removeAt(pos, length=1)
Public method to remove bytes.
- pos (int)
-
position to remove bytes from
- length (int)
-
amount of bytes to remove