aboutsummaryrefslogtreecommitdiff
path: root/src/gui/tasks/signal.py
blob: 7d926e195f26110bb446842b2ba2b59068b86753 (plain)
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
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