From 0f1610333324d58acafee8c0fa9d9c9bc293b219 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 31 May 2020 13:59:35 +0200 Subject: Use defined tags for tasks --- src/gui/tasks/signal.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/gui/tasks/signal.py') 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) -- cgit v1.2.3