1
0
forked from IPKM/nmreval

more interactive edit

This commit is contained in:
Dominik Demuth
2023-10-25 20:04:49 +02:00
parent 6339bdc2cc
commit 7fe564a61e
10 changed files with 921 additions and 241 deletions

View File

@ -87,6 +87,21 @@ class ShiftCommand(QtWidgets.QUndoCommand):
self.__data.apply('ls', self.__args)
class EditCommand(QtWidgets.QUndoCommand):
def __init__(self, data, *args):
super().__init__('Edit signal')
self.__data = data
self.__arguments = args
self.__original = copy.deepcopy(self.__data.data)
def undo(self):
self.__data.data = copy.deepcopy(self.__original)
def redo(self):
self.__data.edit_signal(*self.__arguments)
class NormCommand(QtWidgets.QUndoCommand):
def __init__(self, data, mode):
super().__init__('Normalize')