diff options
Diffstat (limited to 'src/gui/tasks/signal.py')
-rw-r--r-- | src/gui/tasks/signal.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/tasks/signal.py b/src/gui/tasks/signal.py new file mode 100644 index 0000000..7d926e1 --- /dev/null +++ b/src/gui/tasks/signal.py @@ -0,0 +1,27 @@ +from PyQt5 import QtCore + +from model.task import Task + +class AddTask(QtCore.QObject): + _signal = QtCore.pyqtSignal(Task, name = 'addTask') + + def __init__(self): + QtCore.QObject.__init__(self) + + def emit(self, task): + self._signal.emit(task) + + def get(self): + return self._signal + +class UpdateTask(QtCore.QObject): + _signal = QtCore.pyqtSignal(int, Task, name = 'updateTask') + + def __init__(self): + QtCore.QObject.__init__(self) + + def emit(self, row, task): + self._signal.emit(row, task) + + def get(self): + return self._signal |