diff options
author | Joris | 2020-05-08 19:35:08 +0200 |
---|---|---|
committer | Joris | 2020-05-08 19:35:08 +0200 |
commit | 6ed4e669ef7cb857c7b0ac774c41e8f9c7758217 (patch) | |
tree | fd14205caaf9fdb5db472c53fd9954bbeb7aee72 /src/gui/tasks/widget.py | |
parent | bff2dfd96169f595510b16980a4cb2f3d4548029 (diff) |
Add duration to tasks
Diffstat (limited to 'src/gui/tasks/widget.py')
-rw-r--r-- | src/gui/tasks/widget.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/tasks/widget.py b/src/gui/tasks/widget.py index bca6585..6fa8bf0 100644 --- a/src/gui/tasks/widget.py +++ b/src/gui/tasks/widget.py @@ -4,7 +4,7 @@ import db.tasks import gui.tasks.signal import gui.tasks.table.widget import gui.icons -from model.task import TaskForm +from model.task import ValidTaskForm def widget(database, parent): widget = QtWidgets.QWidget(parent) @@ -30,10 +30,10 @@ def show_add_dialog(database, parent_widget, add_task_signal): 'Add a task', 'add', None, - lambda taskForm: on_add(database, taskForm, add_task_signal)) + lambda form: on_add(database, form, add_task_signal)) dialog.exec_() -def on_add(database, taskForm: TaskForm, add_task_signal): - task = db.tasks.insert(database.cursor(), taskForm) +def on_add(database, form: ValidTaskForm, add_task_signal): + task = db.tasks.insert(database.cursor(), form) database.commit() add_task_signal.emit(task) |