eric6/Tasks/Task.py

changeset 8143
2c730d5fd177
parent 8011
630a173cb137
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
98 self.parentUid = parentUid 98 self.parentUid = parentUid
99 99
100 if isProjectTask: 100 if isProjectTask:
101 self.filename = self.project.getRelativePath(self.filename) 101 self.filename = self.project.getRelativePath(self.filename)
102 102
103 self.setData(0, Qt.DisplayRole, "") 103 self.setData(0, Qt.ItemDataRole.DisplayRole, "")
104 self.setData(1, Qt.DisplayRole, "") 104 self.setData(1, Qt.ItemDataRole.DisplayRole, "")
105 self.setData(2, Qt.DisplayRole, self.summary) 105 self.setData(2, Qt.ItemDataRole.DisplayRole, self.summary)
106 self.setData(3, Qt.DisplayRole, self.filename) 106 self.setData(3, Qt.ItemDataRole.DisplayRole, self.filename)
107 self.setData(4, Qt.DisplayRole, self.lineno or "") 107 self.setData(4, Qt.ItemDataRole.DisplayRole, self.lineno or "")
108 108
109 if self.completed: 109 if self.completed:
110 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted")) 110 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted"))
111 strikeOut = True 111 strikeOut = True
112 else: 112 else:
131 Task.TaskType2IconName[self.taskType])) 131 Task.TaskType2IconName[self.taskType]))
132 except KeyError: 132 except KeyError:
133 self.setIcon(2, UI.PixmapCache.getIcon("empty")) 133 self.setIcon(2, UI.PixmapCache.getIcon("empty"))
134 134
135 self.colorizeTask() 135 self.colorizeTask()
136 self.setTextAlignment(4, Qt.AlignRight) 136 self.setTextAlignment(4, Qt.AlignmentFlag.AlignRight)
137 137
138 def colorizeTask(self): 138 def colorizeTask(self):
139 """ 139 """
140 Public slot to set the colors of the task item. 140 Public slot to set the colors of the task item.
141 """ 141 """

eric ide

mercurial