1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
from PyQt5 import QtCore
from typing import List
from model.task import Task
class AddTask(QtCore.QObject):
_signal = QtCore.pyqtSignal(Task, list, name = 'addTask')
def __init__(self):
QtCore.QObject.__init__(self)
def emit(self, task: Task, tags: List[int]):
self._signal.emit(task, tags)
def connect(self, f):
self._signal.connect(f)
class UpdateTask(QtCore.QObject):
_signal = QtCore.pyqtSignal(int, Task, list, name = 'updateTask')
def __init__(self):
QtCore.QObject.__init__(self)
def emit(self, row: int, task: Task, tags: List[int]):
self._signal.emit(row, task, tags)
def connect(self, f):
self._signal.connect(f)
|