diff options
author | Joris | 2020-05-31 13:59:35 +0200 |
---|---|---|
committer | Joris | 2020-05-31 13:59:35 +0200 |
commit | 0f1610333324d58acafee8c0fa9d9c9bc293b219 (patch) | |
tree | 302c37dd3751e9fe2e50ab656d56253bfd2d55fc /src/gui/tasks/signal.py | |
parent | 8a6e10d401eea8db0947f8c4b309b8a6256f9748 (diff) |
Use defined tags for tasks
Diffstat (limited to 'src/gui/tasks/signal.py')
-rw-r--r-- | src/gui/tasks/signal.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/tasks/signal.py b/src/gui/tasks/signal.py index 7d926e1..e62a838 100644 --- a/src/gui/tasks/signal.py +++ b/src/gui/tasks/signal.py @@ -1,27 +1,28 @@ from PyQt5 import QtCore +from typing import List from model.task import Task class AddTask(QtCore.QObject): - _signal = QtCore.pyqtSignal(Task, name = 'addTask') + _signal = QtCore.pyqtSignal(Task, list, name = 'addTask') def __init__(self): QtCore.QObject.__init__(self) - def emit(self, task): - self._signal.emit(task) + def emit(self, task: Task, tags: List[int]): + self._signal.emit(task, tags) - def get(self): - return self._signal + def connect(self, f): + self._signal.connect(f) class UpdateTask(QtCore.QObject): - _signal = QtCore.pyqtSignal(int, Task, name = 'updateTask') + _signal = QtCore.pyqtSignal(int, Task, list, name = 'updateTask') def __init__(self): QtCore.QObject.__init__(self) - def emit(self, row, task): - self._signal.emit(row, task) + def emit(self, row: int, task: Task, tags: List[int]): + self._signal.emit(row, task, tags) - def get(self): - return self._signal + def connect(self, f): + self._signal.connect(f) |