15 from E5Gui import E5MessageBox |
15 from E5Gui import E5MessageBox |
16 from E5Gui.E5OverrideCursor import E5OverridenCursor |
16 from E5Gui.E5OverrideCursor import E5OverridenCursor |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 |
18 |
19 import Preferences |
19 import Preferences |
|
20 |
|
21 from .Task import TaskType |
20 |
22 |
21 |
23 |
22 class TasksFile(QObject): |
24 class TasksFile(QObject): |
23 """ |
25 """ |
24 Class representing the tasks JSON file. |
26 Class representing the tasks JSON file. |
136 for task in tasksDict["Tasks"]: |
138 for task in tasksDict["Tasks"]: |
137 addedTask = viewer.addTask( |
139 addedTask = viewer.addTask( |
138 task["summary"], priority=task["priority"], |
140 task["summary"], priority=task["priority"], |
139 filename=task["filename"], lineno=task["lineno"], |
141 filename=task["filename"], lineno=task["lineno"], |
140 completed=task["completed"], _time=task["created"], |
142 completed=task["completed"], _time=task["created"], |
141 isProjectTask=not self.__isGlobal, taskType=task["type"], |
143 isProjectTask=not self.__isGlobal, |
|
144 taskType=TaskType(task["type"]), |
142 description=task["description"], uid=task["uid"], |
145 description=task["description"], uid=task["uid"], |
143 parentTask=task["parent_uid"]) |
146 parentTask=task["parent_uid"]) |
144 addedTasks.append((addedTask, task["expanded"])) |
147 addedTasks.append((addedTask, task["expanded"])) |
145 |
148 |
146 for task, expanded in addedTasks: |
149 for task, expanded in addedTasks: |