52 (boolean) |
52 (boolean) |
53 @param isBugfixTask flag indicating a bugfix task (boolean) |
53 @param isBugfixTask flag indicating a bugfix task (boolean) |
54 @param project reference to the project object (Project) |
54 @param project reference to the project object (Project) |
55 @param longtext explanatory text of the task (string) |
55 @param longtext explanatory text of the task (string) |
56 """ |
56 """ |
|
57 super().__init__() |
|
58 |
57 self.description = description |
59 self.description = description |
58 self.longtext = longtext |
60 self.longtext = longtext |
59 if priority in [0, 1, 2]: |
61 if priority in [0, 1, 2]: |
60 self.priority = priority |
62 self.priority = priority |
61 else: |
63 else: |
69 self.project = project |
71 self.project = project |
70 |
72 |
71 if isProjectTask: |
73 if isProjectTask: |
72 self.filename = self.project.getRelativePath(self.filename) |
74 self.filename = self.project.getRelativePath(self.filename) |
73 |
75 |
74 super().__init__(["", "", self.description, self.filename, |
76 self.setData(0, Qt.DisplayRole, "") |
75 (self.lineno and "{0:6d}".format(self.lineno) or "")]) |
77 self.setData(1, Qt.DisplayRole, "") |
|
78 self.setData(2, Qt.DisplayRole, self.description) |
|
79 self.setData(3, Qt.DisplayRole, self.filename) |
|
80 self.setData(4, Qt.DisplayRole, self.lineno or "") |
76 |
81 |
77 if self.completed: |
82 if self.completed: |
78 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
83 self.setIcon(0, UI.PixmapCache.getIcon("taskCompleted.png")) |
79 strikeOut = True |
84 strikeOut = True |
80 else: |
85 else: |