73 QTreeWidgetItem.__init__(self, ["", "", self.description, self.filename, |
73 QTreeWidgetItem.__init__(self, ["", "", self.description, self.filename, |
74 (self.lineno and "{0:6d}".format(self.lineno) or "")]) |
74 (self.lineno and "{0:6d}".format(self.lineno) or "")]) |
75 |
75 |
76 if self.completed: |
76 if self.completed: |
77 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
77 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
|
78 strikeOut = True |
78 else: |
79 else: |
79 self.setIcon(0, UI.PixmapCache.getIcon("empty.png")) |
80 self.setIcon(0, UI.PixmapCache.getIcon("empty.png")) |
|
81 strikeOut = False |
|
82 for column in range(2, 5): |
|
83 f = self.font(column) |
|
84 f.setStrikeOut(strikeOut) |
|
85 self.setFont(column, f) |
80 |
86 |
81 if self.priority == 1: |
87 if self.priority == 1: |
82 self.setIcon(1, UI.PixmapCache.getIcon("empty.png")) |
88 self.setIcon(1, UI.PixmapCache.getIcon("empty.png")) |
83 elif self.priority == 0: |
89 elif self.priority == 0: |
84 self.setIcon(1, UI.PixmapCache.getIcon("taskPrioHigh.png")) |
90 self.setIcon(1, UI.PixmapCache.getIcon("taskPrioHigh.png")) |
148 @param completed flag indicating completion status (boolean) |
154 @param completed flag indicating completion status (boolean) |
149 """ |
155 """ |
150 self.completed = completed |
156 self.completed = completed |
151 if self.completed: |
157 if self.completed: |
152 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
158 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
|
159 strikeOut = True |
153 else: |
160 else: |
154 self.setIcon(0, UI.PixmapCache.getIcon("empty.png")) |
161 self.setIcon(0, UI.PixmapCache.getIcon("empty.png")) |
|
162 strikeOut = False |
|
163 for column in range(2, 5): |
|
164 f = self.font(column) |
|
165 f.setStrikeOut(strikeOut) |
|
166 self.setFont(column, f) |
155 |
167 |
156 def isCompleted(self): |
168 def isCompleted(self): |
157 """ |
169 """ |
158 Public slot to return the completion status. |
170 Public slot to return the completion status. |
159 |
171 |